You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use sendText to send Python code to Terminal REPL for Python >= 3.13 (#24765)
Resolves:
#24674 (comment)
Use sendText to send Python code to Terminal REPL for Python >= 3.13 to
prevent keyboard interrupt.
Relevant file context from VS Code:
https://github.com/microsoft/vscode/blob/f9c927cf7a29a59b896b6cdac2d8b5d2d43afea5/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts#L906
It seems like we are on this edge scenario where generic terminal shell
integration is enabled (so executeCommand can be used), but we have
temporarily disabled Python shell integration for Python >= 3.13 (and of
course sending the relevant escape sequences such as the commandLine
itself to VS Code). Why?
* python/cpython#126131 placing user's mouse
cursor position at odd place.
Why and where I think the keyboard interrupt is happening:
Python extension tries to executeCommand when sending commands to
terminal REPL >= Python3.13, where we are not sending shell integration
escape sequences from the Python side.
* I think this is why it is attaching the keyboard interrupt all the
sudden, because VS Code see that Python extension is requesting
executeCommand but is not sending the commandLine escape sequence to
them. For every other versions < 3.13 (where we send all the shell
integration escape sequences including the commandLine), this does not
happen.
test('Ensure sendText is NOT called when Python shell integration and terminal shell integration are both enabled - Mac, Linux',async()=>{
261
+
test('Ensure sendText is NOT called when Python shell integration and terminal shell integration are both enabled - Mac, Linux && Python < 3.13',async()=>{
test('Ensure sendText is called when Python shell integration and terminal shell integration are both enabled - Mac, Linux && Python >= 3.13',async()=>{
0 commit comments