Pasting into Python REPL broken in recent brew Python builds? #428
Unanswered
tzs
asked this question in
Everyday usage
Replies: 1 comment 4 replies
-
Strange. Are you unable to reproduce this on a non-Homebrew Python3.9? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Anyone else seeing this? Thought I'd ask here before submitting an issue, in case I'm overlooking something stupid.
Sometime in the last month, pasting into the Python REPL in a terminal stopped working. At first I though it might be a Big Sur thing, but since then I've installed a fresh Mojave in a VM and installed Python3 with a freshly installed Brew, and reproduced the problem.
Here is an example, on Big Sur using Apple's Python3 to show the expected behavior, which was also the behavior of Brew Python3 previously. In the following, CTRL-V has pressed when the REPL first prompts for input, and then RETURN is pressed:
Here is the behavior with Brew installed Python3:
On the fresh install of Mojave and Brew in the VM, the same problem occurs with Python 3.7 and Python 3.8, so this does not appear to be due to some upstream change in Python 3.9. (On the VM I installed and tested 3.7 first, so it is not the case that the 3.9 install messed something up that would also affect older versions).
It appears that for some reason recent Brew Python3 builds are seeing multiline pastes as a single line.
One clue to what might be going on is that if what I paste contains tabs, and I use iTerm2 as my terminal, on Apple Python3 and on older Brew installs of Python3 iTerm2 puts up a dialog asking what to do with the tabs in the paste. On recent Brew Python3 installs, it does NOT ask.
That suggests that the recent Brew Python builds are doing something different with the way they initialize the tty device.
Beta Was this translation helpful? Give feedback.
All reactions