From e410e3892b5a6bea36d16d781b9204667750115357d9ef30a87f394365312eb1 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 8 Feb 2021 22:33:22 +0000 Subject: [PATCH] - Readjustet and reapplied patches: - CVE-2021-3177-buf_ovrfl_PyCArg_repr.patch - bpo-31046_ensurepip_honours_prefix.patch - python-3.3.0b1-fix_date_time_compiler.patch - skip_random_failing_tests.patch - sphinx-update-removed-function.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python39?expand=0&rev=50 --- CVE-2021-3177-buf_ovrfl_PyCArg_repr.patch | 4 ++-- bpo-31046_ensurepip_honours_prefix.patch | 4 ++-- python-3.3.0b1-fix_date_time_compiler.patch | 2 +- python39.changes | 6 ++++++ skip_random_failing_tests.patch | 20 ++++++++++---------- sphinx-update-removed-function.patch | 2 +- 6 files changed, 22 insertions(+), 16 deletions(-) diff --git a/CVE-2021-3177-buf_ovrfl_PyCArg_repr.patch b/CVE-2021-3177-buf_ovrfl_PyCArg_repr.patch index 513db93..1cc1957 100644 --- a/CVE-2021-3177-buf_ovrfl_PyCArg_repr.patch +++ b/CVE-2021-3177-buf_ovrfl_PyCArg_repr.patch @@ -73,7 +73,7 @@ Co-authored-by: Benjamin Peterson +:class:`ctypes.c_longdouble` values. --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c -@@ -483,58 +483,47 @@ is_literal_char(unsigned char c) +@@ -489,58 +489,47 @@ is_literal_char(unsigned char c) static PyObject * PyCArg_repr(PyCArgObject *self) { @@ -148,7 +148,7 @@ Co-authored-by: Benjamin Peterson /* Hm, are these 'z' and 'Z' codes useful at all? Shouldn't they be replaced by the functionality of c_string -@@ -543,22 +532,19 @@ PyCArg_repr(PyCArgObject *self) +@@ -549,22 +538,19 @@ PyCArg_repr(PyCArgObject *self) case 'z': case 'Z': case 'P': diff --git a/bpo-31046_ensurepip_honours_prefix.patch b/bpo-31046_ensurepip_honours_prefix.patch index e4bc1d2..1808e85 100644 --- a/bpo-31046_ensurepip_honours_prefix.patch +++ b/bpo-31046_ensurepip_honours_prefix.patch @@ -139,7 +139,7 @@ Co-Authored-By: Xavier de Gaye --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -1252,7 +1252,7 @@ install: @FRAMEWORKINSTALLFIRST@ commoni +@@ -1253,7 +1253,7 @@ install: @FRAMEWORKINSTALLFIRST@ commoni install|*) ensurepip="" ;; \ esac; \ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ @@ -148,7 +148,7 @@ Co-Authored-By: Xavier de Gaye fi altinstall: commoninstall -@@ -1262,7 +1262,7 @@ altinstall: commoninstall +@@ -1263,7 +1263,7 @@ altinstall: commoninstall install|*) ensurepip="--altinstall" ;; \ esac; \ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ diff --git a/python-3.3.0b1-fix_date_time_compiler.patch b/python-3.3.0b1-fix_date_time_compiler.patch index 6cc43a7..464447a 100644 --- a/python-3.3.0b1-fix_date_time_compiler.patch +++ b/python-3.3.0b1-fix_date_time_compiler.patch @@ -1,6 +1,6 @@ --- a/Makefile.pre.in +++ b/Makefile.pre.in -@@ -764,11 +764,18 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ +@@ -772,11 +772,18 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ $(DTRACE_OBJS) \ $(srcdir)/Modules/getbuildinfo.c $(CC) -c $(PY_CORE_CFLAGS) \ diff --git a/python39.changes b/python39.changes index 3336219..99faf20 100644 --- a/python39.changes +++ b/python39.changes @@ -238,6 +238,12 @@ Mon Feb 8 22:02:03 UTC 2021 - Matej Cepl through the self argument of a PyCFunction. - Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are available again in limited API. +- Readjustet and reapplied patches: + - CVE-2021-3177-buf_ovrfl_PyCArg_repr.patch + - bpo-31046_ensurepip_honours_prefix.patch + - python-3.3.0b1-fix_date_time_compiler.patch + - skip_random_failing_tests.patch + - sphinx-update-removed-function.patch ------------------------------------------------------------------- Fri Jan 29 17:22:48 UTC 2021 - Matej Cepl diff --git a/skip_random_failing_tests.patch b/skip_random_failing_tests.patch index aa92541..87a3406 100644 --- a/skip_random_failing_tests.patch +++ b/skip_random_failing_tests.patch @@ -82,7 +82,7 @@ Signed-off-by: Michel Normand --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py -@@ -1521,6 +1521,7 @@ class _TestCondition(BaseTestCase): +@@ -1546,6 +1546,7 @@ class _TestCondition(BaseTestCase): success.value = True @unittest.skipUnless(HAS_SHAREDCTYPES, 'needs sharedctypes') @@ -90,7 +90,7 @@ Signed-off-by: Michel Normand def test_waitfor_timeout(self): # based on test in test/lock_tests.py cond = self.Condition() -@@ -2411,6 +2412,7 @@ class _TestPool(BaseTestCase): +@@ -2436,6 +2437,7 @@ class _TestPool(BaseTestCase): self.assertEqual(get(), 49) self.assertTimingAlmostEqual(get.elapsed, TIMEOUT1) @@ -98,7 +98,7 @@ Signed-off-by: Michel Normand def test_async_timeout(self): res = self.pool.apply_async(sqr, (6, TIMEOUT2 + 1.0)) get = TimingWrapper(res.get) -@@ -4564,6 +4566,7 @@ class TestWait(unittest.TestCase): +@@ -4682,6 +4684,7 @@ class TestWait(unittest.TestCase): sem.release() time.sleep(period) @@ -108,7 +108,7 @@ Signed-off-by: Michel Normand --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py -@@ -266,6 +266,7 @@ class EventLoopTestsMixin: +@@ -270,6 +270,7 @@ class EventLoopTestsMixin: # Note: because of the default Windows timing granularity of # 15.6 msec, we use fairly long sleep times here (~100 msec). @@ -116,16 +116,16 @@ Signed-off-by: Michel Normand def test_run_until_complete(self): t0 = self.loop.time() self.loop.run_until_complete(asyncio.sleep(0.1)) -@@ -293,7 +294,7 @@ class EventLoopTestsMixin: +@@ -294,7 +295,7 @@ class EventLoopTestsMixin: + + self.loop.call_later(0.1, callback, 'hello world') self.loop.run_forever() - t1 = time.monotonic() - self.assertEqual(results, ['hello world']) -- self.assertTrue(0.08 <= t1-t0 <= 0.8, t1-t0) +- self.assertEqual(results, ['hello world']) + self.assertTrue(0.08 <= t1-t0 <= 5.0, t1-t0) def test_call_soon(self): results = [] -@@ -478,6 +479,7 @@ class EventLoopTestsMixin: +@@ -481,6 +482,7 @@ class EventLoopTestsMixin: self.assertEqual(caught, 1) @unittest.skipUnless(hasattr(signal, 'SIGALRM'), 'No SIGALRM') @@ -135,7 +135,7 @@ Signed-off-by: Michel Normand caught = 0 --- a/Lib/test/test_buffer.py +++ b/Lib/test/test_buffer.py -@@ -2504,6 +2504,7 @@ class TestBufferProtocol(unittest.TestCa +@@ -2509,6 +2509,7 @@ class TestBufferProtocol(unittest.TestCa a = ndarray(items, shape=[2, 2, 2], format="b") check(memoryview(a), vsize(base_struct + 3 * per_dim)) diff --git a/sphinx-update-removed-function.patch b/sphinx-update-removed-function.patch index 17bc498..181f758 100644 --- a/sphinx-update-removed-function.patch +++ b/sphinx-update-removed-function.patch @@ -4,7 +4,7 @@ --- a/Doc/tools/extensions/pyspecific.py +++ b/Doc/tools/extensions/pyspecific.py -@@ -355,7 +355,12 @@ class DeprecatedRemoved(Directive): +@@ -361,7 +361,12 @@ class DeprecatedRemoved(Directive): translatable=False) node.append(para) env = self.state.document.settings.env