]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-117187: Fix XML tests for vanilla Expat <2.6.0 (GH-117203)
authorSebastian Pipping <sebastian@pipping.org>
Tue, 26 Mar 2024 01:48:27 +0000 (02:48 +0100)
committerGitHub <noreply@github.com>
Tue, 26 Mar 2024 01:48:27 +0000 (18:48 -0700)
commit9f74e86c78853c101a23e938f8e32ea838d8f62e
tree56052a234b4db2a7410c47c04381fe0cfb64492a
parent872e212378ef86392069034afd80bb53896fd93d
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)
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]