From 127402c57bb6ac9719da83518fd0183704d080c96431f0ab0df3942e42877063 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 24 Jan 2023 08:29:53 +0000 Subject: [PATCH] Accepting request 1060463 from home:bnavigator:branches:devel:languages:python - Update to 3.0.1 * Remove accidental pin of setuptools to versions below 59. This allows jsonpickle to build with CPython 3.11 and 3.12 alphas. (#424) * Remove accidental dependency on pytz in pandas tests. (+421) * Fix issue with decoding bson.bson.Int64 objects (#422) - Release 3.0.0 * Drop support for CPython<3.7. CPython 3.6 and below have reached EOL and no longer receive security updates. (#375) * Add support for CPython 3.11. (#395) (+396) * Remove jsonlib and yajl backends (py2 only) * Add `include_properties` option to the pickler. This should only be used if analyzing generated json outside of Python. (#297) (+387) * Allow the `classes` argument to `jsonpickle.decode` to be a dict of class name to class object. This lets you decode arbitrary dumps into different classes. (#148) (+392) * Fix bug with deserializing `numpy.poly1d`. (#391) * Allow frozen dataclasses to be deserialized. (#240) * Fixed a bug where pickling a function could return a `None` module. (#399) * Removed old bytes/quopri and ref decoding abaility from the unpickler. These were last used in jsonpickle<1. Removing them causes a slight speedup in unpickling lists (~5%). (+403) * Fixed a bug with namedtuples encoding on CPython 3.11. (#411) * When using the `sort_keys` option for the `simplejson` backend, jsonpickle now produces correct object references with py/id tags. (#408) * Speed up the internal method `_restore_tags` by ~10%. This should speed up unpickling of almost every object. - Release 2.2.0 * Classes with a custom `__getitem__()` and `append()` now pickle properly. (#362) (+379) * Remove the demjson backend, as demjson hasn't been maintained for 5 years. (+379) * Added new handler for numpy objects when using unpickleable=False. (#381) (+382) * Added exception handling for class attributes that can't be accessed. (#301) (+383) * Added a long-requested on_missing attribute to the Unpickler class. This lets you choose behavior for when jsonpickle can't find a class to deserialize to. (#190) (#193) (+384) * Private members of `__slots__` are no longer skipped when encoding. Any objects encoded with versions prior to 2.2.0 should still decode properly. (#318) (+385) - Release 2.1.0 * Python 3.10 is now officially supported. (+376) * `is_reducible()` was sped up by ~80%. (+353) (+354) * `_restore_tags()` was sped up by ~100%. Unpickling items with a lot of tuples and sets will benefit most. Python 2 users and users deserializing pickles from jsonpickle <= 0.9.6 may see a slight performance decrease if using a lot of bytes, ref, and/or repr objects. (+354) * `is_iterator()` was sped up by ~20% by removing an unnecessary variable assignment. (+354) * `jsonpickle.decode` has a new option, `v1_decode` to assist in decoding objects created in jsonpickle version 1. (#364) * The `encode()` documentation has been updated to help sklearn users. * `SQLALchemy<1.2` is no longer being tested by jsonpickle. Users of sqlalchemy + jsonpickle can always use 1.2 or 1.3. When jsonpickle v3 is released we will add SQLAlchemy 1.4 to the test suite alongside removal of support for Python 3.5 and earlier. - Remove testing skip conditionals: * no python36 anymore * jsonpickle not in Ring1 anymore OBS-URL: https://build.opensuse.org/request/show/1060463 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonpickle?expand=0&rev=23 --- jsonpickle-2.0.0.tar.gz | 3 -- jsonpickle-3.0.1.tar.gz | 3 ++ python-jsonpickle.changes | 71 +++++++++++++++++++++++++++++++++++++++ python-jsonpickle.spec | 38 ++++++--------------- 4 files changed, 84 insertions(+), 31 deletions(-) delete mode 100644 jsonpickle-2.0.0.tar.gz create mode 100644 jsonpickle-3.0.1.tar.gz diff --git a/jsonpickle-2.0.0.tar.gz b/jsonpickle-2.0.0.tar.gz deleted file mode 100644 index 24866a3..0000000 --- a/jsonpickle-2.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0be49cba80ea6f87a168aa8168d717d00c6ca07ba83df3cec32d3b30bfe6fb9a -size 110336 diff --git a/jsonpickle-3.0.1.tar.gz b/jsonpickle-3.0.1.tar.gz new file mode 100644 index 0000000..b4b541a --- /dev/null +++ b/jsonpickle-3.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:032538804795e73b94ead410800ac387fdb6de98f8882ac957fcd247e3a85200 +size 265121 diff --git a/python-jsonpickle.changes b/python-jsonpickle.changes index 1a8e112..febaf46 100644 --- a/python-jsonpickle.changes +++ b/python-jsonpickle.changes @@ -1,3 +1,74 @@ +------------------------------------------------------------------- +Sat Jan 21 19:24:29 UTC 2023 - Ben Greiner + +- Update to 3.0.1 + * Remove accidental pin of setuptools to versions below 59. This + allows jsonpickle to build with CPython 3.11 and 3.12 alphas. + (#424) + * Remove accidental dependency on pytz in pandas tests. (+421) + * Fix issue with decoding bson.bson.Int64 objects (#422) +- Release 3.0.0 + * Drop support for CPython<3.7. CPython 3.6 and below have + reached EOL and no longer receive security updates. (#375) + * Add support for CPython 3.11. (#395) (+396) + * Remove jsonlib and yajl backends (py2 only) + * Add `include_properties` option to the pickler. This should + only be used if analyzing generated json outside of Python. + (#297) (+387) + * Allow the `classes` argument to `jsonpickle.decode` to be a + dict of class name to class object. This lets you decode + arbitrary dumps into different classes. (#148) (+392) + * Fix bug with deserializing `numpy.poly1d`. (#391) + * Allow frozen dataclasses to be deserialized. (#240) + * Fixed a bug where pickling a function could return a `None` + module. (#399) + * Removed old bytes/quopri and ref decoding abaility from the + unpickler. These were last used in jsonpickle<1. Removing them + causes a slight speedup in unpickling lists (~5%). (+403) + * Fixed a bug with namedtuples encoding on CPython 3.11. (#411) + * When using the `sort_keys` option for the `simplejson` backend, + jsonpickle now produces correct object references with py/id + tags. (#408) + * Speed up the internal method `_restore_tags` by ~10%. This + should speed up unpickling of almost every object. +- Release 2.2.0 + * Classes with a custom `__getitem__()` and `append()` now pickle + properly. (#362) (+379) + * Remove the demjson backend, as demjson hasn't been maintained + for 5 years. (+379) + * Added new handler for numpy objects when using + unpickleable=False. (#381) (+382) + * Added exception handling for class attributes that can't be + accessed. (#301) (+383) + * Added a long-requested on_missing attribute to the Unpickler + class. This lets you choose behavior for when jsonpickle can't + find a class to deserialize to. (#190) (#193) (+384) + * Private members of `__slots__` are no longer skipped when + encoding. Any objects encoded with versions prior to 2.2.0 + should still decode properly. (#318) (+385) +- Release 2.1.0 + * Python 3.10 is now officially supported. (+376) + * `is_reducible()` was sped up by ~80%. (+353) (+354) + * `_restore_tags()` was sped up by ~100%. Unpickling items with a + lot of tuples and sets will benefit most. Python 2 users and + users deserializing pickles from jsonpickle <= 0.9.6 may see a + slight performance decrease if using a lot of bytes, ref, + and/or repr objects. (+354) + * `is_iterator()` was sped up by ~20% by removing an unnecessary + variable assignment. (+354) + * `jsonpickle.decode` has a new option, `v1_decode` to assist in + decoding objects created in jsonpickle version 1. (#364) + * The `encode()` documentation has been updated to help sklearn + users. + * `SQLALchemy<1.2` is no longer being tested by jsonpickle. Users + of sqlalchemy + jsonpickle can always use 1.2 or 1.3. When + jsonpickle v3 is released we will add SQLAlchemy 1.4 to the + test suite alongside removal of support for Python 3.5 and + earlier. +- Remove testing skip conditionals: + * no python36 anymore + * jsonpickle not in Ring1 anymore + ------------------------------------------------------------------- Thu Jan 6 19:51:47 UTC 2022 - Ben Greiner diff --git a/python-jsonpickle.spec b/python-jsonpickle.spec index 38a7a49..314ee63 100644 --- a/python-jsonpickle.spec +++ b/python-jsonpickle.spec @@ -1,7 +1,7 @@ # # spec file for package python-jsonpickle # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,21 +16,17 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define modname jsonpickle -%bcond_without python2 -%bcond_with ringdisabled Name: python-jsonpickle -Version: 2.0.0 +Version: 3.0.1 Release: 0 Summary: Python library for serializing any arbitrary object graph into JSON License: BSD-3-Clause URL: https://github.com/jsonpickle/jsonpickle Source: https://files.pythonhosted.org/packages/source/j/jsonpickle/jsonpickle-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module importlib_metadata if %python-base < 3.8} BuildRequires: %{python_module setuptools_scm >= 3.4.1} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module toml} BuildRequires: fdupes BuildRequires: python-rpm-macros %if 0%{python_version_nodots} < 38 @@ -38,33 +34,21 @@ Requires: python-importlib_metadata %endif Recommends: python-simplejson Suggests: python-ujson -Suggests: python-yajl Suggests: python-numpy Suggests: python-pandas BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module SQLAlchemy} BuildRequires: %{python_module ecdsa} +BuildRequires: %{python_module gmpy2} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pandas} BuildRequires: %{python_module pymongo} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module pytz} +BuildRequires: %{python_module scikit-learn} BuildRequires: %{python_module simplejson} -BuildRequires: %{python_module numpy if (%python-base without python36-base)} -%if ! 0%{?_with_ringdisabled} -# Test these in a normal devel project or locally, but not when staging with Ring1 BuildRequires: %{python_module ujson} -BuildRequires: %{python_module pandas if (%python-base without python36-base)} -BuildRequires: %{python_module scikit-learn if (%python-base without python36-base)} -%endif -%if %{with python2} -BuildRequires: python-enum34 -BuildRequires: python-jsonlib -%endif # /SECTION -%ifpython2 -Suggests: python-enum34 -Suggests: python-jsonlib -%endif %python_subpackages %description @@ -73,8 +57,8 @@ It can take almost any Python object and turn the object into JSON. Additionally, it can reconstitute the object back into Python. %prep -%autosetup -p1 -n %{modname}-%{version} -sed -i 's/--flake8 --black --cov//' pytest.ini +%autosetup -p1 -n jsonpickle-%{version} +sed -i 's/ --cov//' pytest.ini %build %python_build @@ -84,9 +68,7 @@ sed -i 's/--flake8 --black --cov//' pytest.ini %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -python36_ignorefiles="--ignore jsonpickle/ext/numpy.py \ - --ignore jsonpickle/ext/pandas.py" -%pytest -ra ${$python_ignorefiles} %{?_with_ringdisabled:--ignore jsonpickle/ext/pandas.py} +%pytest -ra %files %{python_files} %license LICENSE