]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203) (GH-117245)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 26 Mar 2024 02:08:28 +0000 (03:08 +0100)
committerGitHub <noreply@github.com>
Tue, 26 Mar 2024 02:08:28 +0000 (02:08 +0000)
commit2f8d3a17d9b0f086d1585e8753176e268c03d533
treea55dc7543fe2a923a80c8cae43718829b0f1c25a
parente64c7d3e196b73b3ce03de42f0acd554cbd3706d
[3.11] gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203) (GH-117245)

gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203)

This fixes XML unittest fallout from the https://github.com/python/cpython/issues/115398 security fix.  When configured using `--with-system-expat` on systems with older pre 2.6.0 versions of libexpat, our unittests were failing.

* sax|etree: Simplify Expat version guard where simplifiable

Idea by MatÄ›j Cepl

* sax|etree: Fix reparse deferral tests for vanilla Expat <2.6.0

This *does not fix* the case of distros with an older version of libexpat with the 2.6.0 feature backported as a security fix.  (Ubuntu is a known example of this with its libexpat1 2.5.0-2ubunutu0.1 package)
(cherry picked from commit 9f74e86c78853c101a23e938f8e32ea838d8f62e)

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
Lib/test/test_sax.py
Lib/test/test_xml_etree.py
Misc/NEWS.d/next/Tests/2024-03-24-23-49-25.gh-issue-117187.eMLT5n.rst [new file with mode: 0644]