Skip to content

[3.14] gh-83895: Accept input larger than 2 GiB in the C implementation of ElementTree (GH-156746) - #156772

Merged
serhiy-storchaka merged 1 commit into
python:3.14from
serhiy-storchaka:backport-9259e8ba-3.14
Sep 1, 2026
Merged

[3.14] gh-83895: Accept input larger than 2 GiB in the C implementation of ElementTree (GH-156746)#156772
serhiy-storchaka merged 1 commit into
python:3.14from
serhiy-storchaka:backport-9259e8ba-3.14

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 1, 2026

Copy link
Copy Markdown
Member

XMLParser.feed() and ElementTree.parse() raised OverflowError, because Expat
takes the length as an int. The data is now fed to Expat in chunks of 1 MiB,
as xml.parsers.expat does since bpo-17089, so the pure Python implementation
already accepted such input.
(cherry picked from commit 9259e8b)

…n of ElementTree (pythonGH-156746)

XMLParser.feed() and ElementTree.parse() raised OverflowError, because Expat
takes the length as an int.  The data is now fed to Expat in chunks of 1 MiB,
as xml.parsers.expat does since bpo-17089, so the pure Python implementation
already accepted such input.
(cherry picked from commit 9259e8b)
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) September 1, 2026 13:52
@serhiy-storchaka
serhiy-storchaka merged commit 8becd16 into python:3.14 Sep 1, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant