Matej Cepl
10154267fc
- Tests - gh-101525: Skip test_gdb if the binary is relocated by BOLT. Patch by Donghee Na. - Security - gh-123678: Upgrade libexpat to 2.6.3 - gh-121285: Remove backtracking from tarfile header parsing for hdrcharset, PAX, and GNU sparse headers (bsc#1230227, CVE-2024-6232). - Library - gh-123270: Applied a more surgical fix for malformed payloads in zipfile.Path causing infinite loops (gh-122905) without breaking contents using legitimate characters (bsc#1229704, CVE-2024-8088). - gh-123213: xml.etree.ElementTree.Element.extend() and Element assignment no longer hide the internal exception if an erronous generator is passed. Patch by Bar Harel. - gh-85110: Preserve relative path in URL without netloc in urllib.parse.urlunsplit() and urllib.parse.urlunparse(). - gh-123067: Fix quadratic complexity in parsing "-quoted cookie values with backslashes by http.cookies (bsc#1229596, CVE-2024-7592) - gh-122903: zipfile.Path.glob now correctly matches directories instead of silently omitting them. - gh-122905: zipfile.Path objects now sanitize names from the zipfile. - gh-122695: Fixed double-free when using gc.get_referents() with a freed asyncio.Future iterator. - gh-116263: logging.handlers.RotatingFileHandler no longer rolls over empty log files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=66
68 lines
2.4 KiB
Diff
68 lines
2.4 KiB
Diff
---
|
|
Lib/test/test_pyexpat.py | 4 ++++
|
|
Lib/test/test_sax.py | 3 +++
|
|
Lib/test/test_xml_etree.py | 10 ++++++++++
|
|
3 files changed, 17 insertions(+)
|
|
|
|
--- a/Lib/test/test_pyexpat.py
|
|
+++ b/Lib/test/test_pyexpat.py
|
|
@@ -794,6 +794,10 @@ class ReparseDeferralTest(unittest.TestC
|
|
self.assertEqual(started, ['doc'])
|
|
|
|
def test_reparse_deferral_disabled(self):
|
|
+ if expat.version_info < (2, 6, 0):
|
|
+ self.skipTest(f'Expat {expat.version_info} does not '
|
|
+ 'support reparse deferral')
|
|
+
|
|
started = []
|
|
|
|
def start_element(name, _):
|
|
--- a/Lib/test/test_sax.py
|
|
+++ b/Lib/test/test_sax.py
|
|
@@ -1240,6 +1240,9 @@ class ExpatReaderTest(XmlTestBase):
|
|
|
|
self.assertEqual(result.getvalue(), start + b"<doc></doc>")
|
|
|
|
+ @unittest.skipIf(pyexpat.version_info < (2, 6, 0),
|
|
+ f'Expat {pyexpat.version_info} does not '
|
|
+ 'support reparse deferral')
|
|
def test_flush_reparse_deferral_disabled(self):
|
|
result = BytesIO()
|
|
xmlgen = XMLGenerator(result)
|
|
--- a/Lib/test/test_xml_etree.py
|
|
+++ b/Lib/test/test_xml_etree.py
|
|
@@ -121,6 +121,11 @@ ATTLIST_XML = """\
|
|
</foo>
|
|
"""
|
|
|
|
+IS_SLE_15_6 = os.environ.get("SLE_VERSION", "") == "0150600"
|
|
+fails_with_expat_2_6_0 = (unittest.expectedFailure
|
|
+ # 2.4 version patched in SLE
|
|
+ if IS_SLE_15_6 and pyexpat.version_info >= (2, 4, 0) else
|
|
+ lambda test: test)
|
|
def checkwarnings(*filters, quiet=False):
|
|
def decorator(test):
|
|
def newtest(*args, **kwargs):
|
|
@@ -1424,9 +1429,11 @@ class XMLPullParserTest(unittest.TestCas
|
|
self.assert_event_tags(parser, [('end', 'root')])
|
|
self.assertIsNone(parser.close())
|
|
|
|
+ @fails_with_expat_2_6_0
|
|
def test_simple_xml_chunk_1(self):
|
|
self.test_simple_xml(chunk_size=1, flush=True)
|
|
|
|
+ @fails_with_expat_2_6_0
|
|
def test_simple_xml_chunk_5(self):
|
|
self.test_simple_xml(chunk_size=5, flush=True)
|
|
|
|
@@ -1651,6 +1658,9 @@ class XMLPullParserTest(unittest.TestCas
|
|
|
|
self.assert_event_tags(parser, [('end', 'doc')])
|
|
|
|
+ @unittest.skipIf(pyexpat.version_info < (2, 6, 0),
|
|
+ f'Expat {pyexpat.version_info} does not '
|
|
+ 'support reparse deferral')
|
|
def test_flush_reparse_deferral_disabled(self):
|
|
parser = ET.XMLPullParser(events=('start', 'end'))
|
|
|