-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-112292 : Catch import error conditions with readline hooks #112313
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
ericsnowcurrently
merged 19 commits into
python:main
from
tonybaloney:robust_readline_hook
Nov 28, 2023
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e8d2115
Catch import error conditions with readline callback hook on_startup_…
tonybaloney d56fb47
Add news entry
tonybaloney 6e9e66d
Move the GIL release to after setting an error
tonybaloney 364d8d5
remove else
tonybaloney 4ddf510
Merge branch 'robust_readline_hook' of github.com:tonybaloney/cpython…
tonybaloney 8890f5c
Harden the on_pre_input_hook
tonybaloney f4580c8
Replace uses of a global macro with no error checking with a function…
tonybaloney b408004
Don't set exceptions on non-Python calls.
tonybaloney 30a1a73
Acquire GIL before checking module state since it will require tstate…
tonybaloney 64cfda5
Merge remote-tracking branch 'origin/main' into robust_readline_hook
tonybaloney 451513b
Update Modules/readline.c
tonybaloney 59239f0
Update Modules/readline.c
tonybaloney cf72dc4
Apply suggestions from code review
tonybaloney aa75a62
Update Modules/readline.c
tonybaloney 30c79d7
fixup variable name
tonybaloney ae57bed
Merge branch 'robust_readline_hook' of github.com:tonybaloney/cpython…
tonybaloney b1fa25b
Use simpler assertion
tonybaloney ff038f0
Simpler hook check
tonybaloney 43d609d
Don't assert error check
tonybaloney File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
Misc/NEWS.d/next/Library/2023-11-22-19-43-54.gh-issue-112292.5nDU87.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Fix a crash in :mod:`readline` when imported from a sub interpreter. Patch | ||
by Anthony Shaw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.