gh-155485: Skip `test_pyexpat.test_subparser_inherits_reparse_deferral` when Expat < 2.6.0 (#155554)

StanFromIreland <[email protected]> Tue, 11 Aug 2026 11:52:48 -0400 (EDT)
Newsgroups gmane.comp.python.cvs
Message-ID <[email protected]>
https://github.com/python/cpython/commit/76d556e7a33d982f18a935f289e82d205696aadd
commit: 76d556e7a33d982f18a935f289e82d205696aadd
branch: main
author: Miro HronĨok <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-08-11T16:52:35+01:00
summary:

gh-155485: Skip `test_pyexpat.test_subparser_inherits_reparse_deferral` when Expat < 2.6.0 (#155554)

Assisted-By: Claude Opus 4.6
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 9869f0e88448cf..baa4f178427d53 100644
--- a/Lib/test/test_pyexpat.py
+++ b/Lib/test/test_pyexpat.py
@@ -1045,6 +1045,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]