Skip to content

gh-126332: Fix pyrepl crash for double ctrl-z in line overflow - #126650

Merged
pablogsal merged 5 commits into
python:mainfrom
eendebakpt:pyrepl_ctrl_z
Jan 21, 2025
Merged

gh-126332: Fix pyrepl crash for double ctrl-z in line overflow#126650
pablogsal merged 5 commits into
python:mainfrom
eendebakpt:pyrepl_ctrl_z

Conversation

@eendebakpt

@eendebakpteendebakpt commented Nov 10, 2024

Copy link
Copy Markdown
Contributor

Notes:

  • Fix crash of pyrepl in windows when a double ctrl-z is entered on an overflowing line.
  • The fix can also be put into the str_width method instead of the wlen method. Both of these are not documented, so I am not sure whether one location should be preferred over the other.

@vstinnervstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to add a new Lib/test/test_pyrepl/test_utils.py file and add tests on wlen() and str_width() functions?

@pablogsal

Copy link
Copy Markdown
Member

Would it be possible to add a new Lib/test/test_pyrepl/test_utils.py file and add tests on wlen() and str_width() functions?

I think we should do this in a separate PR. @eendebakpt do you want to open a PR for that?

@pablogsalpablogsal added the needs backport to 3.13 bugs and security fixes label Jan 21, 2025
@pablogsal
pablogsal merged commit d147e5e into python:mainJan 21, 2025
@miss-islington-app

Copy link
Copy Markdown

Thanks @eendebakpt for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 21, 2025
…ythonGH-126650)
(cherry picked from commit d147e5e)
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
@bedevere-app

Copy link
Copy Markdown

GH-129154 is a backport of this pull request to the 3.13 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.13 bugs and security fixes label Jan 21, 2025
pablogsal pushed a commit that referenced this pull request Jan 21, 2025
…GH-126650) (#129154)
gh-126332: Fix pyrepl crash for double ctrl-z in line overflow (GH-126650)
(cherry picked from commit d147e5e)
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
@eendebakpt

Copy link
Copy Markdown
ContributorAuthor

@pablogsal I added some tests in #129325

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@eendebakpt@pablogsal@vstinner