You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
high CPU usage and freezing in Python REPL with half space character (U+200C) #124927
When entering comments in Python's REPL that contain a Half Space character (U+200C) the REPL experiences 100% CPU usage and becomes unresponsive (freezes) when using the up arrow to retrieve previous code line
Paste the following lines (for Windows, use F3 to activate paste mode):
# Half space text# Up arrow key
Press the up arrow key to navigate back to the previous line (# Half space text)
(If it doesn't work for you, go to the end of the line # Up arrow key and press the up button. It should freeze now. You can use Ctrl+C to interrupt the program, which resolves the freeze.)
in terminal this looks like this:
>>> # Half space \u200ctext
... # Up arrow key
This problem also exists in Windows when using F3 (to active the paste mode):
In Linux no need to active paste mode:
I can't check if this problem exists on previous python version because they break each line so i cant use up arrow to go to the previous line.
Half Space character is often used in Persian and I think in other languages that utilize right-to-left . It helps in adjusting the spacing between characters for better readability
Also a small note: when I use the half space at the end and no text after it, there is no problem:
I hope this message finds you well. I was wondering if anyone is currently addressing this issue. If it’s alright, would it be possible for me to create a PR? I may already find the cause of the mistake.
Thank you!
Activity
qqwqqw689 commentedon Oct 3, 2024
My python versoin is 3.11.5. It seems nothing happen in win10.
skirpichev commentedon Oct 3, 2024
Then you, probably, use old repl. I suppose OP used new repl, enabled in the CPython 3.13 by default, see: https://docs.python.org/3.13/whatsnew/3.13.html#a-better-interactive-interpreter
imfeh2 commentedon Oct 5, 2024
I hope this message finds you well. I was wondering if anyone is currently addressing this issue. If it’s alright, would it be possible for me to create a PR? I may already find the cause of the mistake.
Thank you!
skirpichev commentedon Oct 5, 2024
@imfeh2, sure. So far nobody confirm that can reproduce issue.
Feel free to open a PR, see also https://devguide.python.org/getting-started/pull-request-lifecycle/#making-good-prs
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
pythongh-124927: Fix conversion issue between coordinates and positio…
gh-124927: Fix conversion issue between coordinates and position in R…
pythongh-124927: Fix conversion issue between coordinates and positio…
[3.13] gh-124927: Fix conversion issue between coordinates and positi…