From e917b3b510dcb32b570f43d4d7981d30ddfdb8c04285ff7a4fe6f0d1f697235a Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 8 May 2023 18:18:53 +0000 Subject: [PATCH] - update to 2.2.1: * Back to dev mode * Move builtin classmethod_descriptor to a different test * Fix Python 3.9+ NamedTuple issues - drop Move-builtin-classmethod_descriptor-to-a-different-t.patch (upstream) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cloudpickle?expand=0&rev=47 --- ...ssmethod_descriptor-to-a-different-t.patch | 69 ------------------- cloudpickle-2.2.0.tar.gz | 3 - cloudpickle-2.2.1.tar.gz | 3 + python-cloudpickle.changes | 9 +++ python-cloudpickle.spec | 4 +- 5 files changed, 13 insertions(+), 75 deletions(-) delete mode 100644 Move-builtin-classmethod_descriptor-to-a-different-t.patch delete mode 100644 cloudpickle-2.2.0.tar.gz create mode 100644 cloudpickle-2.2.1.tar.gz diff --git a/Move-builtin-classmethod_descriptor-to-a-different-t.patch b/Move-builtin-classmethod_descriptor-to-a-different-t.patch deleted file mode 100644 index decec27..0000000 --- a/Move-builtin-classmethod_descriptor-to-a-different-t.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 9b332800fa09bec1f03fd4dd10ca69d1655c809c Mon Sep 17 00:00:00 2001 -From: Daniel Garcia Moreno -Date: Fri, 28 Oct 2022 13:55:45 +0200 -Subject: [PATCH] Move builtin classmethod_descriptor to a different test - -This patch mvoes the builtin classmethod descriptor test to a different -one and mark it to skip for python >= 3.10.8. The classmethod descriptor -serializarion was removed from python in these releases: -https://docs.python.org/3.10/whatsnew/changelog.html#id3 - -More information in the github issue: -https://github.com/python/cpython/issues/95196 - -Fix https://github.com/cloudpipe/cloudpickle/issues/485 ---- - tests/cloudpickle_test.py | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -diff --git a/tests/cloudpickle_test.py b/tests/cloudpickle_test.py -index 7bb0322..2701852 100644 ---- a/tests/cloudpickle_test.py -+++ b/tests/cloudpickle_test.py -@@ -868,21 +868,16 @@ class CloudPickleTest(unittest.TestCase): - assert depickled_unbound_meth is unbound_classicmethod - assert depickled_clsdict_meth is clsdict_classicmethod - -- - def test_builtin_classmethod(self): - obj = 1.5 # float object - - bound_clsmethod = obj.fromhex # builtin_function_or_method - unbound_clsmethod = type(obj).fromhex # builtin_function_or_method -- clsdict_clsmethod = type( -- obj).__dict__['fromhex'] # classmethod_descriptor - - depickled_bound_meth = pickle_depickle( - bound_clsmethod, protocol=self.protocol) - depickled_unbound_meth = pickle_depickle( - unbound_clsmethod, protocol=self.protocol) -- depickled_clsdict_meth = pickle_depickle( -- clsdict_clsmethod, protocol=self.protocol) - - # float.fromhex takes a string as input. - arg = "0x1" -@@ -893,6 +888,21 @@ class CloudPickleTest(unittest.TestCase): - assert depickled_bound_meth(arg) == bound_clsmethod(arg) - assert depickled_unbound_meth(arg) == unbound_clsmethod(arg) - -+ @pytest.mark.skipif( -+ sys.version_info >= (3, 10, 8), -+ reason="Disabled classmethod_descriptor pickle https://github.com/python/cpython/issues/95196" -+ ) -+ def test_builtin_classmethod_descriptor(self): -+ obj = 1.5 # float object -+ -+ clsdict_clsmethod = type( -+ obj).__dict__['fromhex'] # classmethod_descriptor -+ -+ depickled_clsdict_meth = pickle_depickle( -+ clsdict_clsmethod, protocol=self.protocol) -+ -+ # float.fromhex takes a string as input. -+ arg = "0x1" - if platform.python_implementation() == 'CPython': - # Roundtripping a classmethod_descriptor results in a - # builtin_function_or_method (CPython upstream issue). --- -2.38.0 - diff --git a/cloudpickle-2.2.0.tar.gz b/cloudpickle-2.2.0.tar.gz deleted file mode 100644 index d5afbab..0000000 --- a/cloudpickle-2.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3f4219469c55453cfe4737e564b67c2a149109dabf7f242478948b895f61106f -size 59630 diff --git a/cloudpickle-2.2.1.tar.gz b/cloudpickle-2.2.1.tar.gz new file mode 100644 index 0000000..c14338e --- /dev/null +++ b/cloudpickle-2.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d89684b8de9e34a2a43b3460fbca07d09d6e25ce858df4d5a44240403b6178f5 +size 60800 diff --git a/python-cloudpickle.changes b/python-cloudpickle.changes index 4702fce..72981cd 100644 --- a/python-cloudpickle.changes +++ b/python-cloudpickle.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon May 8 18:15:45 UTC 2023 - Dirk Müller + +- update to 2.2.1: + * Back to dev mode + * Move builtin classmethod_descriptor to a different test + * Fix Python 3.9+ NamedTuple issues +- drop Move-builtin-classmethod_descriptor-to-a-different-t.patch (upstream) + ------------------------------------------------------------------- Thu Feb 16 23:10:38 UTC 2023 - Dirk Müller diff --git a/python-cloudpickle.spec b/python-cloudpickle.spec index 0bc6481..fc4e3e6 100644 --- a/python-cloudpickle.spec +++ b/python-cloudpickle.spec @@ -18,14 +18,12 @@ %define skip_python2 1 Name: python-cloudpickle -Version: 2.2.0 +Version: 2.2.1 Release: 0 Summary: Extended pickling support for Python objects License: BSD-3-Clause URL: https://github.com/cloudpipe/cloudpickle Source: https://files.pythonhosted.org/packages/source/c/cloudpickle/cloudpickle-%{version}.tar.gz -# PATCH-FIX-UPSTREAM Move-builtin-classmethod_descriptor-to-a-different-t.patch gh#cloudpipe/cloudpickle#486 -Patch0: Move-builtin-classmethod_descriptor-to-a-different-t.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros