-
-
Notifications
You must be signed in to change notification settings - Fork 33k
gh-139400: Make sure that parent parsers outlive their subparsers in pyexpat
#139403
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
+65
−0
Merged
Changes from 11 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
e1c0470
pyexpat.c: Disallow collection of in-use parent parsers
hartwork 3b0afda
Add a regression test for issue 139400
hartwork 8f70991
Add news item for issue 139400
hartwork a63bd34
Improve test's docstring
hartwork 22417ec
Simplify xmlparseobject_ to xmlparseobject
hartwork 20caacd
Leverage Py_CLEAR
hartwork f8c58a3
Simplify call to Py_CLEAR
hartwork f1e3e36
Streamline docsting of ParentParserLifetimeTest
hartwork 1b2937d
pyexpat.c: Adjust whitespace around pointer
hartwork 8c5a4e8
Re-write news item
hartwork a6f5520
Turn parent into a PyObject pointer
hartwork 4470cea
Add missing parent visit to xmlparse_traverse
hartwork 3759ac7
Re-write comment about mission of "PyObject *parent"
hartwork 30598a9
Add whitespace as requested
hartwork 6d3c424
Add more tests
hartwork 66b77e0
Add comment about Py_CLEAR(self->parent) to xmlparse_clear
hartwork 455787f
Add missing full stops to docstrings
hartwork a669454
Drop reference to XML_ExternalEntityParserCreate
hartwork a91ed6b
Make test test_cycle waterproof
hartwork c056cfe
Full stops and sentences
hartwork 12b8989
Drop test test_cycle
hartwork 0541d6f
Drop now-unused import
hartwork 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
4 changes: 4 additions & 0 deletions
4
Misc/NEWS.d/next/Core_and_Builtins/2025-09-29-00-01-28.gh-issue-139400.X2T-jO.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,4 @@ | ||
:mod:`xml.parsers.expat`: Make sure that parent Expat parsers are only | ||
garbage-collected once they are no longer referenced by subparsers created | ||
by :meth:`~xml.parsers.expat.xmlparser.ExternalEntityParserCreate`. | ||
Patch by Sebastian Pipping. |
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
Oops, something went wrong.
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.