Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 21, 2025

Conversation

eendebakpt
Copy link
Contributor

@eendebakpt eendebakpt commented Nov 10, 2024

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.

Copy link
Member

@vstinner vstinner left a comment

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
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?

@pablogsal pablogsal added the needs backport to 3.13 bugs and security fixes label Jan 21, 2025
@pablogsal pablogsal merged commit d147e5e into python:main Jan 21, 2025
46 checks passed
@miss-islington-app
Copy link

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

bedevere-app bot commented Jan 21, 2025

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

@bedevere-app bedevere-app bot 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
Contributor Author

@pablogsal I added some tests in #129325

Sign up for free to 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