summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3')
-rw-r--r--meta/recipes-devtools/python/python3/0001-gh-107811-tarfile-treat-overflow-in-UID-GID-as-failu.patch40
-rw-r--r--meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch46
-rw-r--r--meta/recipes-devtools/python/python3/0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch55
3 files changed, 86 insertions, 55 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-gh-107811-tarfile-treat-overflow-in-UID-GID-as-failu.patch b/meta/recipes-devtools/python/python3/0001-gh-107811-tarfile-treat-overflow-in-UID-GID-as-failu.patch
new file mode 100644
index 0000000000..88b84c6024
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-gh-107811-tarfile-treat-overflow-in-UID-GID-as-failu.patch
@@ -0,0 +1,40 @@
1From 999d4e74d34afa233ad8ad0c70b989d77a21957f Mon Sep 17 00:00:00 2001
2From: Petr Viktorin <encukou@gmail.com>
3Date: Wed, 23 Aug 2023 20:00:07 +0200
4Subject: [PATCH] gh-107811: tarfile: treat overflow in UID/GID as failure to
5 set it (#108369)
6
7Upstream-Status: Backport [https://github.com/python/cpython/pull/108369]
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 Lib/tarfile.py | 3 ++-
11 .../Library/2023-08-23-17-34-39.gh-issue-107811.3Fng72.rst | 3 +++
12 2 files changed, 5 insertions(+), 1 deletion(-)
13 create mode 100644 Misc/NEWS.d/next/Library/2023-08-23-17-34-39.gh-issue-107811.3Fng72.rst
14
15diff --git a/Lib/tarfile.py b/Lib/tarfile.py
16index 3bbbcaa..473167d 100755
17--- a/Lib/tarfile.py
18+++ b/Lib/tarfile.py
19@@ -2557,7 +2557,8 @@ class TarFile(object):
20 os.lchown(targetpath, u, g)
21 else:
22 os.chown(targetpath, u, g)
23- except OSError as e:
24+ except (OSError, OverflowError) as e:
25+ # OverflowError can be raised if an ID doesn't fit in `id_t`
26 raise ExtractError("could not change owner") from e
27
28 def chmod(self, tarinfo, targetpath):
29diff --git a/Misc/NEWS.d/next/Library/2023-08-23-17-34-39.gh-issue-107811.3Fng72.rst b/Misc/NEWS.d/next/Library/2023-08-23-17-34-39.gh-issue-107811.3Fng72.rst
30new file mode 100644
31index 0000000..ffca413
32--- /dev/null
33+++ b/Misc/NEWS.d/next/Library/2023-08-23-17-34-39.gh-issue-107811.3Fng72.rst
34@@ -0,0 +1,3 @@
35+:mod:`tarfile`: extraction of members with overly large UID or GID (e.g. on
36+an OS with 32-bit :c:type:`!id_t`) now fails in the same way as failing to
37+set the ID.
38--
392.45.0
40
diff --git a/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch b/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch
new file mode 100644
index 0000000000..1d4cda18b1
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-test_shutdown-skip-problematic-test.patch
@@ -0,0 +1,46 @@
1From 9d4cdbde100798ba9fa1cf3f82dbaf18fd10a543 Mon Sep 17 00:00:00 2001
2From: Trevor Gamblin <tgamblin@baylibre.com>
3Date: Wed, 8 May 2024 11:58:09 -0400
4Subject: [PATCH] test_shutdown: skip problematic test
5
6This test hangs frequently when run on the Autobuilder. Disable it in
7testing until the cause can be determined.
8
9Upstream-Status: Inappropriate [OE-Specific]
10
11Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
12---
13 Lib/test/test_concurrent_futures/test_shutdown.py | 3 +++
14 1 file changed, 3 insertions(+)
15
16diff --git a/Lib/test/test_concurrent_futures/test_shutdown.py b/Lib/test/test_concurrent_futures/test_shutdown.py
17index 7a4065afd4..6b878a48bf 100644
18--- a/Lib/test/test_concurrent_futures/test_shutdown.py
19+++ b/Lib/test/test_concurrent_futures/test_shutdown.py
20@@ -20,6 +20,7 @@ def sleep_and_print(t, msg):
21 sys.stdout.flush()
22
23
24+@unittest.skip("skipping problematic test")
25 class ExecutorShutdownTest:
26 def test_run_after_shutdown(self):
27 self.executor.shutdown()
28@@ -156,6 +157,7 @@ def timeout(_signum, _frame):
29 signal.signal(signal.SIGALRM, old_handler)
30
31
32+@unittest.skip("skipping problematic test")
33 class ThreadPoolShutdownTest(ThreadPoolMixin, ExecutorShutdownTest, BaseTestCase):
34 def test_threads_terminate(self):
35 def acquire_lock(lock):
36@@ -252,6 +254,7 @@ def test_cancel_futures_wait_false(self):
37 self.assertIn(out.strip(), [b"apple", b""])
38
39
40+@unittest.skip("skipping problematic test")
41 class ProcessPoolShutdownTest(ExecutorShutdownTest):
42 def test_processes_terminate(self):
43 def acquire_lock(lock):
44--
452.45.0
46
diff --git a/meta/recipes-devtools/python/python3/0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch b/meta/recipes-devtools/python/python3/0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch
deleted file mode 100644
index 598ef08cc4..0000000000
--- a/meta/recipes-devtools/python/python3/0001-test_xml_etree.py-Fix-for-Expat-2.6.0-with-reparse-d.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From d07ca7fbd874e230dec4d4c6d650a66ea2a9008e Mon Sep 17 00:00:00 2001
2From: Sebastian Pipping <sebastian@pipping.org>
3Date: Wed, 7 Feb 2024 15:32:45 +0100
4Subject: [PATCH] test_xml_etree.py: Fix for Expat >=2.6.0 with reparse
5 deferral
6
7Upstream-Status: Submitted [https://github.com/python/cpython/pull/115138]
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 Lib/test/test_xml_etree.py | 10 ++++++----
11 .../2024-02-07-15-49-37.gh-issue-115133.WBajNr.rst | 1 +
12 2 files changed, 7 insertions(+), 4 deletions(-)
13 create mode 100644 Misc/NEWS.d/next/Tests/2024-02-07-15-49-37.gh-issue-115133.WBajNr.rst
14
15diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
16index b50898f..4578367 100644
17--- a/Lib/test/test_xml_etree.py
18+++ b/Lib/test/test_xml_etree.py
19@@ -1403,6 +1403,7 @@ class XMLPullParserTest(unittest.TestCase):
20 def test_simple_xml(self):
21 for chunk_size in (None, 1, 5):
22 with self.subTest(chunk_size=chunk_size):
23+ expected_events = []
24 parser = ET.XMLPullParser()
25 self.assert_event_tags(parser, [])
26 self._feed(parser, "<!-- comment -->\n", chunk_size)
27@@ -1412,16 +1413,17 @@ class XMLPullParserTest(unittest.TestCase):
28 chunk_size)
29 self.assert_event_tags(parser, [])
30 self._feed(parser, ">\n", chunk_size)
31- self.assert_event_tags(parser, [('end', 'element')])
32+ expected_events += [('end', 'element')]
33 self._feed(parser, "<element>text</element>tail\n", chunk_size)
34 self._feed(parser, "<empty-element/>\n", chunk_size)
35- self.assert_event_tags(parser, [
36+ expected_events += [
37 ('end', 'element'),
38 ('end', 'empty-element'),
39- ])
40+ ]
41 self._feed(parser, "</root>\n", chunk_size)
42- self.assert_event_tags(parser, [('end', 'root')])
43+ expected_events += [('end', 'root')]
44 self.assertIsNone(parser.close())
45+ self.assert_event_tags(parser, expected_events)
46
47 def test_feed_while_iterating(self):
48 parser = ET.XMLPullParser()
49diff --git a/Misc/NEWS.d/next/Tests/2024-02-07-15-49-37.gh-issue-115133.WBajNr.rst b/Misc/NEWS.d/next/Tests/2024-02-07-15-49-37.gh-issue-115133.WBajNr.rst
50new file mode 100644
51index 0000000..4dc9c13
52--- /dev/null
53+++ b/Misc/NEWS.d/next/Tests/2024-02-07-15-49-37.gh-issue-115133.WBajNr.rst
54@@ -0,0 +1 @@
55+Fix etree XMLPullParser tests for Expat >=2.6.0 with reparse deferral