Bug report
Bug description:
In Python 3.14 beta 2, pasting code that has more lines than the height of my terminal window will result in the lines just above the terminal window being blank.
To reproduce:
- Resize your terminal so the height is approximately 20 rows
- Paste the below block of Python code.
- Scroll up in your terminal to see previous lines above the last 20 rows
- Note that all rows above the terminal screen are blank (no
class Point: line or __slots__ line for example)
classPoint:
__slots__= ('x', 'y')
__match_args__= ('x', 'y')
def__init__(self, x: float, y: float) ->None:
object.__setattr__(self, 'x', x)
object.__setattr__(self, 'y', y)
def__repr__(self):
cls=type(self).__name__returnf'{cls}(x={self.x!r}, y={self.y!r})'def__eq__(self, other):
ifnotisinstance(other, Point):
returnNotImplementedreturn (self.x, self.y) == (other.x, other.y)
def__hash__(self):
returnhash((self.x, self.y))
def__setattr__(self, name, value):
raiseAttributeError(f"Can't set attribute {name!r}")
def__delattr__(self, name):
raiseAttributeError(f"Can't delete attribute {name!r}")
def__getstate__(self):
return (self.x, self.y)
def__setstate__(self, state):
fields= ('x', 'y')
forfield, valueinzip(fields, state):
object.__setattr__(self, field, value)This is essentially the same as the "Blank lines" section of issue #119517.
I assume this is being done for performance reasons, but this is going to make my life harder when teaching. I often use a large font when teaching, so it's not uncommon that I'll paste a block of code that is longer than the terminal height. Being able to scroll up and show my students what was pasted is an essential feature for me when teaching.
CPython versions tested on:
3.14
Operating systems tested on:
Linux
Bug report
Bug description:
In Python 3.14 beta 2, pasting code that has more lines than the height of my terminal window will result in the lines just above the terminal window being blank.
To reproduce:
class Point:line or__slots__line for example)This is essentially the same as the "Blank lines" section of issue #119517.
I assume this is being done for performance reasons, but this is going to make my life harder when teaching. I often use a large font when teaching, so it's not uncommon that I'll paste a block of code that is longer than the terminal height. Being able to scroll up and show my students what was pasted is an essential feature for me when teaching.
CPython versions tested on:
3.14
Operating systems tested on:
Linux