Python3.13 is mishandling OSC 633 sequences #126131
Labels
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
stdlib
Python modules in the Lib dir
topic-repl
Related to the interactive shell
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
Bug Report
Related: #122622
Bug description:
VS Code has set of custom escape sequences that allow shell integration.
We have a custom pythonrc file that we set equal to user's PYTHONSTARTUP file and effectively override user's sys.ps1(this can be improved once we have the pre-exec hook mentioned in the related PR) This allows us to get features that VS Code shell integration offers.
With the new REPL that 3.13 offers, we have noticed that the cursor location is wrongly placed whenever REPL from Python3.13 is launched from our terminal. See:
After investigation we found out it is because Python3.13 is somehow handling our custom sequences such as
instead of ignoring them as it did in the previous versions of Python. This is what is leads to the wrong cursor location at the end. Removing these sequences brought back the cursor to the "right" position in terminal.
CPython should ignore these custom sequences instead of wrongly handling them.
CPython versions tested on:
3.13
Operating systems tested on:
macOS
Linked PR
coming soon (would appreciate advice on where to start digging in but I assume it is somewhere https://github.com/python/cpython/tree/main/Lib/_pyrepl)
The text was updated successfully, but these errors were encountered: