[3.13] gh-155485: Skip `test_pyexpat.test_subparser_inherits_reparse_deferral` when Expat < 2.6.0 (GH-155554) (#155573)

StanFromIreland <[email protected]> Tue, 11 Aug 2026 12:17:42 -0400 (EDT)
Newsgroups gmane.comp.python.cvs
Message-ID <[email protected]>
https://github.com/python/cpython/commit/3d80925baee1c566c7d0dd31fb04808384eb5072
commit: 3d80925baee1c566c7d0dd31fb04808384eb5072
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-08-11T16:17:27Z
summary:

[3.13] gh-155485: Skip `test_pyexpat.test_subparser_inherits_reparse_deferral` when Expat < 2.6.0 (GH-155554) (#155573)

(cherry picked from commit 76d556e7a33d982f18a935f289e82d205696aadd)

Assisted-By: Claude Opus 4.6
Co-authored-by: Miro HronĨok <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>

files:
M Lib/test/test_pyexpat.py

diff --git a/Lib/test/test_pyexpat.py b/Lib/test/test_pyexpat.py
index ae7cec6540160d..94010d5a027cbc 100644
--- a/Lib/test/test_pyexpat.py
+++ b/Lib/test/test_pyexpat.py
@@ -952,6 +952,9 @@ def test_parent_parser_outlives_its_subparsers__chain(self):
         del parser
         del subparser
 
+    # gh-155485: GetReparseDeferralEnabled always returns False with Expat <2.6.0.
+    @unittest.skipIf(not expat.ParserCreate().GetReparseDeferralEnabled(),
+                     "requires Python compiled with Expat >= 2.6.0")
     def test_subparser_inherits_reparse_deferral(self):
         for enabled in (True, False):
             parser = expat.ParserCreate()

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]