Repository navigation
Python 3.14 REPL blanks links above terminal rows when pasting #135055
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Jun 3, 2025 - addedtopic-replRelated to the interactive shellRelated to the interactive shell3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixes
on Jun 3, 2025 - addedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
on Jun 7, 2025 This is still an issue with the 3.14rc2 and this may keep me from using 3.14 while teaching. The syntax highlighting is really great, but this regression is a pretty big issue when live-coding in the REPL.
@ambv, assuming this change in behavior was to improve performance while pasting, would not highlighting large blocks of text (or not highlighting text shown before the current terminal view) improve performance enough to allow showing the whole text block?
IPython does what we're doing now as well. Code that is outside of the visible viewport is not emitted. We are still emitting empty lines, which is in itself a bug (it's not useful and IPython doesn't do it). I'll fix that.
The change was indeed made to make pasting faster, so I'll look into whether bulk-emitting non-highlighted code past the scrollback barrier is feasible.
Reacted by Trey HunnerMaybe emitting highlighted code past the scrollback can be done in a different paste mode like
F4: enter "full" paste mode (press again to exit)
and / or using CTRL-SHIFT-v (or whatever short cut seems more appropriate)?
- marked Pasting large blocks of code into the console causes the code to be truncated #137979 as a duplicate of this issue
on May 30, 2026

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