-
-
Notifications
You must be signed in to change notification settings - Fork 33k
gh-90949: expose Expat API to tune exponential expansion protections #139368
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
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.
@picnixz already in pretty good shape 👍
Misc/NEWS.d/next/Library/2025-09-26-18-04-28.gh-issue-90949.YHjSzX.rst
Outdated
Show resolved
Hide resolved
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.
I've updated the PR from the web UI but I'll do the rest tomorrow.
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.
@picnixz I like this new version! 👍
One question: There were changes in here to the previous related news file. This is what it reads on main
today:
# cat Misc/NEWS.d/next/Library/2025-09-22-14-40-11.gh-issue-90949.UM35nb.rst
Add :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerActivationThreshold`
and :meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerMaximumAmplification`
to :ref:`xmlparser <xmlparser-objects>` objects to prevent use of
disproportional amounts of dynamic memory from within an Expat parser.
Patch by Bénédikt Tran.
From what we discussed here, this should probably says things about tuning also?
Should you or me create a follow-up pull request to adjust that after this?
I'll amend the NEWS as part of this PR. |
Since this is built on top of many other PRs, I'll just wait for the others to be backported first. |
This is built on top of #139366.
cc @hartwork
📚 Documentation preview 📚: https://cpython-previews--139368.org.readthedocs.build/