-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Python3.13 All functions fail to send: IndentationError: unexpected indent #24256
Comments
I am experiencing the same. Version: 1.94.2 (system setup) |
Same behaviour and error, only happens with python 3.13, 3.12 works fine. |
Thanks for the bug report! We investigate issues in order based on priority and severity, which includes the impact it has on your ability to use the extension to do productive work, and the number of people affected. If other users come forward and leave a comment demonstrating they are seeing/reproducing the problem then we will raise this issue's priority. Thanks for understanding and the patience! Please go ahead and upvote this meanwhile so that we can further acknowledge the severity. |
Regarding severity, it greatly inhibited my ability to do work. Testing individual blocks of code is no longer a viable option for me. I cannot copy paste, I cannot shift+enter, I cannot right click and run in interactive window... I have to modify the python code, then to non-interactively test I run the entire program that calls the python. Dramatic decrease in productivity as a result of tedious testing and debugging. |
For me and students of our classes the impact is also huge. We teach the first steps of Python programming by letting them run blocks of code using shift+enter, but with the new behavior this is no longer an option at all. |
I just wanted to add that this also severely impacts how I use Python 3.13 in Visual Studio Code. For those looking for a workaround (other than downgrading Python to ≤ 3.12 or setting the env variable |
BTW, just to let Windows users know that this currently does not work in Windows Terminal either, see python/cpython#124119. Not sure if it help resolving the issue here though. |
I updated VS Code to the most updated version (1.95.0) but still have the same error with Python 3.13 on Windows and Mac OS. |
Thanks @cbrnr for
Thanks everyone for the feedback here. Team is actively looking into resolving this, but please try out the "Native REPL" setting to send code and execute in Native REPL instead of terminal meanwhile. |
@cbrnr The type of indentation error we can get seems very similar from what you mentioned python/cpython#124096 (issue from referenced PR). I think the indentation problem is not contained for just windows as we are experiencing for MacOS and linux too. |
Discussed in #24222
Originally posted by ddxv October 2, 2024
I recently fired up Python3.13rc2 but quickly found that any lines I send to the terminal do not work, specifically anything with additional line breaks or with indentation.
The new REPL, as I'm sure you know, autoindents for users. So it appears I'm getting a new indent for each line + the existing indent, causing a deeper and deeper indent even on a flat function. As you can see in the screenshot:
This inevitably leads to:
IndentationError: unexpected indent
I'm opening a discussion because I don't see others mentioning this for Python 3.13, so I was not sure if this is actually a bug or something unique to my settings?
If others are encountering this, happy to turn this into a ticket.
The text was updated successfully, but these errors were encountered: