- libexpat260.patch
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python310?expand=0&rev=121
This commit is contained in:
parent
c9951abf64
commit
78ff6e46e1
@ -1,47 +0,0 @@
|
|||||||
From f2eebf3c38eae77765247791576b437ec25ccfe2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Serhiy Storchaka <storchaka@gmail.com>
|
|
||||||
Date: Sun, 11 Feb 2024 12:08:39 +0200
|
|
||||||
Subject: [PATCH] gh-115133: Fix tests for XMLPullParser with Expat 2.6.0
|
|
||||||
(GH-115164)
|
|
||||||
|
|
||||||
Feeding the parser by too small chunks defers parsing to prevent
|
|
||||||
CVE-2023-52425. Future versions of Expat may be more reactive.
|
|
||||||
(cherry picked from commit 4a08e7b3431cd32a0daf22a33421cd3035343dc4)
|
|
||||||
|
|
||||||
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
||||||
---
|
|
||||||
Lib/test/test_xml_etree.py | 6 ++++++
|
|
||||||
Misc/NEWS.d/next/Library/2024-02-08-14-21-28.gh-issue-115133.ycl4ko.rst | 2 ++
|
|
||||||
2 files changed, 8 insertions(+)
|
|
||||||
create mode 100644 Misc/NEWS.d/next/Library/2024-02-08-14-21-28.gh-issue-115133.ycl4ko.rst
|
|
||||||
|
|
||||||
--- a/Lib/test/test_xml_etree.py
|
|
||||||
+++ b/Lib/test/test_xml_etree.py
|
|
||||||
@@ -121,6 +121,10 @@ ATTLIST_XML = """\
|
|
||||||
</foo>
|
|
||||||
"""
|
|
||||||
|
|
||||||
+fails_with_expat_2_6_0 = (unittest.expectedFailure
|
|
||||||
+ if pyexpat.version_info >= (2, 6, 0) else
|
|
||||||
+ lambda test: test)
|
|
||||||
+
|
|
||||||
def checkwarnings(*filters, quiet=False):
|
|
||||||
def decorator(test):
|
|
||||||
def newtest(*args, **kwargs):
|
|
||||||
@@ -1420,9 +1424,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)
|
|
||||||
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/Misc/NEWS.d/next/Library/2024-02-08-14-21-28.gh-issue-115133.ycl4ko.rst
|
|
||||||
@@ -0,0 +1,2 @@
|
|
||||||
+Fix tests for :class:`~xml.etree.ElementTree.XMLPullParser` with Expat
|
|
||||||
+2.6.0.
|
|
@ -29,6 +29,7 @@ Thu Mar 21 07:38:15 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
|||||||
across multiple threads
|
across multiple threads
|
||||||
- Remove upstreamed patches:
|
- Remove upstreamed patches:
|
||||||
- CVE-2023-6597-TempDir-cleaning-symlink.patch
|
- CVE-2023-6597-TempDir-cleaning-symlink.patch
|
||||||
|
- libexpat260.patch
|
||||||
- Readjust patches:
|
- Readjust patches:
|
||||||
- F00251-change-user-install-location.patch
|
- F00251-change-user-install-location.patch
|
||||||
- fix_configure_rst.patch
|
- fix_configure_rst.patch
|
||||||
|
@ -192,9 +192,6 @@ Patch20: CVE-2023-27043-email-parsing-errors.patch
|
|||||||
# * gh#python/cpython#104221
|
# * gh#python/cpython#104221
|
||||||
# * gh#python/cpython#107246
|
# * gh#python/cpython#107246
|
||||||
Patch21: fix-sphinx-72.patch
|
Patch21: fix-sphinx-72.patch
|
||||||
# PATCH-FIX-UPSTREAM libexpat260.patch gh#python/cpython#115289
|
|
||||||
# Fix tests for XMLPullParser with Expat 2.6.0
|
|
||||||
Patch22: libexpat260.patch
|
|
||||||
BuildRequires: autoconf-archive
|
BuildRequires: autoconf-archive
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
Loading…
Reference in New Issue
Block a user