-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Programmatically sending indented code to 3.13 REPL causes indentation error #126449
Comments
And /cc @ambv |
@anthonykim1, you can programatically paste code using bracketed pasting, in which case additional indentation won't be inserted by the REPL. |
|
The REPL accepts interactive input and automatically indents. How is that a bug? Do you have a suggestion how a TTY application is supposed to automatically discover "programmatic input"? AFAICT this is what bracketed paste is for, it's literally for pre-formatted input. |
Thanks everyone for your help. I've just recently merged some changes in the vscode-python repo with the suggested bracketed paste mode and things are looking good so far :) |
Bug report
Bug description:
Bug Report
Bug Description
Hello, I am working on improving REPL and Terminal experience for people using VS Code Python, and we have been experiencing the indentation issue similar to one you would see in #124096.
I do realize there are indentation error issue mentioned such as one above, but I wasn't sure if it is rooted from same problem since the one in #124096 is Windows, and I am seeing it on MacOS ARM (tested on zsh, xterm.js since we are talking about terminal in VS Code).
From what I've seen, the indentation gets messed up when we programmatically send a indented string into the 3.13 REPL launched from the VS Code Terminal. If I were to send the exact same Python code to 3.13 and to non-3.13(such as 3.9) REPL programmatically, it will lead to two different result:
What I found surprising during my investigation is that copy-pasting the exact same code, works fine when I manually copy and paste to external Terminal (Both outside of VS Code and also inside VS Code Terminal)
I'm suspecting that there are either:
Another issue related to 3.13 REPL in VS Code: #126131
Thanks in advance for your help and care.
/cc @brettcannon @pablogsal @Tyriar
CPython versions tested on:
3.13
Operating systems tested on:
macOS
The text was updated successfully, but these errors were encountered: