From 44182464bac55d1abb2741eb732ce4b30dc9bf1c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 24 May 2024 12:53:57 -0400 Subject: [PATCH 01/19] Rebuild with Rust 1.78 to fix incomplete debuginfo and backtraces --- python-orjson.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-orjson.spec b/python-orjson.spec index 539ae9c..19fc41d 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -9,7 +9,7 @@ Name: python-orjson Version: 3.9.13 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Fast, correct Python JSON library License: Apache-2.0 OR MIT @@ -95,6 +95,9 @@ export RUSTFLAGS='%{build_rustflags}' %changelog +* Fri May 24 2024 Benjamin A. Beasley - 3.9.13-2 +- Rebuild with Rust 1.78 to fix incomplete debuginfo and backtraces + * Tue Feb 6 2024 Maxwell G - 3.9.13-1 - Update to 3.9.13. Fixes rhbz#2262570. From d8820d2ebcae05fcd4997b9117e381440de201cc Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 4 Jun 2024 12:32:19 -0400 Subject: [PATCH 02/19] Update to 3.9.15 --- .gitignore | 1 + Remove-strict-ahash-version-pin.patch | 25 ------------------------- python-orjson.spec | 8 +++++--- sources | 2 +- 4 files changed, 7 insertions(+), 29 deletions(-) delete mode 100644 Remove-strict-ahash-version-pin.patch diff --git a/.gitignore b/.gitignore index 87f5fcf..ddff4cc 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /orjson-3.9.10.tar.gz /orjson-3.9.12.tar.gz /orjson-3.9.13.tar.gz +/orjson-3.9.15.tar.gz diff --git a/Remove-strict-ahash-version-pin.patch b/Remove-strict-ahash-version-pin.patch deleted file mode 100644 index 569f70f..0000000 --- a/Remove-strict-ahash-version-pin.patch +++ /dev/null @@ -1,25 +0,0 @@ -From db97d953cbe35e6a34372e4a9d4702d3fdd5ddb1 Mon Sep 17 00:00:00 2001 -From: Maxwell G -Date: Thu, 18 Jan 2024 21:07:59 +0000 -Subject: [PATCH] Remove strict ahash version pin - ---- - Cargo.toml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Cargo.toml b/Cargo.toml -index c2cf457..475a1c0 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -45,7 +45,7 @@ no-panic = [ - yyjson = [] - - [dependencies] --ahash = { version = "=0.8.6", default_features = false, features = ["compile-time-rng"] } -+ahash = { version = "0.8.6", default_features = false, features = ["compile-time-rng"] } - arrayvec = { version = "0.7", default_features = false, features = ["std", "serde"] } - associative-cache = { version = "2", default_features = false } - beef = { version = "0.5", default_features = false, features = ["impl_serde"] } --- -2.43.0 - diff --git a/python-orjson.spec b/python-orjson.spec index 19fc41d..0ca3749 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -8,14 +8,13 @@ %bcond tests 1 Name: python-orjson -Version: 3.9.13 -Release: 2%{?dist} +Version: 3.9.15 +Release: 1%{?dist} Summary: Fast, correct Python JSON library License: Apache-2.0 OR MIT URL: https://github.com/ijl/orjson Source: %{pypi_source orjson} -Patch: Remove-strict-ahash-version-pin.patch BuildRequires: tomcli BuildRequires: python3-devel @@ -95,6 +94,9 @@ export RUSTFLAGS='%{build_rustflags}' %changelog +* Tue Jun 04 2024 Benjamin A. Beasley - 3.9.15-1 +- Update to 3.9.15. + * Fri May 24 2024 Benjamin A. Beasley - 3.9.13-2 - Rebuild with Rust 1.78 to fix incomplete debuginfo and backtraces diff --git a/sources b/sources index b6c529d..85276eb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (orjson-3.9.13.tar.gz) = c3fc7ad42a2ea40fa996cec11609c3d72ad3ad42a2ef24d36472bb89e5231ae6288c4ded57ba69074a04244e2e8ab7cf878c26b79bb01d5f6883be18395cd219 +SHA512 (orjson-3.9.15.tar.gz) = ad6a7bbb8ffbf1eff05fd421527264336a844133dd8c19303cd22d767ad5f76047191beba8b45b1eed79c7024099a9e04529c40d669db76475191c67a42fc183 From ea25c769b4ac9f8666a2eb5017d1a137260340bb Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 1 Jun 2024 08:44:03 -0400 Subject: [PATCH 03/19] Print the reasons for skipped tests --- python-orjson.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-orjson.spec b/python-orjson.spec index 0ca3749..c69d4bf 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -84,7 +84,8 @@ export RUSTFLAGS='%{build_rustflags}' %pyproject_check_import %if %{with tests} # --forked: protect the pytest process against test segfaults -%pytest --forked +# -rs: print the reasons for skipped tests +%pytest --forked -rs %endif From 4a83f9b813616664b802aa994e8c6f1abdfb2505 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 1 Jun 2024 15:50:44 -0400 Subject: [PATCH 04/19] Re-enable skipped numpy and pendulum integration tests --- python-orjson.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-orjson.spec b/python-orjson.spec index c69d4bf..5f1665f 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -19,6 +19,11 @@ Source: %{pypi_source orjson} BuildRequires: tomcli BuildRequires: python3-devel BuildRequires: %{py3_dist pytest-forked} +# Upstream restricts these test dependencies to particular Python interpreter +# versions and architectures, but we would like to run the corresponding tests +# everywhere. +BuildRequires: %{py3_dist numpy} +BuildRequires: %{py3_dist pendulum} BuildRequires: rust-packaging From 5052b5c625f4800b80e64dcdb8e3825c481f2bc4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 1 Jun 2024 15:52:28 -0400 Subject: [PATCH 05/19] Enable skipped pandas and psutil integration tests --- python-orjson.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-orjson.spec b/python-orjson.spec index 5f1665f..f0fb1a1 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -24,6 +24,11 @@ BuildRequires: %{py3_dist pytest-forked} # everywhere. BuildRequires: %{py3_dist numpy} BuildRequires: %{py3_dist pendulum} +# These are not in tests/requirements.txt, but they enable additional tests +%ifnarch %{ix86} +BuildRequires: %{py3_dist pandas} +%endif +BuildRequires: %{py3_dist psutil} BuildRequires: rust-packaging From 0fa86799d636674db8a55fdaaf7874e26de9666e Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 31 Jul 2024 14:20:40 -0400 Subject: [PATCH 06/19] Convert to %autorelease and %autochangelog [skip changelog] --- changelog | 49 +++++++++++++++++++++++++++++++++++++++++++ python-orjson.spec | 52 ++-------------------------------------------- 2 files changed, 51 insertions(+), 50 deletions(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..6ef650e --- /dev/null +++ b/changelog @@ -0,0 +1,49 @@ +* Tue Jun 04 2024 Benjamin A. Beasley - 3.9.15-1 +- Update to 3.9.15. + +* Fri May 24 2024 Benjamin A. Beasley - 3.9.13-2 +- Rebuild with Rust 1.78 to fix incomplete debuginfo and backtraces + +* Tue Feb 6 2024 Maxwell G - 3.9.13-1 +- Update to 3.9.13. Fixes rhbz#2262570. + +* Fri Jan 26 2024 Fedora Release Engineering - 3.9.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 3.9.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jan 18 2024 Maxwell G - 3.9.12-1 +- Update to 3.9.12. Fixes rhbz#2259025. + +* Wed Nov 22 2023 Maxwell G - 3.9.10-1 +- Update to 3.9.10. Fixes rhbz#2243767. + +* Tue Oct 10 2023 Maxwell G - 3.9.8-1 +- Update to 3.9.8. Fixes rhbz#2229530. + +* Tue Jul 25 2023 Tomáš Hrnčiar - 3.9.2-2 +- Backport patch to add PyType_GetDict for Python 3.12 +- Fixes: rhbz#2220383 + +* Fri Jul 21 2023 Maxwell G - 3.9.2-1 +- Update to 3.9.2. Fixes rhbz#2211703. + +* Fri Jul 21 2023 Maxwell G - 3.8.14-1 +- Update to 3.8.14. + +* Fri Jul 21 2023 Fedora Release Engineering - 3.8.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 27 2023 Python Maint - 3.8.12-2 +- Rebuilt for Python 3.12 + +* Thu May 18 2023 Maxwell G - 3.8.12-1 +- Update to 3.8.12. +- Use maturin as a build system when available + +* Fri May 5 2023 Maxwell G - 3.8.11-1 +- Update to 3.8.11. Fixes rhbz#2193468. + +* Wed Apr 12 2023 Maxwell G - 3.8.10-1 +- Initial package (rhbz#2184237). diff --git a/python-orjson.spec b/python-orjson.spec index f0fb1a1..5e84e0e 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -9,7 +9,7 @@ Name: python-orjson Version: 3.9.15 -Release: 1%{?dist} +Release: %autorelease Summary: Fast, correct Python JSON library License: Apache-2.0 OR MIT @@ -105,52 +105,4 @@ export RUSTFLAGS='%{build_rustflags}' %changelog -* Tue Jun 04 2024 Benjamin A. Beasley - 3.9.15-1 -- Update to 3.9.15. - -* Fri May 24 2024 Benjamin A. Beasley - 3.9.13-2 -- Rebuild with Rust 1.78 to fix incomplete debuginfo and backtraces - -* Tue Feb 6 2024 Maxwell G - 3.9.13-1 -- Update to 3.9.13. Fixes rhbz#2262570. - -* Fri Jan 26 2024 Fedora Release Engineering - 3.9.12-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Mon Jan 22 2024 Fedora Release Engineering - 3.9.12-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Thu Jan 18 2024 Maxwell G - 3.9.12-1 -- Update to 3.9.12. Fixes rhbz#2259025. - -* Wed Nov 22 2023 Maxwell G - 3.9.10-1 -- Update to 3.9.10. Fixes rhbz#2243767. - -* Tue Oct 10 2023 Maxwell G - 3.9.8-1 -- Update to 3.9.8. Fixes rhbz#2229530. - -* Tue Jul 25 2023 Tomáš Hrnčiar - 3.9.2-2 -- Backport patch to add PyType_GetDict for Python 3.12 -- Fixes: rhbz#2220383 - -* Fri Jul 21 2023 Maxwell G - 3.9.2-1 -- Update to 3.9.2. Fixes rhbz#2211703. - -* Fri Jul 21 2023 Maxwell G - 3.8.14-1 -- Update to 3.8.14. - -* Fri Jul 21 2023 Fedora Release Engineering - 3.8.12-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jun 27 2023 Python Maint - 3.8.12-2 -- Rebuilt for Python 3.12 - -* Thu May 18 2023 Maxwell G - 3.8.12-1 -- Update to 3.8.12. -- Use maturin as a build system when available - -* Fri May 5 2023 Maxwell G - 3.8.11-1 -- Update to 3.8.11. Fixes rhbz#2193468. - -* Wed Apr 12 2023 Maxwell G - 3.8.10-1 -- Initial package (rhbz#2184237). +%autochangelog From 262e9dc8210b09186c8967445a658bdb772b6ed2 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Mon, 15 Apr 2024 23:31:00 +0000 Subject: [PATCH 07/19] Update to 3.10.6. - Fixes rhbz#2291190, fixes rhbz#2278078, fixes rhbz#2264126. --- .gitignore | 1 + python-orjson.spec | 20 ++++++++++++++++---- sources | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index ddff4cc..9c3db56 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /orjson-3.9.12.tar.gz /orjson-3.9.13.tar.gz /orjson-3.9.15.tar.gz +/orjson-3.10.6.tar.gz diff --git a/python-orjson.spec b/python-orjson.spec index 5e84e0e..a9f8d6a 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -8,7 +8,7 @@ %bcond tests 1 Name: python-orjson -Version: 3.9.15 +Version: 3.10.6 Release: %autorelease Summary: Fast, correct Python JSON library @@ -44,13 +44,14 @@ Summary: %{summary} # (Apache-2.0 OR MIT) AND BSD-3-Clause # Apache-2.0 OR BSL-1.0 # Apache-2.0 OR MIT -# BSD-2-Clause OR Apache-2.0 OR MIT +# BSL-1.0 # MIT +# MIT OR Apache-2.0 (duplicate) License: %{shrink: (Apache-2.0 OR MIT) AND BSD-3-Clause AND (Apache-2.0 OR BSL-1.0) AND - (BSD-2-Clause OR Apache-2.0 OR MIT) AND + BSL-1.0 AND MIT } @@ -62,15 +63,26 @@ License: %{shrink: %autosetup -p1 -n orjson-%{version} %cargo_prep -# Remove unstable feature that requires rust nightly +# Remove unstable features that require rust nightly; the avx512 feature also +# requires the x86_64 architecture tomcli-set Cargo.toml del 'features.unstable-simd' +tomcli-set Cargo.toml del 'features.avx512' # Remove no-panic feature tomcli-set Cargo.toml del 'features.no-panic' +# Remove unwind feature, which is not useful here: the comment above it says +# “Avoid bundling libgcc on musl.” +tomcli-set Cargo.toml del 'features.unwind' +tomcli-set Cargo.toml del 'dependencies.unwinding' +# Remove strict dependencies +sed -Ei 's|(version = ")=|\1|' Cargo.toml # Remove bundled rust crates rm -r include/cargo # Remove bundled yyjson. rm -rv include/yyjson/ +# Remove unpackaged PyPI plugin +sed -i '/pytest-random-order/d' test/requirements.txt + %generate_buildrequires diff --git a/sources b/sources index 85276eb..76f47dc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (orjson-3.9.15.tar.gz) = ad6a7bbb8ffbf1eff05fd421527264336a844133dd8c19303cd22d767ad5f76047191beba8b45b1eed79c7024099a9e04529c40d669db76475191c67a42fc183 +SHA512 (orjson-3.10.6.tar.gz) = a3b6bfe4c9611ae62476490ccf9378135df2a714743df2252d247c8bf5724943d5717d2821d22305a854426e2be38cb9d40067aa892035414e8db5b26f1d90fb From 4934db060ea6cebd348b30ceddb482cef943c431 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 9 Aug 2024 11:32:16 -0400 Subject: [PATCH 08/19] Update to 3.10.7. Fixes rhbz#2303811 --- .gitignore | 1 + python-orjson.spec | 6 ++++-- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9c3db56..72a1df7 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /orjson-3.9.13.tar.gz /orjson-3.9.15.tar.gz /orjson-3.10.6.tar.gz +/orjson-3.10.7.tar.gz diff --git a/python-orjson.spec b/python-orjson.spec index a9f8d6a..ddddd97 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -8,7 +8,7 @@ %bcond tests 1 Name: python-orjson -Version: 3.10.6 +Version: 3.10.7 Release: %autorelease Summary: Fast, correct Python JSON library @@ -47,12 +47,14 @@ Summary: %{summary} # BSL-1.0 # MIT # MIT OR Apache-2.0 (duplicate) +# Unlicense OR MIT License: %{shrink: (Apache-2.0 OR MIT) AND BSD-3-Clause AND (Apache-2.0 OR BSL-1.0) AND BSL-1.0 AND - MIT + MIT AND + (Unlicense OR MIT) } diff --git a/sources b/sources index 76f47dc..ea98349 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (orjson-3.10.6.tar.gz) = a3b6bfe4c9611ae62476490ccf9378135df2a714743df2252d247c8bf5724943d5717d2821d22305a854426e2be38cb9d40067aa892035414e8db5b26f1d90fb +SHA512 (orjson-3.10.7.tar.gz) = 3940b76039d6494626e69f9a2a0373779827c6686ab1321411f3b3a5056e0df227b68c9555796ce45f3952fe597c50740934d764f30dcf8bc1c84b2baf4b6631 From 685e618ce942aa0f3a1549bbe00ba082cc97916c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 19 Oct 2024 14:15:01 -0400 Subject: [PATCH 09/19] Update to 3.10.11. Fixes rhbz#2319918 - Both pyo3-ffi and pyo3-build-config are now vendored and forked - Add license files for vendored PyO3 crates --- .gitignore | 2 ++ python-orjson.spec | 29 ++++++++++++++++++++++++++--- sources | 2 +- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 72a1df7..497ab11 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ /orjson-3.9.15.tar.gz /orjson-3.10.6.tar.gz /orjson-3.10.7.tar.gz +/orjson-3.10.10.tar.gz +/orjson-3.10.11.tar.gz diff --git a/python-orjson.spec b/python-orjson.spec index ddddd97..df4f430 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -8,7 +8,7 @@ %bcond tests 1 Name: python-orjson -Version: 3.10.7 +Version: 3.10.11 Release: %autorelease Summary: Fast, correct Python JSON library @@ -48,6 +48,8 @@ Summary: %{summary} # MIT # MIT OR Apache-2.0 (duplicate) # Unlicense OR MIT +# +# Bundled PyO3 crates in include/pyo3/ are also (Apache-2.0 OR MIT). License: %{shrink: (Apache-2.0 OR MIT) AND BSD-3-Clause AND @@ -57,6 +59,18 @@ License: %{shrink: (Unlicense OR MIT) } +# Path to using published versions of pyo3-ffi/pyo3-build-config again? +# https://github.com/ijl/orjson/issues/524 +# +# “You are welcome to work to upstream the diff if you find the vendoring +# unsuitable for your organization's own preferences.” +# +# Note that the vendored crates are actually *forked* from a snapshot, +# https://github.com/PyO3/pyo3/commit/dc415fae9f5eaa8ac0f6d0ea769b9ab28860898f; +# see https://github.com/ijl/orjson/issues/524#issuecomment-2424170405 for +# details. +Provides: bundled(crate(pyo3-build-config)) = 0.23.0~dev^20241018gitdc415fa +Provides: bundled(crate(pyo3-ffi)) = 0.23.0~dev^20241018gitdc415fa %description -n python3-orjson %{_description} @@ -82,14 +96,23 @@ rm -r include/cargo # Remove bundled yyjson. rm -rv include/yyjson/ +# Collect licenses for remaining vendored crates +mkdir -p LICENSES.vendored/pyo3 +cp -vp include/pyo3/LICENSE* LICENSES.vendored/pyo3/ + # Remove unpackaged PyPI plugin sed -i '/pytest-random-order/d' test/requirements.txt - %generate_buildrequires %pyproject_buildrequires %{?with_tests:test/requirements.txt} %cargo_generate_buildrequires +for dir in include/pyo3/*/ +do + pushd "${dir}" >/dev/null + %cargo_generate_buildrequires + popd >/dev/null +done %build @@ -114,7 +137,7 @@ export RUSTFLAGS='%{build_rustflags}' %files -n python3-orjson -f %{pyproject_files} -%license LICENSE-MIT LICENSE-APACHE LICENSES.dependencies +%license LICENSE-MIT LICENSE-APACHE LICENSES.dependencies LICENSES.vendored/ %doc README.md diff --git a/sources b/sources index ea98349..9460ae7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (orjson-3.10.7.tar.gz) = 3940b76039d6494626e69f9a2a0373779827c6686ab1321411f3b3a5056e0df227b68c9555796ce45f3952fe597c50740934d764f30dcf8bc1c84b2baf4b6631 +SHA512 (orjson-3.10.11.tar.gz) = b7a960cd06c0176a194c7c9e9dd412c47000258fb79e2407182156e07a48bc02823118ac708c23f482bcb8f3b77dcdcfd95f61f408b45cbaabca8ed317ef63e4 From 27c4c093484ca248e8ea8ba4c1b1c299b1749177 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 25 Nov 2024 13:17:18 -0500 Subject: [PATCH 10/19] Update to 3.10.12. Fixes rhbz#2328508 --- .gitignore | 1 + python-orjson.spec | 4 +--- sources | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 497ab11..8e3a4f3 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /orjson-3.10.7.tar.gz /orjson-3.10.10.tar.gz /orjson-3.10.11.tar.gz +/orjson-3.10.12.tar.gz diff --git a/python-orjson.spec b/python-orjson.spec index df4f430..4af3e8a 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -8,7 +8,7 @@ %bcond tests 1 Name: python-orjson -Version: 3.10.11 +Version: 3.10.12 Release: %autorelease Summary: Fast, correct Python JSON library @@ -83,8 +83,6 @@ Provides: bundled(crate(pyo3-ffi)) = 0.23.0~dev^20241018gitdc415fa # requires the x86_64 architecture tomcli-set Cargo.toml del 'features.unstable-simd' tomcli-set Cargo.toml del 'features.avx512' -# Remove no-panic feature -tomcli-set Cargo.toml del 'features.no-panic' # Remove unwind feature, which is not useful here: the comment above it says # “Avoid bundling libgcc on musl.” tomcli-set Cargo.toml del 'features.unwind' diff --git a/sources b/sources index 9460ae7..6bdca07 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (orjson-3.10.11.tar.gz) = b7a960cd06c0176a194c7c9e9dd412c47000258fb79e2407182156e07a48bc02823118ac708c23f482bcb8f3b77dcdcfd95f61f408b45cbaabca8ed317ef63e4 +SHA512 (orjson-3.10.12.tar.gz) = 089420645ef4a54674436ebc4f49ba67fda4fff716c949e03a4af402fdd817decd066c508b18c19ac24b634e7173b37924ac1c2180679a92551884957d4b11ae From 1b47f1a1fb9a005682c4305f620e9fbcf2bd52a0 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 30 Dec 2024 08:49:56 -0500 Subject: [PATCH 11/19] Update to 3.10.13 (close RHBZ#2334886) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Work around upstream’s maturin version pin to allow building with maturin 1.8.0 --- .gitignore | 1 + orjson-3.10.13-unpin-maturin.patch | 12 ++++++++++++ python-orjson.spec | 27 ++++++++++++++++++++++++++- sources | 2 +- 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 orjson-3.10.13-unpin-maturin.patch diff --git a/.gitignore b/.gitignore index 8e3a4f3..73493ed 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /orjson-3.10.10.tar.gz /orjson-3.10.11.tar.gz /orjson-3.10.12.tar.gz +/orjson-3.10.13.tar.gz diff --git a/orjson-3.10.13-unpin-maturin.patch b/orjson-3.10.13-unpin-maturin.patch new file mode 100644 index 0000000..4de1017 --- /dev/null +++ b/orjson-3.10.13-unpin-maturin.patch @@ -0,0 +1,12 @@ +diff -Naur orjson-3.10.13-original/pyproject.toml orjson-3.10.13/pyproject.toml +--- orjson-3.10.13-original/pyproject.toml 2024-12-29 18:05:45.000000000 -0500 ++++ orjson-3.10.13/pyproject.toml 2024-12-30 08:39:38.935289119 -0500 +@@ -31,7 +31,7 @@ + + [build-system] + build-backend = "maturin" +-requires = ["maturin==1.7.8"] ++requires = ["maturin>=1,<2"] + + [tool.maturin] + python-source = "pysrc" diff --git a/python-orjson.spec b/python-orjson.spec index 4af3e8a..85d4f16 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -8,7 +8,7 @@ %bcond tests 1 Name: python-orjson -Version: 3.10.12 +Version: 3.10.13 Release: %autorelease Summary: Fast, correct Python JSON library @@ -16,6 +16,31 @@ License: Apache-2.0 OR MIT URL: https://github.com/ijl/orjson Source: %{pypi_source orjson} +# To fix compatibility with maturin 1.8.0 and later *in the GitHub source +# archive*, we would need: +# +# pyproject.toml: Specify version metadata as dynamic +# https://github.com/ijl/orjson/pull/542 +# +# Fixes: +# +# Build error with maturin 1.8.0 +# https://github.com/ijl/orjson/issues/541 +# +# See also: +# +# https://github.com/PyO3/maturin/issues/2390 +# +# Upstream rejected this PR and decided to pin an old version of maturin +# instead, but we cannot respect this; we must use the system version. As long +# as we are using the *PyPI sdist* as our source, pyproject.toml has a static +# version field, and we don’t need to patch in the rejected PR. However, we +# must still unpin maturin via a partial revert – just the part that matters to +# us, in pyproject.toml – of: +# +# https://github.com/ijl/orjson/commit/9a4ef46991ad205b9a92cb6fdcb123c7ff72b640 +Patch: orjson-3.10.13-unpin-maturin.patch + BuildRequires: tomcli BuildRequires: python3-devel BuildRequires: %{py3_dist pytest-forked} diff --git a/sources b/sources index 6bdca07..e15eaa8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (orjson-3.10.12.tar.gz) = 089420645ef4a54674436ebc4f49ba67fda4fff716c949e03a4af402fdd817decd066c508b18c19ac24b634e7173b37924ac1c2180679a92551884957d4b11ae +SHA512 (orjson-3.10.13.tar.gz) = 84ee3a42654e5576190dd115483db1e3a9a151b22de79b99b497c2e181adbd5e33a4aa77bb5f72394e0947887e657c5dc6380e852dddb4a5e95b47e72486b18c From 95250cb6dad3d40f68832be8055617c498282a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 6 Jan 2025 20:05:01 +0100 Subject: [PATCH 12/19] Allow the bundled pyo3 to build this with unsupported Python versions [skip changelog] --- python-orjson.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-orjson.spec b/python-orjson.spec index 85d4f16..f9283be 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -142,6 +142,11 @@ done export RUSTFLAGS='%{build_rustflags}' %cargo_license_summary %{cargo_license} > LICENSES.dependencies +# Fedora's pyo3 is patched to not check Python version when building RPM packages. +# However, this uses a bundled version without the patch. +# Rather than patching it, we set the environment variable, +# which allows us to test this package with development Python versions. +export UNSAFE_PYO3_SKIP_VERSION_CHECK=1 %pyproject_wheel From de35b7307fa1a95ffa5ee6d3682d57ebbf54fb47 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 9 Jan 2025 14:13:26 -0500 Subject: [PATCH 13/19] Update to 3.10.14 (close RHBZ#2336424) --- .gitignore | 1 + orjson-3.10.13-unpin-maturin.patch | 12 ---------- python-orjson.spec | 37 ++++-------------------------- sources | 2 +- 4 files changed, 7 insertions(+), 45 deletions(-) delete mode 100644 orjson-3.10.13-unpin-maturin.patch diff --git a/.gitignore b/.gitignore index 73493ed..7dd507b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /orjson-3.10.11.tar.gz /orjson-3.10.12.tar.gz /orjson-3.10.13.tar.gz +/orjson-3.10.14.tar.gz diff --git a/orjson-3.10.13-unpin-maturin.patch b/orjson-3.10.13-unpin-maturin.patch deleted file mode 100644 index 4de1017..0000000 --- a/orjson-3.10.13-unpin-maturin.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur orjson-3.10.13-original/pyproject.toml orjson-3.10.13/pyproject.toml ---- orjson-3.10.13-original/pyproject.toml 2024-12-29 18:05:45.000000000 -0500 -+++ orjson-3.10.13/pyproject.toml 2024-12-30 08:39:38.935289119 -0500 -@@ -31,7 +31,7 @@ - - [build-system] - build-backend = "maturin" --requires = ["maturin==1.7.8"] -+requires = ["maturin>=1,<2"] - - [tool.maturin] - python-source = "pysrc" diff --git a/python-orjson.spec b/python-orjson.spec index f9283be..68d8a52 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -8,7 +8,7 @@ %bcond tests 1 Name: python-orjson -Version: 3.10.13 +Version: 3.10.14 Release: %autorelease Summary: Fast, correct Python JSON library @@ -16,31 +16,6 @@ License: Apache-2.0 OR MIT URL: https://github.com/ijl/orjson Source: %{pypi_source orjson} -# To fix compatibility with maturin 1.8.0 and later *in the GitHub source -# archive*, we would need: -# -# pyproject.toml: Specify version metadata as dynamic -# https://github.com/ijl/orjson/pull/542 -# -# Fixes: -# -# Build error with maturin 1.8.0 -# https://github.com/ijl/orjson/issues/541 -# -# See also: -# -# https://github.com/PyO3/maturin/issues/2390 -# -# Upstream rejected this PR and decided to pin an old version of maturin -# instead, but we cannot respect this; we must use the system version. As long -# as we are using the *PyPI sdist* as our source, pyproject.toml has a static -# version field, and we don’t need to patch in the rejected PR. However, we -# must still unpin maturin via a partial revert – just the part that matters to -# us, in pyproject.toml – of: -# -# https://github.com/ijl/orjson/commit/9a4ef46991ad205b9a92cb6fdcb123c7ff72b640 -Patch: orjson-3.10.13-unpin-maturin.patch - BuildRequires: tomcli BuildRequires: python3-devel BuildRequires: %{py3_dist pytest-forked} @@ -90,12 +65,10 @@ License: %{shrink: # “You are welcome to work to upstream the diff if you find the vendoring # unsuitable for your organization's own preferences.” # -# Note that the vendored crates are actually *forked* from a snapshot, -# https://github.com/PyO3/pyo3/commit/dc415fae9f5eaa8ac0f6d0ea769b9ab28860898f; -# see https://github.com/ijl/orjson/issues/524#issuecomment-2424170405 for -# details. -Provides: bundled(crate(pyo3-build-config)) = 0.23.0~dev^20241018gitdc415fa -Provides: bundled(crate(pyo3-ffi)) = 0.23.0~dev^20241018gitdc415fa +# Note that these crates are actually forked, not only bundled/vendored; see +# https://github.com/ijl/orjson/issues/524#issuecomment-2424170405 for details. +Provides: bundled(crate(pyo3-build-config)) = 0.23.3 +Provides: bundled(crate(pyo3-ffi)) = 0.23.3 %description -n python3-orjson %{_description} diff --git a/sources b/sources index e15eaa8..21c9858 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (orjson-3.10.13.tar.gz) = 84ee3a42654e5576190dd115483db1e3a9a151b22de79b99b497c2e181adbd5e33a4aa77bb5f72394e0947887e657c5dc6380e852dddb4a5e95b47e72486b18c +SHA512 (orjson-3.10.14.tar.gz) = d186e95ac6750af9f2688744fe663e63973e06942fcbfc10deadc1d63a5ad59f437ea4e2485d1866bde6abcd59086fa5c1a0794d3ba975e693995d3ca58f0f76 From 1d5f8b2efe6c9979c4511e6cc038e1475615e4d3 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 2 Apr 2025 19:57:33 -0400 Subject: [PATCH 14/19] Replace rust-packaging BR with cargo-rpm-macros https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/#_mandatory_buildrequires [skip changelog] --- python-orjson.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-orjson.spec b/python-orjson.spec index 68d8a52..f48eeb3 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -29,7 +29,7 @@ BuildRequires: %{py3_dist pendulum} BuildRequires: %{py3_dist pandas} %endif BuildRequires: %{py3_dist psutil} -BuildRequires: rust-packaging +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: From a6ba1242a8c6f35a6c31e45eb0a46329a8a5652d Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 2 Apr 2025 20:25:53 -0400 Subject: [PATCH 15/19] Omit Pendulum integration tests in EPEL10 --- python-orjson.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python-orjson.spec b/python-orjson.spec index f48eeb3..ccc4fbc 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -6,6 +6,8 @@ # Specfile compatability: EPEL >= 9 or Fedora >= 37 and RPM >= 4.16 %bcond tests 1 +# Not yet in EPEL10: https://bugzilla.redhat.com/show_bug.cgi?id=2356387 +%bcond pendulum %{undefined el10} Name: python-orjson Version: 3.10.14 @@ -23,7 +25,9 @@ BuildRequires: %{py3_dist pytest-forked} # versions and architectures, but we would like to run the corresponding tests # everywhere. BuildRequires: %{py3_dist numpy} +%if %{with pendulum} BuildRequires: %{py3_dist pendulum} +%endif # These are not in tests/requirements.txt, but they enable additional tests %ifnarch %{ix86} BuildRequires: %{py3_dist pandas} @@ -96,6 +100,9 @@ rm -rv include/yyjson/ mkdir -p LICENSES.vendored/pyo3 cp -vp include/pyo3/LICENSE* LICENSES.vendored/pyo3/ +%if %{without pendulum} +sed -i '/^pendulum\b/d' test/requirements.txt +%endif # Remove unpackaged PyPI plugin sed -i '/pytest-random-order/d' test/requirements.txt From 557eb6f4f00cd5454710b89a5cef9d7bd72351a2 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 3 Apr 2025 06:57:53 -0400 Subject: [PATCH 16/19] Remove spurious test dependency on arrow --- python-orjson.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-orjson.spec b/python-orjson.spec index ccc4fbc..99136a1 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -103,6 +103,9 @@ cp -vp include/pyo3/LICENSE* LICENSES.vendored/pyo3/ %if %{without pendulum} sed -i '/^pendulum\b/d' test/requirements.txt %endif +# Test dependency on arrow appears spurious +# https://github.com/ijl/orjson/issues/559 +sed -i '/^arrow\b/d' test/requirements.txt # Remove unpackaged PyPI plugin sed -i '/pytest-random-order/d' test/requirements.txt From b897e39a32d507ce401f931cb69dc96976134d59 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 2 Apr 2025 19:58:44 -0400 Subject: [PATCH 17/19] Update to 3.10.6 (close RHBZ#2354600) - Fixes compatibility with CPython 3.14 alpha 6 (close RHBZ#2349447) --- .gitignore | 1 + orjson-fix-metadata.diff | 12 ++++++++++++ python-orjson.spec | 9 ++++++--- sources | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 orjson-fix-metadata.diff diff --git a/.gitignore b/.gitignore index 7dd507b..dfe185d 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /orjson-3.10.12.tar.gz /orjson-3.10.13.tar.gz /orjson-3.10.14.tar.gz +/orjson-3.10.16.tar.gz diff --git a/orjson-fix-metadata.diff b/orjson-fix-metadata.diff new file mode 100644 index 0000000..b3116ec --- /dev/null +++ b/orjson-fix-metadata.diff @@ -0,0 +1,12 @@ +diff -Naur orjson-3.10.16-original/Cargo.toml orjson-3.10.16/Cargo.toml +--- orjson-3.10.16-original/Cargo.toml 1969-12-31 19:00:00.000000000 -0500 ++++ orjson-3.10.16/Cargo.toml 2025-04-02 20:09:24.874851253 -0400 +@@ -51,7 +51,7 @@ + [dependencies] + associative-cache = { version = "2", default-features = false } + bytecount = { version = "^0.6.7", default-features = false, features = ["runtime-dispatch-simd"] } +-compact_str = { version = "0.9", default-features = false, features = ["serde"] } ++compact_str = { version = ">=0.8, <0.10", default-features = false, features = ["serde"] } + encoding_rs = { version = "0.8", default-features = false } + half = { version = "2", default-features = false, features = ["std"] } + itoa = { version = "1", default-features = false } diff --git a/python-orjson.spec b/python-orjson.spec index 99136a1..31d96a3 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -10,7 +10,7 @@ %bcond pendulum %{undefined el10} Name: python-orjson -Version: 3.10.14 +Version: 3.10.16 Release: %autorelease Summary: Fast, correct Python JSON library @@ -18,6 +18,11 @@ License: Apache-2.0 OR MIT URL: https://github.com/ijl/orjson Source: %{pypi_source orjson} +# Manual patches for Cargo.toml +# - For now, allow compact_str 0.8; +# https://bugzilla.redhat.com/show_bug.cgi?id=2347456 +Patch: orjson-fix-metadata.diff + BuildRequires: tomcli BuildRequires: python3-devel BuildRequires: %{py3_dist pytest-forked} @@ -89,8 +94,6 @@ tomcli-set Cargo.toml del 'features.avx512' # “Avoid bundling libgcc on musl.” tomcli-set Cargo.toml del 'features.unwind' tomcli-set Cargo.toml del 'dependencies.unwinding' -# Remove strict dependencies -sed -Ei 's|(version = ")=|\1|' Cargo.toml # Remove bundled rust crates rm -r include/cargo # Remove bundled yyjson. diff --git a/sources b/sources index 21c9858..e553587 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (orjson-3.10.14.tar.gz) = d186e95ac6750af9f2688744fe663e63973e06942fcbfc10deadc1d63a5ad59f437ea4e2485d1866bde6abcd59086fa5c1a0794d3ba975e693995d3ca58f0f76 +SHA512 (orjson-3.10.16.tar.gz) = ea71aa463206feae1a96bb604366af2f17ddb083a1a4b7cc87c1b8ad1f01b54bd5c4ef148e9472fed8d8308de37b2a4e4fe0b4a4290d19eaf4fc3ae5777791f9 From c5771d270e1072b746b2df49ffc0644c36d31033 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 11 Apr 2025 08:08:42 -0400 Subject: [PATCH 18/19] Expect maturin to handle license files, except LICENSES.vendored/ See discussion in https://bugzilla.redhat.com/show_bug.cgi?id=2357473. --- python-orjson.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python-orjson.spec b/python-orjson.spec index 31d96a3..d2fb7ca 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -138,7 +138,7 @@ export UNSAFE_PYO3_SKIP_VERSION_CHECK=1 %install %pyproject_install -%pyproject_save_files orjson +%pyproject_save_files -l orjson %check @@ -151,7 +151,7 @@ export UNSAFE_PYO3_SKIP_VERSION_CHECK=1 %files -n python3-orjson -f %{pyproject_files} -%license LICENSE-MIT LICENSE-APACHE LICENSES.dependencies LICENSES.vendored/ +%license LICENSES.vendored/ %doc README.md From e3564f4545d58362df603364724fc351ee3d5714 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 12 Apr 2025 19:48:03 -0400 Subject: [PATCH 19/19] No longer allow compact_str 0.8 --- orjson-fix-metadata.diff | 12 ------------ python-orjson.spec | 5 ----- 2 files changed, 17 deletions(-) delete mode 100644 orjson-fix-metadata.diff diff --git a/orjson-fix-metadata.diff b/orjson-fix-metadata.diff deleted file mode 100644 index b3116ec..0000000 --- a/orjson-fix-metadata.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur orjson-3.10.16-original/Cargo.toml orjson-3.10.16/Cargo.toml ---- orjson-3.10.16-original/Cargo.toml 1969-12-31 19:00:00.000000000 -0500 -+++ orjson-3.10.16/Cargo.toml 2025-04-02 20:09:24.874851253 -0400 -@@ -51,7 +51,7 @@ - [dependencies] - associative-cache = { version = "2", default-features = false } - bytecount = { version = "^0.6.7", default-features = false, features = ["runtime-dispatch-simd"] } --compact_str = { version = "0.9", default-features = false, features = ["serde"] } -+compact_str = { version = ">=0.8, <0.10", default-features = false, features = ["serde"] } - encoding_rs = { version = "0.8", default-features = false } - half = { version = "2", default-features = false, features = ["std"] } - itoa = { version = "1", default-features = false } diff --git a/python-orjson.spec b/python-orjson.spec index d2fb7ca..c48f102 100644 --- a/python-orjson.spec +++ b/python-orjson.spec @@ -18,11 +18,6 @@ License: Apache-2.0 OR MIT URL: https://github.com/ijl/orjson Source: %{pypi_source orjson} -# Manual patches for Cargo.toml -# - For now, allow compact_str 0.8; -# https://bugzilla.redhat.com/show_bug.cgi?id=2347456 -Patch: orjson-fix-metadata.diff - BuildRequires: tomcli BuildRequires: python3-devel BuildRequires: %{py3_dist pytest-forked}