15
0
Files
python-jsonpickle/python-jsonpickle.spec

97 lines
3.2 KiB
RPMSpec
Raw Normal View History

- update to 4.0.0: * Breaking Change: Python 3.7 is no longer supported. * Breaking Change: Support for pre-0.7.0 repr-serialized objects is no longer enabled by default. The safe option to decode() was changed from False to True. Users can still pass safe=False to decode() in order to enable this feature for the purposes of loading older files, but beware that this feature relies on unsafe behavior through its use of eval(). Users are encouraged to re-pickle old data in order to migrate away from the the unsafe loading feature. (+514) * The pickler no longer produces py/repr tags when pickling modules. py/mod is used instead, as it is clearer and uses one less byte. (+514) * The test suite no longer uses the deprecated datetime.datetime.utcnow() function. (+539) * The breaking changes from v4 were inadvertedly included in v3.4.1, which has been yanked. This release remedies this by reverting the v4 changes. * Support decoding pandas dataframes encoded with versions 3.3.0 and older. (+536) * Officially support Python 3.12 in the GitHub Actions testing matrix, and update GHA package versions used. (+524) * Improve reproducibility of benchmarking commands on Linux by using taskset and adding a "HOWTO" run benchmarks section in benchmarking/README.md. (+526) * The setup.cfg packaging configuration has been replaced by pyproject.toml. (+527) * yaml is now supported as a jsonpickle backend. (+528) * OSSFuzz scripts are now available in the fuzzing/ directory. (+525) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonpickle?expand=0&rev=42
2024-11-20 16:10:58 +00:00
#
# spec file for package python-jsonpickle
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-jsonpickle
Version: 4.0.0
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
Patch1: enable_gmpy_test.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module importlib_metadata if %python-base < 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 42}
BuildRequires: %{python_module setuptools_scm >= 3.4.1}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %python_version_nodots < 38
Requires: python-importlib_metadata
%endif
BuildArch: noarch
# SECTION test requirements
%if 0%{?suse_version} <= 1600
BuildRequires: %{python_module tzdata}
%endif
BuildRequires: %{python_module SQLAlchemy}
BuildRequires: %{python_module ecdsa}
BuildRequires: %{python_module feedparser}
BuildRequires: %{python_module gmpy2 if %python-base < 3.12}
BuildRequires: %{python_module numpy}
%if 0%{?suse_version} >= 1550
BuildRequires: %{python_module pandas}
BuildRequires: %{python_module pymongo}
BuildRequires: %{python_module scikit-learn}
%else
BuildRequires: %{python_module bson}
%endif
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module simplejson}
BuildRequires: %{python_module ujson}
# /SECTION
%python_subpackages
%description
Python library for serializing any arbitrary object graph into JSON.
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 jsonpickle-%{version}
sed -i 's/ --cov//' pytest.ini
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
rm -rv fuzzing
# test_multindex_dataframe_roundtrip is flaky on i586
donttest="test_multindex_dataframe_roundtrip"
# https://github.com/jsonpickle/jsonpickle/issues/460
donttest+=" or test_timedelta_index_roundtrip"
%if 0%{?suse_version} < 1550
%pytest -ra -k "not ($donttest)" tests jsonpickle/pickler.py jsonpickle/unpickler.py jsonpickle/util.py
%else
%pytest -ra -k "not ($donttest)"
%endif
%files %{python_files}
%license LICENSE
%doc README.rst CHANGES.rst
%{python_sitelib}/jsonpickle
%{python_sitelib}/jsonpickle-%{version}.dist-info
%changelog