-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-119310: Fix encoding when reading old history file #121779
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
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
1 similar comment
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
2ac46fd
to
d009abf
Compare
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
def test_readline_history_file(self): | ||
# skip, if readline module is not available | ||
readline = import_module('readline') | ||
if readline.backend != "editline": | ||
self.skipTest("GNU readline is not affected by this issue") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since what we're trying to do is to fix reading old history files, you could add three history files to test data:
- an editline history file
- a readline history file
- a pyrepl history file with multiline blocks
That way all three would have tests and we wouldn't regress on all three fronts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will have to wait for a future enhancement.
GH-123784 is a backport of this pull request to the 3.13 branch. |
This fixes the problem reading history files created with previous versions of python (that where using GNU readline). Checks that the file was created by readline and change the encoding to
unicode-escape
.