From 93c1023f6566868d2b4a1f7cb5dae1146835aa9e9a9e4aad4b79f41a22ed66e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 2 Dec 2024 12:29:44 +0000 Subject: [PATCH] update to 3.10.12 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=21 --- .gitattributes | 23 ++++ .gitignore | 1 + PACKAGING_README.md | 6 ++ _service | 8 ++ devendor-sdist.sh | 11 ++ orjson-3.10.12-devendored.tar.xz | 3 + orjson-3.10.12.tar.gz | 3 + orjson-3.10.7-devendored.tar.xz | 3 + orjson-3.10.7.tar.gz | 3 + orjson-3.9.15-devendored.tar.xz | 3 + orjson-3.9.15.tar.gz | 3 + python-orjson.changes | 178 +++++++++++++++++++++++++++++++ python-orjson.spec | 85 +++++++++++++++ vendor.tar.xz | 3 + 14 files changed, 333 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 PACKAGING_README.md create mode 100644 _service create mode 100644 devendor-sdist.sh create mode 100644 orjson-3.10.12-devendored.tar.xz create mode 100644 orjson-3.10.12.tar.gz create mode 100644 orjson-3.10.7-devendored.tar.xz create mode 100644 orjson-3.10.7.tar.gz create mode 100644 orjson-3.9.15-devendored.tar.xz create mode 100644 orjson-3.9.15.tar.gz create mode 100644 python-orjson.changes create mode 100644 python-orjson.spec create mode 100644 vendor.tar.xz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/PACKAGING_README.md b/PACKAGING_README.md new file mode 100644 index 0000000..ab23a39 --- /dev/null +++ b/PACKAGING_README.md @@ -0,0 +1,6 @@ +# Packaging python-orjson + +1. Change the version in the spec file +2. Run `osc service runall download_files && sh ./devendor-sdist.sh && osc service runall cargo_vendor` +3. Create a changelog entry +4. Commit the changes as usual diff --git a/_service b/_service new file mode 100644 index 0000000..5dce196 --- /dev/null +++ b/_service @@ -0,0 +1,8 @@ + + + orjson-*-devendored.tar.xz + xz + true + + + diff --git a/devendor-sdist.sh b/devendor-sdist.sh new file mode 100644 index 0000000..ccc29de --- /dev/null +++ b/devendor-sdist.sh @@ -0,0 +1,11 @@ +#!/bin/sh +file=$(find . -maxdepth 1 -name 'orjson-*.tar.gz' -print | sort -rn | tail -1) +echo "Removing the cargo vendoring from upstream ${file}" +dir=${file%.tar.gz} +tar -x -z -f $file +rm ${dir}/Cargo.lock +rm -r ${dir}/include/cargo +rm -r ${dir}/.cargo +outfile=${dir}-devendored.tar.xz +echo "Repackaging to ${outfile}" +tar -c -J -f ${outfile} ${dir} diff --git a/orjson-3.10.12-devendored.tar.xz b/orjson-3.10.12-devendored.tar.xz new file mode 100644 index 0000000..32799a8 --- /dev/null +++ b/orjson-3.10.12-devendored.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9be0a284552c5344637c4897a3ad515da52e53a779ff8f1b4123a69afbfe6a37 +size 701460 diff --git a/orjson-3.10.12.tar.gz b/orjson-3.10.12.tar.gz new file mode 100644 index 0000000..bdde574 --- /dev/null +++ b/orjson-3.10.12.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a78bbda3aea0f9f079057ee1ee8a1ecf790d4f1af88dd67493c6b8ee52506ff +size 5438647 diff --git a/orjson-3.10.7-devendored.tar.xz b/orjson-3.10.7-devendored.tar.xz new file mode 100644 index 0000000..5c37d56 --- /dev/null +++ b/orjson-3.10.7-devendored.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d866f0fd845873a28d4585a8a59f0737390aaaa9a4ce3b30415eadfa6eb318cd +size 628556 diff --git a/orjson-3.10.7.tar.gz b/orjson-3.10.7.tar.gz new file mode 100644 index 0000000..148f17c --- /dev/null +++ b/orjson-3.10.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75ef0640403f945f3a1f9f6400686560dbfb0fb5b16589ad62cd477043c4eee3 +size 5056450 diff --git a/orjson-3.9.15-devendored.tar.xz b/orjson-3.9.15-devendored.tar.xz new file mode 100644 index 0000000..6691749 --- /dev/null +++ b/orjson-3.9.15-devendored.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:609e03e86406062447b20255722b039c6b743f01fb4faf62e87006fcb384a790 +size 623404 diff --git a/orjson-3.9.15.tar.gz b/orjson-3.9.15.tar.gz new file mode 100644 index 0000000..a984aec --- /dev/null +++ b/orjson-3.9.15.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95cae920959d772f30ab36d3b25f83bb0f3be671e986c72ce22f8fa700dae061 +size 4854933 diff --git a/python-orjson.changes b/python-orjson.changes new file mode 100644 index 0000000..28238d7 --- /dev/null +++ b/python-orjson.changes @@ -0,0 +1,178 @@ +------------------------------------------------------------------- +Mon Dec 2 11:05:13 UTC 2024 - Johannes Kastl + +- update to 3.10.12: + * Changed + - Publish PyPI manylinux i686 wheels. + - Publish PyPI musllinux i686 and arm7l wheels. + - Publish PyPI macOS wheels for Python 3.10 or later built on + macOS 15. + - Publish PyPI Windows wheels using trusted publishing. +- update to 3.10.11: + * Changed + - Improve performance of UUIDs. + - Publish PyPI wheels with trusted publishing and PEP 740 + attestations. + - Include text of licenses for vendored dependencies. +- update to 3.10.10: + * Fixed + - Fix int serialization on s390x. This was introduced in 3.10.8. + * Changed + - Publish aarch64 manylinux_2_17 wheel for 3.13 to PyPI. +- update to 3.10.9: + * Fixed + - Fix int serialization on 32-bit Python 3.8, 3.9, 3.10. This + was introduced in 3.10.8. +- update to 3.10.8: + * Changed + - int serialization no longer chains OverflowError to the + - the __cause__ attribute of orjson.JSONEncodeError when range + exceeded. + - Compatibility with CPython 3.14 alpha 1. + - Improve performance. + +------------------------------------------------------------------- +Mon Sep 9 10:29:05 UTC 2024 - John Paul Adrian Glaubitz + +- Update to 3.10.7 + * Improve performance of stable Rust amd64 builds. +- from version 3.10.6 + * Improve performance. +- from version 3.10.5 + * Improve performance. +- from version 3.10.4 + * Improve performance. +- from version 3.10.3 + * `manylinux` amd64 builds include runtime-detected AVX-512 `str` + implementation. + * Tests now compatible with numpy v2. +- from version 3.10.2 + * Fix crash serializing `str` introduced in 3.10.1. + * Improve performance. + * Drop support for arm7. +- from version 3.10.1 + * Serializing `numpy.ndarray` with non-native endianness raises + `orjson.JSONEncodeError`. + * Improve performance of serializing. +- from version 3.10.0 + * Support serializing `numpy.float16` (`numpy.half`). + * sdist uses metadata 2.3 instead of 2.1. + * Improve Windows PyPI builds. + +------------------------------------------------------------------- +Thu Feb 29 06:46:24 UTC 2024 - Daniel Garcia + +- Update to 3.9.15 (bsc#1220489, CVE-2024-27454): + * Implement recursion limit of 1024 on orjson.loads(). + * Use byte-exact read on str formatting SIMD path to avoid crash. +- 3.9.14: + * Fix crash serializing str introduced in 3.9.11. + * Build now depends on Rust 1.72 or later. +- 3.9.13: + * Serialization str escape uses only 128-bit SIMD. + * Fix compatibility with CPython 3.13 alpha 3. + * Publish musllinux_1_2 instead of musllinux_1_1 wheels. + * Serialization uses small integer optimization in CPython 3.12 or later. +- 3.9.12: + * Minimal musllinux_1_1 build due to sporadic CI failure. +- 3.9.11: + * Improve performance of serializing. str is significantly faster. Documents + using dict, list, and tuple are somewhat faster. + +------------------------------------------------------------------- +Sun Jan 14 14:46:13 UTC 2024 - Ben Greiner + +- Update to 3.9.10 + * Fix debug assert failure on 3.12 --profile=dev build. +- Release 3.9.9 + * orjson module metadata explicitly marks subinterpreters as not + supported. +- Release 3.9.8 + * Improve performance. + * Drop support for Python 3.7. +- Release 3.9.7 + * Fix crash in orjson.loads() due to non-reentrant handling of + persistent buffer. This was introduced in 3.9.3. + * Handle some FFI removals in CPython 3.13. +- Release 3.9.6 + * Fix numpy reference leak on unsupported array dtype. + * Fix numpy.datetime64 reference handling. + * Minor performance improvements. +- Release 3.9.5 + * Remove futex from module import and initialization path. +- Release 3.9.4 + * Fix hash builder using default values. + * Fix non-release builds of orjson copying large deserialization + buffer from stack to heap. This was introduced in 3.9.3. +- Release 3.9.3 + * Fix compatibility with CPython 3.12. + * Support i686/x86 32-bit Python installs on Windows. +- Release 3.9.2 + * Fix the __cause__ exception on orjson.JSONEncodeError possibly + being denormalized, i.e., of type str instead of Exception. +- Release 3.9.1 + * Fix memory leak on chained tracebacks of exceptions raised in + default. This was introduced in 3.8.12. +- Release 3.9.0 + * orjson.Fragment includes already-serialized JSON in a document. +- Release 3.8.13 + * Source distribution contains all source code required for an + offline build. + * Build uses maturin v1. +- Release 3.8.12 + * Exceptions raised in default are now chained as the __cause__ + attribute on orjson.JSONEncodeError. +- Release 3.8.11 + * orjson.loads() on an empty document has a specific error + message. +- Avoid cargo_audit error because of shipped old vulnerable + zerocopy: Devendor the shipped cargo and update the cargo_vendor + service + +------------------------------------------------------------------- +Sat Jun 10 17:38:51 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Thu Apr 13 19:01:31 UTC 2023 - Matej Cepl + +- Update to 3.8.10: + - Fix compatibility with CPython 3.12.0a7. + - Fix compatibility with big-endian architectures. + - Fix crash in serialization. + - Fix parallel initialization of orjson. + +------------------------------------------------------------------- +Mon Jan 2 20:07:26 UTC 2023 - Dirk Müller + +- update to 3.8.3: + * `orjson.dumps()` accepts `option=None` per `Optional[int]` type. + * Fix tests on 32-bit for `numpy.intp` and `numpy.uintp`. + * Build now depends on rustc 1.60 or later. + * Support building with maturin 0.13 or 0.14. + +------------------------------------------------------------------- +Fri Oct 28 18:35:24 UTC 2022 - Yogalakshmi Arunachalam + +- Update to 3.8.1 + - Build maintenance for Python 3.11. + +------------------------------------------------------------------- +Wed Sep 21 12:11:03 UTC 2022 - Matej Cepl + +- Update to 3.8.0: + - Support serializing numpy.int16 and numpy.uint16. + - Fix datetime regression tests with tzinfo 2022b. + +------------------------------------------------------------------- +Wed Sep 21 00:35:02 UTC 2022 - John Vandenberg + +- Activate test suite +- Tidy spec + +------------------------------------------------------------------- +Wed Jul 13 07:52:11 UTC 2022 - Adrian Schröter + +- initial package of version 3.7.7 + diff --git a/python-orjson.spec b/python-orjson.spec new file mode 100644 index 0000000..cfe2e0d --- /dev/null +++ b/python-orjson.spec @@ -0,0 +1,85 @@ +# +# spec file for package python-orjson +# +# 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-orjson +Version: 3.10.12 +Release: 0 +Summary: Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy +License: Apache-2.0 OR MIT +URL: https://github.com/ijl/orjson +# Update: Run `osc service runall download_files && sh ./devendor-sdist.sh && osc service runall cargo_vendor` +Source0: orjson-%{version}-devendored.tar.xz +Source1: vendor.tar.xz +Source2: https://files.pythonhosted.org/packages/source/o/orjson/orjson-%{version}.tar.gz +Source3: devendor-sdist.sh +Source4: PACKAGING_README.md +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module maturin >= 1} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: cargo-packaging +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# SECTION test requirements +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pendulum} +BuildRequires: %{python_module psutil} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module python-dateutil} +BuildRequires: %{python_module pytz} +BuildRequires: %{python_module xxhash} +BuildRequires: timezone +# /SECTION +%python_subpackages + +%description +orjson is a fast JSON library for Python. +It benchmarks as the fastest Python library for JSON. + +%prep +%autosetup -a1 -n orjson-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +donttest="bydefaultnothingfails" +%ifarch %ix86 %arm32 +# test_numpy_array_d1_uintp and test_numpy_array_d1_intp fail on 32bit +donttest="$donttest or test_numpy_array_d1_intp or test_numpy_array_d1_uintp" +%endif +%ifarch ppc64le +# test_memory_loads_keys occasionally fails on crashes on ppc64le +donttest="$donttest or test_memory_loads_keys" +%endif + +%pytest_arch -k "not ($donttest)" + +%files %{python_files} +%doc README.md CHANGELOG.md +%license LICENSE-APACHE LICENSE-MIT +%{python_sitearch}/orjson +%{python_sitearch}/orjson-%{version}.dist-info + +%changelog diff --git a/vendor.tar.xz b/vendor.tar.xz new file mode 100644 index 0000000..396a13c --- /dev/null +++ b/vendor.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2797b74bdc5775e45ae3ab6f2165441056828a3296c5b1b59d1c99be9ab30a3f +size 2401672