-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix) Prevent keyboard interrupt for Python3.13 REPL non-Windows #24555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
const config = getConfiguration('python'); | ||
const pythonrcSetting = config.get<boolean>('terminal.shellIntegration.enabled'); | ||
if ((isPythonShell && !pythonrcSetting) || (isPythonShell && isWindows())) { | ||
|
||
let isPython313 = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bug here isPython313
is not set in the code below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what happened but I meant to set it here:
isPython313 = pythonVersion?.sysVersion?.startsWith('3.13');
Further resolves: #24422
Prevent keyboard interrupt for Mac and Linux when using Python3.13
Having Python3.13 as interpreter choice and then enabling shell integration where it is normally supported (we disabled temporarily for Python3.13 due to python/cpython#126131), lead to edge case.
So although we don't override user's PS1 in Python side after checking Python3.13 is selected, we were not aware of this in typescript side, leading to wrongly using executeCommand inside Python terminal REPL (Python3.13 IDLE), instead of sendText.