Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-146169: correctly handle re-entrant parsing calls in Expat handlers#146566

Open
picnixz wants to merge 7 commits into
python:mainpython/cpython:mainfrom
picnixz:fix/expat/parse-recursive-146169picnixz/cpython:fix/expat/parse-recursive-146169Copy head branch name to clipboard
Open

gh-146169: correctly handle re-entrant parsing calls in Expat handlers#146566
picnixz wants to merge 7 commits into
python:mainpython/cpython:mainfrom
picnixz:fix/expat/parse-recursive-146169picnixz/cpython:fix/expat/parse-recursive-146169Copy head branch name to clipboard

Conversation

@picnixz

@picnixz picnixz commented Mar 28, 2026

Copy link
Copy Markdown
Member

Comment thread Misc/NEWS.d/next/Library/2026-03-28-10-27-46.gh-issue-146169.RBF1xp.rst Outdated
@picnixz

picnixz commented Mar 28, 2026

Copy link
Copy Markdown
Member Author

@hartwork I'd like your feedback here to know whether there are other places that I need to consider. I will work on the encoding issue described in the GH issue afterwards unless they are interconnected. TiA!

@picnixz picnixz added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Mar 28, 2026

@hartwork hartwork left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hartwork I'd like your feedback here to know whether there are other places that I need to consider. I will work on the encoding issue described in the GH issue afterwards unless they are interconnected. TiA!

@picnixz they seem interconnected, yes. Here's what I found:

Comment thread Lib/test/test_pyexpat.py Outdated
Comment thread Lib/test/test_pyexpat.py Outdated
Comment thread Modules/pyexpat.c Outdated
@picnixz

picnixz commented Apr 11, 2026

Copy link
Copy Markdown
Member Author

For the encoding issue, I will actually do it in a separate PR. It's not really a re-entrancy call issue, but rather an issue where you call XML_Parse() first and then you recall it later with a different string and hence have a different possible encoding.

@picnixz picnixz requested a review from hartwork April 11, 2026 13:48
Comment thread Misc/NEWS.d/next/Library/2026-03-28-10-27-46.gh-issue-146169.RBF1xp.rst Outdated
Comment thread Misc/NEWS.d/next/Library/2026-03-28-10-27-46.gh-issue-146169.RBF1xp.rst Outdated
Comment thread Lib/test/test_pyexpat.py Outdated
@picnixz picnixz requested a review from hartwork April 12, 2026 16:00

@hartwork hartwork left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@picnixz probably good to merge by now(, I lack permissions to approve).

@picnixz

picnixz commented Apr 12, 2026

Copy link
Copy Markdown
Member Author

Thanks! I've left my dev session so I'll merge it tomorrow. Thanks for the review! I'll also address the encoding issue separately

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 18, 2026
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 30, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.