Programmatically sending REPL to 3.13 leads to indentation error

Hello Python folks, hope you are all doing well.

I’m working to develop REPL and Terminal experience for Python in VS Code.

Although I am very much appreciating the work that went to make this new REPL happen, it is causing unexpected indentation problems in: Programmatically sending indented code to 3.13 REPL causes indentation error · Issue #126449 · python/cpython · GitHub

I was wondering if anyone else tried to programmatically send code to their Python REPL and started getting indentation errors all the sudden with the new 3.13 REPL.

I’ve seen manually copy-pasting for Windows Python 3.13 REPL is a problem too in Pasting a function definition does not work in 3.13 REPL with Windows Terminal · Issue #124096 · python/cpython · GitHub. This is very similar to the indentation error VS Code users with Python extension would get when they send their code to the REPL in terminal.

Surprisingly enough, manual copy and pasting on external zsh terminal(MacOS ARM) works fine (with correct indentation), which further confuses me.
Would love to know if anybody went through similar problem or know what might be causing this. Thanks in advance!

2 Likes