-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Regression in 9.0.1 from 8.33.0 - No longer dedents inputs. #14818
Copy link
Copy link
Closed
Description
Running ipython in the terminal if I copy and paste this block of code:
# Comment
x = 1with the leading indentation on both lines, in 8.33.0 it works fine. IPython recognizes the code has consistent leading whitespace, presumably dedents it under the hood, and executes it.
In [1]: # Comment
...: x = 1
In [2]: However, in 9.0.1
In [1]: # Comment
...: x = 1
...:
Cell In[1], line 2
x = 1
^
IndentationError: unexpected indentI'm not sure if this was intentional or not, but this is a major usability issue for me. My entire workflow is based around copy/pasting chunks of code. I've been working this way for 15 years. I've written libraries around it. There is a PR awaiting merge in CPython to add this dedent feature to "python -c".
If this is intentional, I beg the maintainers to reconsider. Otherwise, this is a major bug.
Tested on Ubuntu 24.04 on CPython 3.13.2 and 3.11.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels