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
Addressing concerns from: #24256 and enter issues such as #25043
We can enable Python shell integration, and allow user to use lsp completion for Python REPL, for those using Python > 3.13 if we disable PyREPL for users before the actual fix.
We would disable PyREPL by exporting PYTHON_BASIC_REPL=1 in user's environment variable collection.
Then we would allow Python shell integration for people with Python > 3.13.
We should also eventually make Python shell integration enabled as default true.
With this we would be able to shell integration enable for >= 3.13 safe from cpython upstream fix to adjust terminal cursor to correct place; python/cpython#126131
Not sure if I'm missing something, but I still get indentation errors with the latest 1.102.0 release (Python Extension is 2025.10.0):
Python 3.13.5 (main, Jun 12 2025, 12:22:43) [Clang 20.1.4 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def f(x):
... if x < 0:
... return x - 1
... elif x == 0:
... return 0
... else:
... return x + 1
...
File "<python-input-0>", line 4
elif x == 0:
IndentationError: unexpected indent
This is on running the following code with ShiftEnter:
Not sure if this is the same issue I experienced, but I had a similar indentation error message because the file contained an error multiple lines below the code being executed. I also had a message to disable "smart send"...
Is there a way to unset the disablement without having to unset PYTHON_BASIC_REPL?
I don't rely on the run in console feature but I do rely on the new REPL a lot.
Sorry about this Clemens Brunner (@cbrnr) I confirmed the regression filed issue: #25295
Will work to get this solved in the next point release and will let you know once the fix is out for pre-release.
Patrick Toche (@ptoche) That issue would probably bc you had old python code (such from python2) or syntactically wrong Python code that you were trying to execute with smart send.
Hi all, I've put out a fix in the pre-release version of Python extension. Please try out vscode-insiders python pre-release version.
Turning off python shell integration would disable PyREPL and turning on python shell integration would allow PyREPL.
Make sure to restart extension, give it a proper reload before testing!
@ptoche That issue would probably bc you had old python code (such from python2) or syntactically wrong Python code that you were trying to execute with smart send.
as you type code, it is syntactically incorrect for at least a few minutes.
My solution was to ditch vscode, at least temporarily...
To re-enable PyREPL, you can turn off python.terminal.shellIntegration.enabled to be false. python/cpython#126131 leads to weird cursor issue in VS Code, hence such a bold move atm.
Activity
Disable PyREPL (microsoft#25216)
[-]Disable PyREPL for > 3.13[/-][+]Disable PyREPL for >= 3.13[/+]cbrnr commentedon Jul 11, 2025
Not sure if I'm missing something, but I still get indentation errors with the latest 1.102.0 release (Python Extension is 2025.10.0):
This is on running the following code with ShiftEnter:
ptoche commentedon Jul 13, 2025
Not sure if this is the same issue I experienced, but I had a similar indentation error message because the file contained an error multiple lines below the code being executed. I also had a message to disable "smart send"...
johnslavik commentedon Jul 16, 2025
Is there a way to unset the disablement without having to
unset PYTHON_BASIC_REPL?I don't rely on the run in console feature but I do rely on the new REPL a lot.
anthonykim1 commentedon Jul 17, 2025
Sorry about this Clemens Brunner (@cbrnr) I confirmed the regression filed issue: #25295
Will work to get this solved in the next point release and will let you know once the fix is out for pre-release.
Patrick Toche (@ptoche) That issue would probably bc you had old python code (such from python2) or syntactically wrong Python code that you were trying to execute with smart send.
Bartosz Sławecki (@bswck) Yes! Trying to make a setting for this related to shell integration #25240
anthonykim1 commentedon Jul 18, 2025
Hi all, I've put out a fix in the pre-release version of Python extension. Please try out vscode-insiders python pre-release version.
Turning off python shell integration would disable PyREPL and turning on python shell integration would allow PyREPL.
Make sure to restart extension, give it a proper reload before testing!
Thanks
ptoche commentedon Aug 27, 2025
as you type code, it is syntactically incorrect for at least a few minutes.
My solution was to ditch vscode, at least temporarily...
anthonykim1 commentedon Oct 1, 2025
To re-enable PyREPL, you can turn off
python.terminal.shellIntegration.enabledto be false.python/cpython#126131 leads to weird cursor issue in VS Code, hence such a bold move atm.