From 868793dc310594d3d662897c1423e46e610476ca Mon Sep 17 00:00:00 2001 From: Marcel Plch Date: Mar 11 2020 15:41:51 +0000 Subject: Update to 3.7.7 Patch #00339 is now upstreamed. --- diff --git a/00339-bpo-16575.patch b/00339-bpo-16575.patch deleted file mode 100644 index fa6e268..0000000 --- a/00339-bpo-16575.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 9dbf5d3bc2033940cdca35440cf08814544f81e4 Mon Sep 17 00:00:00 2001 -From: Vinay Sajip -Date: Sun, 12 Jan 2020 20:55:54 +0000 -Subject: [PATCH] [3.7] bpo-16575: Disabled checks for union types being passed - by value. (GH-17960) (GH-17970) - -Although the underlying libffi issue remains open, adding these -checks have caused problems in third-party projects which are in -widespread use. See the issue for examples. - -The corresponding tests have also been skipped. -(cherry picked from commit c12440c371025bea9c3bfb94945f006c486c2c01) ---- - Lib/ctypes/test/test_structures.py | 3 ++- - Modules/_ctypes/_ctypes.c | 19 +++++++++++++++++++ - 2 files changed, 21 insertions(+), 1 deletion(-) - -diff --git a/Lib/ctypes/test/test_structures.py b/Lib/ctypes/test/test_structures.py -index c129377041f03..2eb057a9f3009 100644 ---- a/Lib/ctypes/test/test_structures.py -+++ b/Lib/ctypes/test/test_structures.py -@@ -532,6 +532,7 @@ class U(Union): - self.assertEqual(f2, [0x4567, 0x0123, 0xcdef, 0x89ab, - 0x3210, 0x7654, 0xba98, 0xfedc]) - -+ @unittest.skipIf(True, 'Test disabled for now - see bpo-16575/bpo-16576') - def test_union_by_value(self): - # See bpo-16575 - -@@ -612,7 +613,7 @@ class Test5(Structure): - self.assertEqual(test5.nested.an_int, 0) - self.assertEqual(test5.another_int, 0) - -- #@unittest.skipIf('s390' in MACHINE, 'Test causes segfault on S390') -+ @unittest.skipIf(True, 'Test disabled for now - see bpo-16575/bpo-16576') - def test_bitfield_by_value(self): - # See bpo-16576 - -diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c -index c8fed44599543..dd0c61fd8a9a9 100644 ---- a/Modules/_ctypes/_ctypes.c -+++ b/Modules/_ctypes/_ctypes.c -@@ -2277,6 +2277,23 @@ converters_from_argtypes(PyObject *ob) - for (i = 0; i < nArgs; ++i) { - PyObject *tp = PyTuple_GET_ITEM(ob, i); - PyObject *cnv; -+/* -+ * The following checks, relating to bpo-16575 and bpo-16576, have been -+ * disabled. The reason is that, although there is a definite problem with -+ * how libffi handles unions (https://github.com/libffi/libffi/issues/33), -+ * there are numerous libraries which pass structures containing unions -+ * by values - especially on Windows but examples also exist on Linux -+ * (https://bugs.python.org/msg359834). -+ * -+ * It may not be possible to get proper support for unions and bitfields -+ * until support is forthcoming in libffi, but for now, adding the checks -+ * has caused problems in otherwise-working software, which suggests it -+ * is better to disable the checks. -+ * -+ * Although specific examples reported relate specifically to unions and -+ * not bitfields, the bitfields check is also being disabled as a -+ * precaution. -+ - StgDictObject *stgdict = PyType_stgdict(tp); - - if (stgdict != NULL) { -@@ -2304,6 +2321,8 @@ converters_from_argtypes(PyObject *ob) - return NULL; - } - } -+ */ -+ - cnv = PyObject_GetAttrString(tp, "from_param"); - if (!cnv) - goto argtypes_error_1; diff --git a/python3.spec b/python3.spec index 89cc36f..4c1e29b 100644 --- a/python3.spec +++ b/python3.spec @@ -13,11 +13,11 @@ URL: https://www.python.org/ # WARNING When rebasing to a new Python version, # remember to update the python3-docs package as well -%global general_version %{pybasever}.6 +%global general_version %{pybasever}.7 #global prerel ... %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 2%{?dist} +Release: 1%{?dist} License: Python @@ -307,14 +307,6 @@ Patch328: 00328-pyc-timestamp-invalidation-mode.patch # In upstream since 3.8: https://bugs.python.org/issue38347 Patch335: 00335-backport-pathfix-change.patch -# 00339 # -# Disabled checks for union types being passed by value -# Although the underlying libffi issue remains open, adding these -# checks have caused problems in third-party projects which are in -# widespread use. See the issue for examples. -# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1794572 -# Fixed upstream: https://bugs.python.org/issue16575 -Patch339: 00339-bpo-16575.patch # (New patches go here ^^^) # @@ -655,7 +647,6 @@ rm Lib/ensurepip/_bundled/*.whl %patch316 -p1 %patch328 -p1 %patch335 -p1 -%patch339 -p1 # Remove files that should be generated by the build @@ -1564,6 +1555,9 @@ CheckPython optimized # ====================================================== %changelog +* Wed Mar 11 2020 Marcel Plch - 3.7.7-1 +- Update to 3.7.7 + * Tue Jan 28 2020 Miro HronĨok - 3.7.6-2 - ctypes: Disable checks for union types being passed by value (#1794572) diff --git a/sources b/sources index 96b6820..56ebbd0 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (Python-3.7.6.tar.xz) = 5be022c384728b0c6709d165486f66226d126c521b466ed24d0c4c3c5910ec786a734f4c2c916ac409213c54a492b9fb230fb721c41e3de281676a7e9d8f3171 -SHA512 (Python-3.7.6.tar.xz.asc) = d9b735fa3f7eeefddb947993e66aed1657454ecb61b0cebd9545ed6c0bbfd237142be21ad9fa92050b8c72d88f2e773867885d47909ebac6021f79bd94ee54f6 +SHA512 (Python-3.7.7.tar.xz) = ddc838a7b0c442c2e465616f20231f2b703ed6b69ed2dc17858aac8760814fdf7cff43d350d359300e47b6bb1f0bd38c31126b855e423a3a65ed06a8fa16d136 +SHA512 (Python-3.7.7.tar.xz.asc) = e6437eec497aaa5c50e03d48f0e9fe7ed73b898b8eb4284878a774de2711979850469db80c20dbdf53f18a132f445ca3b06ee59fff2e138ca78e84cad50cdc5f