From 3ebdbdac596b6f01c97b89d3b67635519b10b944 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 30 Sep 2024 19:24:11 -0400 Subject: [PATCH 01/33] F41+: Drop i686 support (leaf package on that architecture) While many packages depend on this one, we believe we have correctly verified that all directly or indirectly dependent packages either are noarch or already exclude i686. --- python-cramjam.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-cramjam.spec b/python-cramjam.spec index 0510bc6..0afeb41 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -15,6 +15,9 @@ URL: https://github.com/milesgranger/cramjam # the GitHub source archive. Source: %{url}/archive/v%{version}/cramjam-%{version}.tar.gz +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + BuildRequires: python3-devel BuildRequires: tomcli BuildRequires: cargo-rpm-macros >= 24 From de7622062a1c9faffe8121481b04b985b5cbabf6 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 2 Oct 2024 07:33:52 -0400 Subject: [PATCH 02/33] Rebuilt with rust-brotli 7.0.0 From 818d3bee3d431d6c639a060e63eb255c3645cc6b Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 16 Oct 2024 07:32:01 -0400 Subject: [PATCH 03/33] Revert "Fix automatic provides on Python extension due to SONAME" - The root cause is fixed in rust-1.81.0-4 and later. This reverts commit 5d92fffdd308841a81bfbb5ee9a4a4fe8a656813. --- python-cramjam.spec | 7 ------- 1 file changed, 7 deletions(-) diff --git a/python-cramjam.spec b/python-cramjam.spec index 0afeb41..eca4d93 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -22,13 +22,6 @@ BuildRequires: python3-devel BuildRequires: tomcli BuildRequires: cargo-rpm-macros >= 24 -# The Python extension module now gets a SONAME of libcramjam.so; we -# must ensure it is not used to generate automatic Provides. See: -# Rust 1.81+ implicitly / automatically sets soname on cdylib targets -# https://bugzilla.redhat.com/show_bug.cgi?id=2314879 -# https://docs.fedoraproject.org/en-US/packaging-guidelines/AutoProvidesAndRequiresFiltering/#_filtering_provides_and_requires_after_scanning -%global __provides_exclude ^libcramjam\\.so.*$ - %global common_description %{expand: %{summary}.} From ded4fd5129cec126e4f980fa2ea0b18436e69a69 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 15 Sep 2024 20:05:40 -0400 Subject: [PATCH 04/33] Update to 2.9.0 (close RHBZ#2310247) --- .gitignore | 4 ++ get_source | 49 ++++++++++++++++++++ python-cramjam.spec | 110 +++++++++++++++++++++++++++++++------------- sources | 2 +- 4 files changed, 133 insertions(+), 32 deletions(-) create mode 100755 get_source diff --git a/.gitignore b/.gitignore index 43dc5da..064655e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ /cramjam-2.8.1.tar.gz /cramjam-2.8.2.tar.gz /cramjam-2.8.3.tar.gz +/cramjam-6068e8bbb8786c9173b2f0a229032b9ed7452b79-filtered.tar.gz +/cramjam-2.8.4.tar.gz +/cramjam-2.9.0rc1.tar.gz +/cramjam-2.9.0.tar.gz diff --git a/get_source b/get_source new file mode 100755 index 0000000..f2465bf --- /dev/null +++ b/get_source @@ -0,0 +1,49 @@ +#!/bin/sh +set -o errexit +set -o nounset + +if [ "$#" != '1' ] +then + cat 1>&2 < Downloading: ${URL}" 1>&2 +curl -L -O "${URL}" + +ARCHIVE="$(find . -mindepth 1 -maxdepth 1 -type f -name '*.tar.gz' -print -quit)" +echo "--> Extracting: $(basename "${ARCHIVE}")" 1>&2 +tar -xzf "${ARCHIVE}" +echo '--> Removing benchmarks/data/ due to licensing issues' 1>&2 +TARDIR="$(basename "${ARCHIVE}" '.tar.gz')" +MTIME="$(stat -c '%Y' "${TARDIR}")" +rm -rvf "${TARDIR}/benchmarks/data/" +# Make sure the original mtime is preserved even if we modified the base +# directory by removing something at the top level. (So far, we didn’t.) +touch -d @"${MTIME}" "${TARDIR}" +FILTERED="$(basename "${ARCHIVE}" .tar.gz)-filtered.tar.gz" +echo "--> Re-archiving: ${FILTERED}" 1>&2 +# https://www.gnu.org/software/tar/manual/html_section/Reproducibility.html +TZ=UTC LC_ALL=C tar \ + --create --verbose \ + --sort=name \ + --format=posix \ + --numeric-owner --owner=0 --group=0 \ + --mode=go+u,go-w \ + --pax-option='delete=atime,delete=ctime' \ + "${TARDIR}/" | + gzip -9 > "${FILTERED}" +mv -v "${FILTERED}" "${OUTDIR}" +echo 'Done.' 1>&2 diff --git a/python-cramjam.spec b/python-cramjam.spec index eca4d93..2cc1139 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -1,19 +1,34 @@ %bcond tests 1 Name: python-cramjam -Version: 2.8.3 +Version: 2.9.0 Release: %autorelease Summary: Thin Python bindings to de/compression algorithms in Rust # SPDX License: MIT URL: https://github.com/milesgranger/cramjam -# The PyPI sdist is structured like the git repository, but with pyproject.toml -# moved to the top level from cramjam-python/ and -# manifest-path = "cramjam-python/Cargo.toml" -# added to the [tool.maturin] section. We find it easiest to just build from -# the GitHub source archive. -Source: %{url}/archive/v%{version}/cramjam-%{version}.tar.gz + +%if !%{defined commit} + +# This handles pre-release versioning: +%global srcversion %(echo '%{version}' | tr -d '~') +# Future PyPI sdists should not include benchmark data (some of which has +# complicated or unclear license status). See: “Consider excluding benchmarks +# from PyPI sdists” https://github.com/milesgranger/cramjam/issues/178 +Source: %{pypi_source cramjam %{srcversion}} + +%else + +%global srcversion %{commit} +# For snapshots, we must filter the source archive from GitHub using the script +# in Source1, since some of the benchmark data has complicated or unclear +# license status. +Source0: cramjam-%{commit}-filtered.tar.gz +# ./get_source ${COMMIT} (or ${TAG}) +Source1: get_source + +%endif # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -22,6 +37,15 @@ BuildRequires: python3-devel BuildRequires: tomcli BuildRequires: cargo-rpm-macros >= 24 +%if %{with tests} +# These (along with some unwanted dependencies like linters) are listed in the +# dev extra in pyproject.toml. +BuildRequires: %{py3_dist numpy} +BuildRequires: %{py3_dist pytest} +BuildRequires: %{py3_dist pytest-xdist} +BuildRequires: %{py3_dist hypothesis} +%endif + %global common_description %{expand: %{summary}.} @@ -51,65 +75,89 @@ License: %{shrink: %prep -%autosetup -n cramjam-%{version} +%autosetup -n cramjam-%{srcversion} # Do not strip the compiled Python module; we need useful debuginfo. Upstream # set this intentionally, so this makes sense to keep downstream-only. -tomcli set cramjam-python/pyproject.toml false 'tool.maturin.strip' - -# Downstream-only: patch out linters/formatters/etc. from the “dev” extra so we -# can use it to generate test dependencies. -# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters -tomcli set cramjam-python/pyproject.toml lists delitem --type regex \ - 'project.optional-dependencies.dev' '(black)\b.*' +tomcli set pyproject.toml false 'tool.maturin.strip' +tomcli set pyproject.toml false 'profile.release.strip' # Downstream-only: patch out the generate-import-lib feature, which is only # relevant on Windows, and which depends on the corresponding pyo3 feature – # which is not packaged for that reason. -tomcli set cramjam-python/Cargo.toml del 'features.generate-import-lib' +tomcli set Cargo.toml del 'features.generate-import-lib' -# Remove bundled rust-libcramjam and the sources for cramjam-cli, which is -# versioned and released separately. Keep only the contents of cramjam-python/ -# and the LICENSE file. -find . -mindepth 1 -maxdepth 1 ! -type d ! -name LICENSE -print -delete -find . -mindepth 1 -maxdepth 1 -type d ! -name cramjam-python \ - -exec rm -rv '{}' '+' +# Downstream-only: remove all the static-linking features, and make the +# dynamic-linking ones default, as we do in rust-libcramjam. +static_features="$( + tomcli get Cargo.toml features -F newline-keys | + grep -E '.-static$' | + tr '\n' ' ' +)" +for sf in ${static_features} +do + tomcli set Cargo.toml del "features.${sf}" + if ! echo "${sf}" | grep -E '^use-system-' >/dev/null + then + binding="$(echo "${sf}" | sed -r 's/-static//')" + tomcli set Cargo.toml lists replace --type regex \ + "features.${binding}" "${binding}-static" "${binding}-shared" + fi +done + +# Downstream-only: patch out the wasm-compat feature, which requires an +# unavailable blosc2 crate feature. +tomcli set Cargo.toml del 'features.wasm32-compat' -cd cramjam-python %cargo_prep %generate_buildrequires -cd cramjam-python -%pyproject_buildrequires %{?with_tests:-x dev} +%pyproject_buildrequires %cargo_generate_buildrequires %build export RUSTFLAGS='%{build_rustflags}' -cd cramjam-python %cargo_license_summary -%{cargo_license} > ../LICENSES.dependencies +%{cargo_license} > LICENSES.dependencies %pyproject_wheel %install -cd cramjam-python %pyproject_install %pyproject_save_files cramjam %check -cd cramjam-python %pyproject_check_import %if %{with tests} -%pytest -v -n auto --ignore-glob='benchmarks/*' +%ifarch s390x +# Even after serious effort by upstream (see +# https://github.com/milesgranger/blosc2-rs/issues/23), several blosc2-rs tests +# still fail on s390x, and therefore blosc2-related tests may also fail in this +# package. Making this package ExcludeArch would have a ripple effect on +# a whole tree of packages that depend on it, and which probably do not even +# use its blosc2 support. We consider that outcome even worse than shipping +# broken blosc2 support on s390x. Note that the endianness issues are probably +# in the C blosc2 library (and that the blosc2 package ignores any and all +# test failures on s390x), and see also: +# https://github.com/Blosc/c-blosc2/issues/467. +# +# […] +# E cramjam.DecompressionError: Blosc2(InvalidHeader) +# […] +# tests/test_variants.py:55: DecompressionError +k="${k-}${k+ and }not test_variants_different_dtypes[blosc2]" +%endif + +%pytest -k "${k-}" -v -n auto %endif %files -n python3-cramjam -f %{pyproject_files} %license LICENSE LICENSES.dependencies -%doc cramjam-python/README.md +%doc README.md %changelog diff --git a/sources b/sources index 4dbee90..ab931f6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cramjam-2.8.3.tar.gz) = 26e85bcc09eeef9623bf69f0659e33310c6a0152c3b89572db7e7584319790b682af65733bb863e69204ce1cea37b30de530bb7f1c686e98217f2bf52b81f9d4 +SHA512 (cramjam-2.9.0.tar.gz) = 51b52745ae427274341f364dfc864b9f059cb63704cda61b4f4632ae819f8ead382baf260ee7c55e4f04a0944be032e818be6a21324dff42d454aab06141dd7b From b9be4ddaddef311cb4bad2c32b7d2d7994ebc811 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 10 Dec 2024 06:48:52 -0500 Subject: [PATCH 05/33] Skip blosc2 variants tests since they may segfault --- python-cramjam.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-cramjam.spec b/python-cramjam.spec index 2cc1139..c524210 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -150,6 +150,9 @@ export RUSTFLAGS='%{build_rustflags}' # tests/test_variants.py:55: DecompressionError k="${k-}${k+ and }not test_variants_different_dtypes[blosc2]" %endif +# Some tests in test_variants.py may produce segmentation faults +# https://github.com/milesgranger/cramjam/issues/190 +k="${k-}${k+ and }not (test_variants and [blosc2)" %pytest -k "${k-}" -v -n auto %endif From c311c75d96815522f04dff4f517919135eb36bca Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 13 Dec 2024 13:43:00 -0500 Subject: [PATCH 06/33] Update to 2.9.1 (close RHBZ#2332068) --- .gitignore | 1 + python-cramjam.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 064655e..787522c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /cramjam-2.8.4.tar.gz /cramjam-2.9.0rc1.tar.gz /cramjam-2.9.0.tar.gz +/cramjam-2.9.1.tar.gz diff --git a/python-cramjam.spec b/python-cramjam.spec index c524210..04faed5 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -1,7 +1,7 @@ %bcond tests 1 Name: python-cramjam -Version: 2.9.0 +Version: 2.9.1 Release: %autorelease Summary: Thin Python bindings to de/compression algorithms in Rust diff --git a/sources b/sources index ab931f6..cf0327b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cramjam-2.9.0.tar.gz) = 51b52745ae427274341f364dfc864b9f059cb63704cda61b4f4632ae819f8ead382baf260ee7c55e4f04a0944be032e818be6a21324dff42d454aab06141dd7b +SHA512 (cramjam-2.9.1.tar.gz) = a2bcb6f98c8f7ffdf026fe9ffc061b3a462368a9bb69eea79697f7cba5091b1beb52cde9c298423d3a7538f86c1d6b15fdd083ccfd26fa2700c024c6d2a0437f From 460c02b931913b5385c52e63db0ee86f7b8901ee Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 3 Jan 2025 09:32:11 -0500 Subject: [PATCH 07/33] Patch for maturin 1.8.0 --- 196.patch | 20 ++++++++++++++++++++ python-cramjam.spec | 4 ++++ 2 files changed, 24 insertions(+) create mode 100644 196.patch diff --git a/196.patch b/196.patch new file mode 100644 index 0000000..89f17fb --- /dev/null +++ b/196.patch @@ -0,0 +1,20 @@ +From 7a993e9d4418a5e44c0c775a11c438f248b333c7 Mon Sep 17 00:00:00 2001 +From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> +Date: Mon, 30 Dec 2024 19:49:23 +0530 +Subject: [PATCH] Add a `version` key in the `[project]` table + +--- + pyproject.toml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/pyproject.toml b/pyproject.toml +index 038e21ae..acb2a183 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,5 +1,6 @@ + [project] + name = "cramjam" ++version = "2.9.1" + keywords = ["compression", "decompression", "snappy", "zstd", "bz2", "gzip", "lz4", "brotli", "deflate", "blosc2"] + requires-python = ">=3.8" + license = { file = "LICENSE" } diff --git a/python-cramjam.spec b/python-cramjam.spec index 04faed5..1ac1650 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -30,6 +30,10 @@ Source1: get_source %endif +# Updates for Maturin 1.8: add a version key in the project metadata +# https://github.com/milesgranger/cramjam/pull/196 +Patch: %{url}/pull/196.patch + # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} From 7fe16cc4110907b2a8f61ffbff88d919970a2711 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 20 Jan 2025 08:28:05 +0000 Subject: [PATCH 08/33] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From c663726bcee535c0aa3d3e681963f5e23573b92f Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 7 Feb 2025 07:50:39 -0500 Subject: [PATCH 09/33] Ignore test failures with recent hypothesis versions, for now - https://github.com/milesgranger/cramjam/issues/201 --- python-cramjam.spec | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/python-cramjam.spec b/python-cramjam.spec index 1ac1650..f179f39 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -154,10 +154,24 @@ export RUSTFLAGS='%{build_rustflags}' # tests/test_variants.py:55: DecompressionError k="${k-}${k+ and }not test_variants_different_dtypes[blosc2]" %endif + # Some tests in test_variants.py may produce segmentation faults # https://github.com/milesgranger/cramjam/issues/190 k="${k-}${k+ and }not (test_variants and [blosc2)" +%if 0%{?fedora} > 41 +# Test failures in test_variants_decompress_into with recent hypothesis +# versions +# https://github.com/milesgranger/cramjam/issues/201 +# +# It is hard to be really sure what is going on here. The failures are +# concerning, and might (or might not) reflect a serious problem. Nevertheless, +# since the problem appears to be linked to newer hypothesis versions, there’s +# not reason to believe that the package has *new* problems. It *might* have +# newly *revealed* problems. This merits further investigation. +k="${k-}${k+ and }not test_variants_decompress_into" +%endif + %pytest -k "${k-}" -v -n auto %endif From c81c8fc45417d64d264dc0f5a77712babd36691c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 7 Feb 2025 07:16:30 -0500 Subject: [PATCH 10/33] Restore i686 support --- python-cramjam.spec | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/python-cramjam.spec b/python-cramjam.spec index f179f39..1a226e6 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -1,5 +1,8 @@ %bcond tests 1 +# isa-l is ExcludeArch: i686 +%bcond isal %[ 0%{?__isa_bits} != 32 ] + Name: python-cramjam Version: 2.9.1 Release: %autorelease @@ -34,9 +37,6 @@ Source1: get_source # https://github.com/milesgranger/cramjam/pull/196 Patch: %{url}/pull/196.patch -# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval -ExcludeArch: %{ix86} - BuildRequires: python3-devel BuildRequires: tomcli BuildRequires: cargo-rpm-macros >= 24 @@ -113,6 +113,20 @@ done # unavailable blosc2 crate feature. tomcli set Cargo.toml del 'features.wasm32-compat' +%if %{without isal} +tomcli set Cargo.toml lists delitem --type regex \ + 'features.default' 'i(gzip|deflate|zlib)' +isal_features="$( + tomcli get Cargo.toml features -F newline-keys | + grep -E '^i(gzip|deflate|zlib)|-isal-' | + tr '\n' ' ' +)" +for sf in ${isal_features} +do + tomcli set Cargo.toml del "features.${sf}" +done +%endif + %cargo_prep From 319eba6ebbe6a0aa2c02f97efe298c5a2acf5d68 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 20 Jan 2025 15:33:51 -0500 Subject: [PATCH 11/33] Update to a pre-release snapshot of 2.10.0 - Disable experimental features (blosc2/isa-l) --- .gitignore | 1 + 196.patch | 20 ------------- python-cramjam.spec | 73 ++++++++++++++------------------------------- sources | 2 +- 4 files changed, 24 insertions(+), 72 deletions(-) delete mode 100644 196.patch diff --git a/.gitignore b/.gitignore index 787522c..bbba7f4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /cramjam-2.9.0rc1.tar.gz /cramjam-2.9.0.tar.gz /cramjam-2.9.1.tar.gz +/cramjam-61564e7761e38e5ec55e7939ccd6a276c2c55d11-filtered.tar.gz diff --git a/196.patch b/196.patch deleted file mode 100644 index 89f17fb..0000000 --- a/196.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 7a993e9d4418a5e44c0c775a11c438f248b333c7 Mon Sep 17 00:00:00 2001 -From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> -Date: Mon, 30 Dec 2024 19:49:23 +0530 -Subject: [PATCH] Add a `version` key in the `[project]` table - ---- - pyproject.toml | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/pyproject.toml b/pyproject.toml -index 038e21ae..acb2a183 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -1,5 +1,6 @@ - [project] - name = "cramjam" -+version = "2.9.1" - keywords = ["compression", "decompression", "snappy", "zstd", "bz2", "gzip", "lz4", "brotli", "deflate", "blosc2"] - requires-python = ">=3.8" - license = { file = "LICENSE" } diff --git a/python-cramjam.spec b/python-cramjam.spec index 1a226e6..060645e 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -1,10 +1,10 @@ %bcond tests 1 -# isa-l is ExcludeArch: i686 -%bcond isal %[ 0%{?__isa_bits} != 32 ] +%global commit 61564e7761e38e5ec55e7939ccd6a276c2c55d11 +%global snapdate 20250104 Name: python-cramjam -Version: 2.9.1 +Version: 2.10.0~%{snapdate}git%{sub %{commit} 1 7} Release: %autorelease Summary: Thin Python bindings to de/compression algorithms in Rust @@ -33,10 +33,6 @@ Source1: get_source %endif -# Updates for Maturin 1.8: add a version key in the project metadata -# https://github.com/milesgranger/cramjam/pull/196 -Patch: %{url}/pull/196.patch - BuildRequires: python3-devel BuildRequires: tomcli BuildRequires: cargo-rpm-macros >= 24 @@ -91,6 +87,24 @@ tomcli set pyproject.toml false 'profile.release.strip' # which is not packaged for that reason. tomcli set Cargo.toml del 'features.generate-import-lib' +# Downstream-only: patch out the wasm-compat feature, which is unnecessary and +# would bring in unwanted dependencies +tomcli set Cargo.toml del 'features.wasm32-compat' + +# Downstream-only: patch out the "experimental" feature and all of the features +# related to blosc2 and isa-l support. We only want to build the Python +# extension with the default features, and we only want maturin to check +# dependencies for those features. +blosc2_isal_features="$( + tomcli get Cargo.toml features -F newline-keys | + grep -E 'blosc2|ideflate|igzip|isal|izlib' | + tr '\n' ' ' +)" +for feature in experimental ${blosc2_isal_features} +do + tomcli set Cargo.toml del "features.${feature}" +done + # Downstream-only: remove all the static-linking features, and make the # dynamic-linking ones default, as we do in rust-libcramjam. static_features="$( @@ -109,24 +123,6 @@ do fi done -# Downstream-only: patch out the wasm-compat feature, which requires an -# unavailable blosc2 crate feature. -tomcli set Cargo.toml del 'features.wasm32-compat' - -%if %{without isal} -tomcli set Cargo.toml lists delitem --type regex \ - 'features.default' 'i(gzip|deflate|zlib)' -isal_features="$( - tomcli get Cargo.toml features -F newline-keys | - grep -E '^i(gzip|deflate|zlib)|-isal-' | - tr '\n' ' ' -)" -for sf in ${isal_features} -do - tomcli set Cargo.toml del "features.${sf}" -done -%endif - %cargo_prep @@ -150,30 +146,6 @@ export RUSTFLAGS='%{build_rustflags}' %check %pyproject_check_import %if %{with tests} -%ifarch s390x -# Even after serious effort by upstream (see -# https://github.com/milesgranger/blosc2-rs/issues/23), several blosc2-rs tests -# still fail on s390x, and therefore blosc2-related tests may also fail in this -# package. Making this package ExcludeArch would have a ripple effect on -# a whole tree of packages that depend on it, and which probably do not even -# use its blosc2 support. We consider that outcome even worse than shipping -# broken blosc2 support on s390x. Note that the endianness issues are probably -# in the C blosc2 library (and that the blosc2 package ignores any and all -# test failures on s390x), and see also: -# https://github.com/Blosc/c-blosc2/issues/467. -# -# […] -# E cramjam.DecompressionError: Blosc2(InvalidHeader) -# […] -# tests/test_variants.py:55: DecompressionError -k="${k-}${k+ and }not test_variants_different_dtypes[blosc2]" -%endif - -# Some tests in test_variants.py may produce segmentation faults -# https://github.com/milesgranger/cramjam/issues/190 -k="${k-}${k+ and }not (test_variants and [blosc2)" - -%if 0%{?fedora} > 41 # Test failures in test_variants_decompress_into with recent hypothesis # versions # https://github.com/milesgranger/cramjam/issues/201 @@ -184,9 +156,8 @@ k="${k-}${k+ and }not (test_variants and [blosc2)" # not reason to believe that the package has *new* problems. It *might* have # newly *revealed* problems. This merits further investigation. k="${k-}${k+ and }not test_variants_decompress_into" -%endif -%pytest -k "${k-}" -v -n auto +%pytest -k "${k-}" --ignore=benchmarks/test_bench.py -v -n auto %endif diff --git a/sources b/sources index cf0327b..2b5c828 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cramjam-2.9.1.tar.gz) = a2bcb6f98c8f7ffdf026fe9ffc061b3a462368a9bb69eea79697f7cba5091b1beb52cde9c298423d3a7538f86c1d6b15fdd083ccfd26fa2700c024c6d2a0437f +SHA512 (cramjam-61564e7761e38e5ec55e7939ccd6a276c2c55d11-filtered.tar.gz) = 2c0eaafaa63b1a0c65ba217a77c13ae71871c73e67466ea9bb86ca169e7c42af744ffb48e27294824350137297ee40c9ddd0a61a1290ce48b9ea18de2fbcdb1f From ec1308384a46dd76d2b0c43ef766043077cfc940 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 24 Feb 2025 19:52:29 -0500 Subject: [PATCH 12/33] Update to a later pre-release snapshot of 2.10.0 - Builds with rust-libcramjam 0.7 --- .gitignore | 1 + 203.patch | 22 ++++++++++++++++++++++ python-cramjam.spec | 8 ++++++-- sources | 2 +- 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 203.patch diff --git a/.gitignore b/.gitignore index bbba7f4..8933129 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /cramjam-2.9.0.tar.gz /cramjam-2.9.1.tar.gz /cramjam-61564e7761e38e5ec55e7939ccd6a276c2c55d11-filtered.tar.gz +/cramjam-cdc7d307d0f592f89b3319a7037fd875a5371ef3-filtered.tar.gz diff --git a/203.patch b/203.patch new file mode 100644 index 0000000..90989ec --- /dev/null +++ b/203.patch @@ -0,0 +1,22 @@ +From 06a941b8f1c8a96193a6db3a932f6978e218aad0 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Mon, 24 Feb 2025 14:46:13 -0500 +Subject: [PATCH] Bump libcramjam -> 0.7 (in Cargo.toml, to match Cargo.lock) + +--- + Cargo.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Cargo.toml b/Cargo.toml +index 8aa745e7..cf64bfb6 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -66,7 +66,7 @@ wasm32-compat = ["libcramjam/wasm32-compat"] + + [dependencies] + pyo3 = { version = "^0.23", default-features = false, features = ["macros"] } +-libcramjam = { version = "^0.6", default-features = false } ++libcramjam = { version = "^0.7", default-features = false } + + [build-dependencies] + pyo3-build-config = "^0.23" diff --git a/python-cramjam.spec b/python-cramjam.spec index 060645e..7d70c72 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -1,7 +1,7 @@ %bcond tests 1 -%global commit 61564e7761e38e5ec55e7939ccd6a276c2c55d11 -%global snapdate 20250104 +%global commit cdc7d307d0f592f89b3319a7037fd875a5371ef3 +%global snapdate 20250222 Name: python-cramjam Version: 2.10.0~%{snapdate}git%{sub %{commit} 1 7} @@ -33,6 +33,10 @@ Source1: get_source %endif +# Bump libcramjam -> 0.7 (in Cargo.toml, to match Cargo.lock) +# https://github.com/milesgranger/cramjam/pull/203 +Patch: %{url}/pull/203.patch + BuildRequires: python3-devel BuildRequires: tomcli BuildRequires: cargo-rpm-macros >= 24 diff --git a/sources b/sources index 2b5c828..6823acd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cramjam-61564e7761e38e5ec55e7939ccd6a276c2c55d11-filtered.tar.gz) = 2c0eaafaa63b1a0c65ba217a77c13ae71871c73e67466ea9bb86ca169e7c42af744ffb48e27294824350137297ee40c9ddd0a61a1290ce48b9ea18de2fbcdb1f +SHA512 (cramjam-cdc7d307d0f592f89b3319a7037fd875a5371ef3-filtered.tar.gz) = 913310ecd2541db0c7cc1232d53b9eb866573a91d87c7be505c7360f7276a0c9484b02232d0364aa531c059252f549acf49b0cc7c468ca638b7adaff73a8abaa From f21b8048d2a555e98e512c3d865a3f01ebcff6b2 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 2 Mar 2025 09:56:20 -0500 Subject: [PATCH 13/33] Update to 2.10.0~rc1 --- .gitignore | 1 + 203.patch | 22 ---------------------- python-cramjam.spec | 10 +++------- sources | 2 +- 4 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 203.patch diff --git a/.gitignore b/.gitignore index 8933129..1429bce 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /cramjam-2.9.1.tar.gz /cramjam-61564e7761e38e5ec55e7939ccd6a276c2c55d11-filtered.tar.gz /cramjam-cdc7d307d0f592f89b3319a7037fd875a5371ef3-filtered.tar.gz +/cramjam-2.10.0rc1.tar.gz diff --git a/203.patch b/203.patch deleted file mode 100644 index 90989ec..0000000 --- a/203.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 06a941b8f1c8a96193a6db3a932f6978e218aad0 Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Mon, 24 Feb 2025 14:46:13 -0500 -Subject: [PATCH] Bump libcramjam -> 0.7 (in Cargo.toml, to match Cargo.lock) - ---- - Cargo.toml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Cargo.toml b/Cargo.toml -index 8aa745e7..cf64bfb6 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -66,7 +66,7 @@ wasm32-compat = ["libcramjam/wasm32-compat"] - - [dependencies] - pyo3 = { version = "^0.23", default-features = false, features = ["macros"] } --libcramjam = { version = "^0.6", default-features = false } -+libcramjam = { version = "^0.7", default-features = false } - - [build-dependencies] - pyo3-build-config = "^0.23" diff --git a/python-cramjam.spec b/python-cramjam.spec index 7d70c72..aacf4d1 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -1,10 +1,10 @@ %bcond tests 1 -%global commit cdc7d307d0f592f89b3319a7037fd875a5371ef3 -%global snapdate 20250222 +#global commit xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +#global snapdate YYYYMMDD Name: python-cramjam -Version: 2.10.0~%{snapdate}git%{sub %{commit} 1 7} +Version: 2.10.0~rc1 Release: %autorelease Summary: Thin Python bindings to de/compression algorithms in Rust @@ -33,10 +33,6 @@ Source1: get_source %endif -# Bump libcramjam -> 0.7 (in Cargo.toml, to match Cargo.lock) -# https://github.com/milesgranger/cramjam/pull/203 -Patch: %{url}/pull/203.patch - BuildRequires: python3-devel BuildRequires: tomcli BuildRequires: cargo-rpm-macros >= 24 diff --git a/sources b/sources index 6823acd..c425e36 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cramjam-cdc7d307d0f592f89b3319a7037fd875a5371ef3-filtered.tar.gz) = 913310ecd2541db0c7cc1232d53b9eb866573a91d87c7be505c7360f7276a0c9484b02232d0364aa531c059252f549acf49b0cc7c468ca638b7adaff73a8abaa +SHA512 (cramjam-2.10.0rc1.tar.gz) = b1aa5481d0c4d0c44389f20bc2933d8b6979636dfaf2aca1ef83abb462134f2ab421993a5730471b58b49e55614100bb8279916ed68f4a7477453b82407a7c0a From 1b551f270c8f716e163663ffab3d4e6915680fce Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 2 Mar 2025 10:11:46 -0500 Subject: [PATCH 14/33] Prepare for EPEL10 branching --- python-cramjam.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/python-cramjam.spec b/python-cramjam.spec index aacf4d1..891fdc9 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -96,7 +96,9 @@ tomcli set Cargo.toml del 'features.wasm32-compat' # extension with the default features, and we only want maturin to check # dependencies for those features. blosc2_isal_features="$( - tomcli get Cargo.toml features -F newline-keys | + # Once EPEL10 has tomcli>=0.8.0, we can use (without sed): + # tomcli get Cargo.toml features -F newline-keys + tomcli get Cargo.toml features -F toml | sed -r 's/ = .*//' | grep -E 'blosc2|ideflate|igzip|isal|izlib' | tr '\n' ' ' )" @@ -108,7 +110,9 @@ done # Downstream-only: remove all the static-linking features, and make the # dynamic-linking ones default, as we do in rust-libcramjam. static_features="$( - tomcli get Cargo.toml features -F newline-keys | + # Once EPEL10 has tomcli>=0.8.0, we can use (without sed): + # tomcli get Cargo.toml features -F newline-keys + tomcli get Cargo.toml features -F toml | sed -r 's/ = .*//' | grep -E '.-static$' | tr '\n' ' ' )" @@ -146,9 +150,9 @@ export RUSTFLAGS='%{build_rustflags}' %check %pyproject_check_import %if %{with tests} +%if %{undefined el10} # Test failures in test_variants_decompress_into with recent hypothesis -# versions -# https://github.com/milesgranger/cramjam/issues/201 +# versions: https://github.com/milesgranger/cramjam/issues/201 # # It is hard to be really sure what is going on here. The failures are # concerning, and might (or might not) reflect a serious problem. Nevertheless, @@ -156,6 +160,7 @@ export RUSTFLAGS='%{build_rustflags}' # not reason to believe that the package has *new* problems. It *might* have # newly *revealed* problems. This merits further investigation. k="${k-}${k+ and }not test_variants_decompress_into" +%endif %pytest -k "${k-}" --ignore=benchmarks/test_bench.py -v -n auto %endif From fbf783c04f5e5487a9344f7de1e522be60914fe2 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 3 Mar 2025 07:21:37 -0500 Subject: [PATCH 15/33] No longer need to patch pyproject.toml to keep maturin from stripping binaries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We were failing to adjust profile.release.strip correctly anyway; it’s in Cargo.toml --- python-cramjam.spec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/python-cramjam.spec b/python-cramjam.spec index 891fdc9..4919113 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -77,11 +77,6 @@ License: %{shrink: %prep %autosetup -n cramjam-%{srcversion} -# Do not strip the compiled Python module; we need useful debuginfo. Upstream -# set this intentionally, so this makes sense to keep downstream-only. -tomcli set pyproject.toml false 'tool.maturin.strip' -tomcli set pyproject.toml false 'profile.release.strip' - # Downstream-only: patch out the generate-import-lib feature, which is only # relevant on Windows, and which depends on the corresponding pyo3 feature – # which is not packaged for that reason. From 29da16297c9011f84d4fea60876aaedc027ec2be Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 12 Mar 2025 09:36:45 -0400 Subject: [PATCH 16/33] =?UTF-8?q?Don=E2=80=99t=20need=20to=20manually=20ex?= =?UTF-8?q?port=20RUSTFLAGS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [skip changelog] --- python-cramjam.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-cramjam.spec b/python-cramjam.spec index 4919113..0fff062 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -131,7 +131,6 @@ done %build -export RUSTFLAGS='%{build_rustflags}' %cargo_license_summary %{cargo_license} > LICENSES.dependencies %pyproject_wheel From dd26b0fa97b7125b53eeda6e0822f6582c729370 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 8 Apr 2025 09:45:36 -0400 Subject: [PATCH 17/33] Update PyO3 to 0.24 --- ...375c2a2f96e28a1b3987f0eb5c730b4b361e.patch | 27 +++++++++++++++++++ python-cramjam.spec | 4 +++ 2 files changed, 31 insertions(+) create mode 100644 217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch diff --git a/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch b/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch new file mode 100644 index 0000000..911e068 --- /dev/null +++ b/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch @@ -0,0 +1,27 @@ +From 217c375c2a2f96e28a1b3987f0eb5c730b4b361e Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Tue, 8 Apr 2025 09:40:09 -0400 +Subject: [PATCH] Update PyO3 to 0.24 + +--- + Cargo.toml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Cargo.toml b/Cargo.toml +index bf9b6831..0ab9473f 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -65,11 +65,11 @@ wasm32-compat = ["libcramjam/wasm32-compat"] + + + [dependencies] +-pyo3 = { version = "^0.23", default-features = false, features = ["macros"] } ++pyo3 = { version = "^0.24", default-features = false, features = ["macros"] } + libcramjam = { version = "^0.7", default-features = false } + + [build-dependencies] +-pyo3-build-config = "^0.23" ++pyo3-build-config = "^0.24" + + [profile.release] + strip = true diff --git a/python-cramjam.spec b/python-cramjam.spec index 0fff062..630bdea 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -33,6 +33,10 @@ Source1: get_source %endif +# Update PyO3 to 0.24 +# https://github.com/milesgranger/cramjam/pull/207 +Patch: %{url}/pull/207/commits/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch + BuildRequires: python3-devel BuildRequires: tomcli BuildRequires: cargo-rpm-macros >= 24 From 26737d07f0591a67aeb1aa512b98493e1b26ee5e Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 8 Apr 2025 09:49:17 -0400 Subject: [PATCH 18/33] Expect maturin to handle license files --- python-cramjam.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python-cramjam.spec b/python-cramjam.spec index 630bdea..9f69bd2 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -142,7 +142,7 @@ done %install %pyproject_install -%pyproject_save_files cramjam +%pyproject_save_files -l cramjam %check @@ -165,7 +165,6 @@ k="${k-}${k+ and }not test_variants_decompress_into" %files -n python3-cramjam -f %{pyproject_files} -%license LICENSE LICENSES.dependencies %doc README.md From c57085d2d075cb70cf685353111519c75299af20 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 8 Apr 2025 09:52:38 -0400 Subject: [PATCH 19/33] Remove workarounds for older versions of tomcli --- python-cramjam.spec | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/python-cramjam.spec b/python-cramjam.spec index 9f69bd2..37949c3 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -38,7 +38,7 @@ Source1: get_source Patch: %{url}/pull/207/commits/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch BuildRequires: python3-devel -BuildRequires: tomcli +BuildRequires: tomcli >= 0.8.0 BuildRequires: cargo-rpm-macros >= 24 %if %{with tests} @@ -95,9 +95,7 @@ tomcli set Cargo.toml del 'features.wasm32-compat' # extension with the default features, and we only want maturin to check # dependencies for those features. blosc2_isal_features="$( - # Once EPEL10 has tomcli>=0.8.0, we can use (without sed): - # tomcli get Cargo.toml features -F newline-keys - tomcli get Cargo.toml features -F toml | sed -r 's/ = .*//' | + tomcli get Cargo.toml features -F newline-keys | grep -E 'blosc2|ideflate|igzip|isal|izlib' | tr '\n' ' ' )" @@ -109,9 +107,7 @@ done # Downstream-only: remove all the static-linking features, and make the # dynamic-linking ones default, as we do in rust-libcramjam. static_features="$( - # Once EPEL10 has tomcli>=0.8.0, we can use (without sed): - # tomcli get Cargo.toml features -F newline-keys - tomcli get Cargo.toml features -F toml | sed -r 's/ = .*//' | + tomcli get Cargo.toml features -F newline-keys | grep -E '.-static$' | tr '\n' ' ' )" From 40f3d5aecbb78a6726840cf2b4edd46c5fcd8e7b Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 8 Apr 2025 09:54:10 -0400 Subject: [PATCH 20/33] Use the provisional pyproject declarative buildsystem - Drop EPEL10 conditionals --- python-cramjam.rpmlintrc | 4 ++++ python-cramjam.spec | 24 +++++++----------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/python-cramjam.rpmlintrc b/python-cramjam.rpmlintrc index 204d347..855b921 100644 --- a/python-cramjam.rpmlintrc +++ b/python-cramjam.rpmlintrc @@ -1,2 +1,6 @@ # “de/compression” addFilter(r"spelling-error.*'de'") +# At least some of these sections are implicit due to declarative buildsystem +addFilter(r" no-%(prep|build|install)-section") +# Implicit due to use of declarative build system +addFilter(r" patch-not-applied ") diff --git a/python-cramjam.spec b/python-cramjam.spec index 37949c3..1df323c 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -33,11 +33,13 @@ Source1: get_source %endif +BuildSystem: pyproject +BuildOption(install): -l cramjam + # Update PyO3 to 0.24 # https://github.com/milesgranger/cramjam/pull/207 Patch: %{url}/pull/207/commits/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch -BuildRequires: python3-devel BuildRequires: tomcli >= 0.8.0 BuildRequires: cargo-rpm-macros >= 24 @@ -78,9 +80,7 @@ License: %{shrink: %description -n python3-cramjam %{common_description} -%prep -%autosetup -n cramjam-%{srcversion} - +%prep -a # Downstream-only: patch out the generate-import-lib feature, which is only # relevant on Windows, and which depends on the corresponding pyo3 feature – # which is not packaged for that reason. @@ -125,26 +125,17 @@ done %cargo_prep -%generate_buildrequires -%pyproject_buildrequires +%generate_buildrequires -a %cargo_generate_buildrequires -%build +%build -p %cargo_license_summary %{cargo_license} > LICENSES.dependencies -%pyproject_wheel -%install -%pyproject_install -%pyproject_save_files -l cramjam - - -%check -%pyproject_check_import +%check -a %if %{with tests} -%if %{undefined el10} # Test failures in test_variants_decompress_into with recent hypothesis # versions: https://github.com/milesgranger/cramjam/issues/201 # @@ -154,7 +145,6 @@ done # not reason to believe that the package has *new* problems. It *might* have # newly *revealed* problems. This merits further investigation. k="${k-}${k+ and }not test_variants_decompress_into" -%endif %pytest -k "${k-}" --ignore=benchmarks/test_bench.py -v -n auto %endif From 8318941aeb2648c244a05634c31d467535c3b129 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 12 Apr 2025 21:13:30 -0400 Subject: [PATCH 21/33] Update to 2.10.0 (close RHBZ#2359237) --- .gitignore | 1 + ...375c2a2f96e28a1b3987f0eb5c730b4b361e.patch | 27 ------------------- python-cramjam.rpmlintrc | 2 -- python-cramjam.spec | 6 +---- sources | 2 +- 5 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch diff --git a/.gitignore b/.gitignore index 1429bce..72e11ac 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /cramjam-61564e7761e38e5ec55e7939ccd6a276c2c55d11-filtered.tar.gz /cramjam-cdc7d307d0f592f89b3319a7037fd875a5371ef3-filtered.tar.gz /cramjam-2.10.0rc1.tar.gz +/cramjam-2.10.0.tar.gz diff --git a/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch b/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch deleted file mode 100644 index 911e068..0000000 --- a/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 217c375c2a2f96e28a1b3987f0eb5c730b4b361e Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Tue, 8 Apr 2025 09:40:09 -0400 -Subject: [PATCH] Update PyO3 to 0.24 - ---- - Cargo.toml | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Cargo.toml b/Cargo.toml -index bf9b6831..0ab9473f 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -65,11 +65,11 @@ wasm32-compat = ["libcramjam/wasm32-compat"] - - - [dependencies] --pyo3 = { version = "^0.23", default-features = false, features = ["macros"] } -+pyo3 = { version = "^0.24", default-features = false, features = ["macros"] } - libcramjam = { version = "^0.7", default-features = false } - - [build-dependencies] --pyo3-build-config = "^0.23" -+pyo3-build-config = "^0.24" - - [profile.release] - strip = true diff --git a/python-cramjam.rpmlintrc b/python-cramjam.rpmlintrc index 855b921..d8cdc60 100644 --- a/python-cramjam.rpmlintrc +++ b/python-cramjam.rpmlintrc @@ -2,5 +2,3 @@ addFilter(r"spelling-error.*'de'") # At least some of these sections are implicit due to declarative buildsystem addFilter(r" no-%(prep|build|install)-section") -# Implicit due to use of declarative build system -addFilter(r" patch-not-applied ") diff --git a/python-cramjam.spec b/python-cramjam.spec index 1df323c..7e46d04 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -4,7 +4,7 @@ #global snapdate YYYYMMDD Name: python-cramjam -Version: 2.10.0~rc1 +Version: 2.10.0 Release: %autorelease Summary: Thin Python bindings to de/compression algorithms in Rust @@ -36,10 +36,6 @@ Source1: get_source BuildSystem: pyproject BuildOption(install): -l cramjam -# Update PyO3 to 0.24 -# https://github.com/milesgranger/cramjam/pull/207 -Patch: %{url}/pull/207/commits/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch - BuildRequires: tomcli >= 0.8.0 BuildRequires: cargo-rpm-macros >= 24 diff --git a/sources b/sources index c425e36..d44109e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cramjam-2.10.0rc1.tar.gz) = b1aa5481d0c4d0c44389f20bc2933d8b6979636dfaf2aca1ef83abb462134f2ab421993a5730471b58b49e55614100bb8279916ed68f4a7477453b82407a7c0a +SHA512 (cramjam-2.10.0.tar.gz) = 0c44643844c6278160d9e2efa3005da265e464edb1d3dd670cadc3effaa744c21c772c0bfeac1ceec6e5f7e8a9a02440d79e5080c432e4dcb73984e613281ad2 From 87d59a3af77ab80b5e3e2a20b1dc521482a28cbb Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 24 Apr 2025 16:22:53 -0400 Subject: [PATCH 22/33] Adjust .rpmlintrc file for updated rpmlint --- python-cramjam.rpmlintrc | 2 -- 1 file changed, 2 deletions(-) diff --git a/python-cramjam.rpmlintrc b/python-cramjam.rpmlintrc index d8cdc60..204d347 100644 --- a/python-cramjam.rpmlintrc +++ b/python-cramjam.rpmlintrc @@ -1,4 +1,2 @@ # “de/compression” addFilter(r"spelling-error.*'de'") -# At least some of these sections are implicit due to declarative buildsystem -addFilter(r" no-%(prep|build|install)-section") From 7e7726133ccc6bc36ff0c7f23c87da99daa51589 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 3 May 2025 23:04:59 -0400 Subject: [PATCH 23/33] Report and skip test that fails with miniz_oxide>0.8.5 --- python-cramjam.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-cramjam.spec b/python-cramjam.spec index 7e46d04..fba3650 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -142,6 +142,11 @@ done # newly *revealed* problems. This merits further investigation. k="${k-}${k+ and }not test_variants_decompress_into" +# Regression with miniz_oxide>0.8.5 +# https://github.com/milesgranger/cramjam/issues/211 +# Failed: DID NOT RAISE +k="${k-}${k+ and }not test_variants_raise_exception[deflate]" + %pytest -k "${k-}" --ignore=benchmarks/test_bench.py -v -n auto %endif From 08f281c0341ed90a0b0d52015db9d28ee44e4315 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 24 Apr 2025 16:57:37 -0400 Subject: [PATCH 24/33] Update to 2.11.0~rc2 (close RHBZ#2361989) --- .gitignore | 1 + python-cramjam.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 72e11ac..e4b9aa8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /cramjam-cdc7d307d0f592f89b3319a7037fd875a5371ef3-filtered.tar.gz /cramjam-2.10.0rc1.tar.gz /cramjam-2.10.0.tar.gz +/cramjam-2.11.0rc2.tar.gz diff --git a/python-cramjam.spec b/python-cramjam.spec index fba3650..a820af1 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -4,7 +4,7 @@ #global snapdate YYYYMMDD Name: python-cramjam -Version: 2.10.0 +Version: 2.11.0~rc2 Release: %autorelease Summary: Thin Python bindings to de/compression algorithms in Rust diff --git a/sources b/sources index d44109e..3660d07 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cramjam-2.10.0.tar.gz) = 0c44643844c6278160d9e2efa3005da265e464edb1d3dd670cadc3effaa744c21c772c0bfeac1ceec6e5f7e8a9a02440d79e5080c432e4dcb73984e613281ad2 +SHA512 (cramjam-2.11.0rc2.tar.gz) = b911fdf26a8bf5b84d2080f613a8e1c1db75ed4b19c5929e74b935f5c356494f5a81e5019bacaf16724db9ddc0aef8fa55fe67142e4aa38d8283aa999cebd3f7 From 96ae7df798bed7b88c9074c5c461c316f91d5027 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 23 May 2025 07:16:32 -0400 Subject: [PATCH 25/33] Patch for Python 3.14 (close RHBZ#2367779) --- 214.patch | 383 ++++++++++++++++++++++++++++++++++++++++++++ python-cramjam.spec | 5 + 2 files changed, 388 insertions(+) create mode 100644 214.patch diff --git a/214.patch b/214.patch new file mode 100644 index 0000000..53f6b0a --- /dev/null +++ b/214.patch @@ -0,0 +1,383 @@ +From afeeff893184937aadd1c2a13b32cfb3f5d83f9f Mon Sep 17 00:00:00 2001 +From: Nathan Goldbaum +Date: Thu, 15 May 2025 15:19:22 -0400 +Subject: [PATCH 1/5] Update pyo3 dependency to 0.25 + +--- + Cargo.lock | 21 ++++++++++----------- + Cargo.toml | 4 ++-- + 2 files changed, 12 insertions(+), 13 deletions(-) + +diff --git a/Cargo.lock b/Cargo.lock +index 45c1da51..52c0011b 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -544,11 +544,10 @@ dependencies = [ + + [[package]] + name = "pyo3" +-version = "0.24.1" ++version = "0.25.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "17da310086b068fbdcefbba30aeb3721d5bb9af8db4987d6735b2183ca567229" ++checksum = "f239d656363bcee73afef85277f1b281e8ac6212a1d42aa90e55b90ed43c47a4" + dependencies = [ +- "cfg-if", + "indoc", + "libc", + "memoffset", +@@ -562,9 +561,9 @@ dependencies = [ + + [[package]] + name = "pyo3-build-config" +-version = "0.24.1" ++version = "0.25.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "e27165889bd793000a098bb966adc4300c312497ea25cf7a690a9f0ac5aa5fc1" ++checksum = "755ea671a1c34044fa165247aaf6f419ca39caa6003aee791a0df2713d8f1b6d" + dependencies = [ + "once_cell", + "python3-dll-a", +@@ -573,9 +572,9 @@ dependencies = [ + + [[package]] + name = "pyo3-ffi" +-version = "0.24.1" ++version = "0.25.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "05280526e1dbf6b420062f3ef228b78c0c54ba94e157f5cb724a609d0f2faabc" ++checksum = "fc95a2e67091e44791d4ea300ff744be5293f394f1bafd9f78c080814d35956e" + dependencies = [ + "libc", + "pyo3-build-config", +@@ -583,9 +582,9 @@ dependencies = [ + + [[package]] + name = "pyo3-macros" +-version = "0.24.1" ++version = "0.25.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "5c3ce5686aa4d3f63359a5100c62a127c9f15e8398e5fdeb5deef1fed5cd5f44" ++checksum = "a179641d1b93920829a62f15e87c0ed791b6c8db2271ba0fd7c2686090510214" + dependencies = [ + "proc-macro2", + "pyo3-macros-backend", +@@ -595,9 +594,9 @@ dependencies = [ + + [[package]] + name = "pyo3-macros-backend" +-version = "0.24.1" ++version = "0.25.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "f4cf6faa0cbfb0ed08e89beb8103ae9724eb4750e3a78084ba4017cbe94f3855" ++checksum = "9dff85ebcaab8c441b0e3f7ae40a6963ecea8a9f5e74f647e33fcf5ec9a1e89e" + dependencies = [ + "heck 0.5.0", + "proc-macro2", +diff --git a/Cargo.toml b/Cargo.toml +index a2cd5389..d74705e3 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -65,11 +65,11 @@ wasm32-compat = ["libcramjam/wasm32-compat"] + + + [dependencies] +-pyo3 = { version = "^0.24", default-features = false, features = ["macros"] } ++pyo3 = { version = "^0.25", default-features = false, features = ["macros"] } + libcramjam = { version = "^0.7", default-features = false } + + [build-dependencies] +-pyo3-build-config = "^0.24" ++pyo3-build-config = "^0.25" + + [profile.release] + strip = true + +From ea61683827df24b636fa4b4bb70119b1eb7a85e8 Mon Sep 17 00:00:00 2001 +From: Nathan Goldbaum +Date: Thu, 15 May 2025 15:55:01 -0400 +Subject: [PATCH 2/5] use a mutable bytearray in reference cleanup test to + avoid immortalization + +--- + tests/test_buffer_view.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_buffer_view.py b/tests/test_buffer_view.py +index 9776bdce..46cc2eda 100644 +--- a/tests/test_buffer_view.py ++++ b/tests/test_buffer_view.py +@@ -99,7 +99,7 @@ def test_buffer_view_cleanup(): + n_refs = 0 + + def get_buffer(): +- data = b"bytes" ++ data = bytearray(b"bytes") + buf = cramjam.Buffer(data, copy=False) + + nonlocal n_refs + +From aa54ac6678c7b18d53b40d0214f9d6c2604ead4d Mon Sep 17 00:00:00 2001 +From: Nathan Goldbaum +Date: Sun, 18 May 2025 10:53:31 -0400 +Subject: [PATCH 3/5] Use a bytearray in test that mutates a buffer + +--- + tests/test_buffer_view.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_buffer_view.py b/tests/test_buffer_view.py +index 46cc2eda..bc0fb4df 100644 +--- a/tests/test_buffer_view.py ++++ b/tests/test_buffer_view.py +@@ -37,7 +37,7 @@ def test_buffer_view_raises_when_writing_past_data_length_at_once(): + + @pytest.mark.skip_pypy + def test_buffer_view_raises_when_writing_past_data_length_incrementally(): +- data = b"bytes" ++ data = bytearray(b"bytes") + buf = Buffer(data, copy=False) + + # This is okay, up to length of underlying buffer + +From becf091553eccbe5f778f387c8557233ca3638d2 Mon Sep 17 00:00:00 2001 +From: Nathan Goldbaum +Date: Sun, 18 May 2025 11:46:30 -0400 +Subject: [PATCH 4/5] make tests pass on the free-threaded build + +--- + src/io.rs | 28 ++++++++++++++++++---------- + tests/conftest.py | 5 +++++ + tests/test_buffer_view.py | 6 +++--- + tests/test_rust_io.py | 4 ++-- + tests/test_variants.py | 12 ++++++------ + 5 files changed, 34 insertions(+), 21 deletions(-) + +diff --git a/src/io.rs b/src/io.rs +index 2e772ddf..7d552dd0 100644 +--- a/src/io.rs ++++ b/src/io.rs +@@ -14,6 +14,7 @@ use pyo3::exceptions::{self, PyBufferError}; + use pyo3::ffi; + use pyo3::prelude::*; + use pyo3::types::PyBytes; ++use pyo3::IntoPyObjectExt; + use std::path::PathBuf; + + pub(crate) trait AsBytes { +@@ -176,8 +177,8 @@ impl RustyFile { + pub struct PythonBuffer { + pub(crate) inner: std::pin::Pin>, + pub(crate) pos: usize, +- #[cfg(PyPy)] +- pub(crate) owner: PyObject, ++ #[cfg(any(PyPy, Py_GIL_DISABLED))] ++ pub(crate) owner: Py, + } + // PyBuffer is thread-safe: the shape of the buffer is immutable while a Py_buffer exists. + // Accessing the buffer contents is protected using the GIL. +@@ -207,14 +208,23 @@ impl PythonBuffer { + } + /// Get the underlying buffer as a mutable slice of bytes + pub fn as_slice_mut(&mut self) -> PyResult<&mut [u8]> { +- #[cfg(PyPy)] ++ #[cfg(any(PyPy, Py_GIL_DISABLED))] + { + Python::with_gil(|py| { + let is_memoryview = unsafe { ffi::PyMemoryView_Check(self.owner.as_ptr()) } == 1; + if is_memoryview || self.owner.bind(py).is_instance_of::() { +- Err(pyo3::exceptions::PyTypeError::new_err( +- "With PyPy, an output of type `bytes` or `memoryview` does not work. See issue pypy/pypy#4918", +- )) ++ #[cfg(PyPy)] ++ { ++ Err(pyo3::exceptions::PyTypeError::new_err( ++ "Cannot create mutable reference to `bytes` or `memoryview` on PyPy. See issue pypy/pypy#4918", ++ )) ++ } ++ #[cfg(Py_GIL_DISABLED)] ++ { ++ Err(pyo3::exceptions::PyTypeError::new_err( ++ "Cannot create mutable reference to `bytes` or `memoryview` on the free-threaded build. See issue milesgranger/cramjam#213" ++ )) ++ } + } else { + Ok(()) + } +@@ -274,8 +284,8 @@ impl<'a, 'py> TryFrom<&'a Bound<'py, PyAny>> for PythonBuffer { + let buf = Self { + inner: std::pin::Pin::from(buf), + pos: 0, +- #[cfg(PyPy)] +- owner: Python::with_gil(|py| obj.to_object(py)), ++ #[cfg(any(PyPy, Py_GIL_DISABLED))] ++ owner: Python::with_gil(|py| obj.into_py_any(py).unwrap()), + }; + // sanity checks + if buf.inner.shape.is_null() { +@@ -412,7 +422,6 @@ impl RustyBuffer { + pub fn __init__(py: Python, mut data: Option>, copy: Option) -> PyResult { + if let Some(maybe_bytestype) = data.as_mut() { + let mut bytestype = maybe_bytestype.extract::>(py)?; +- + if copy.unwrap_or(true) { + let mut buf = vec![]; + bytestype.read_to_end(&mut buf)?; +@@ -648,7 +657,6 @@ impl RustyBuffer { + (*view).buf = bytes.as_ptr() as *mut std::os::raw::c_void; + (*view).len = bytes.len() as isize; + (*view).readonly = 0; +- (*view).itemsize = 1; + + (*view).format = std::ptr::null_mut(); + if (flags & ffi::PyBUF_FORMAT) == ffi::PyBUF_FORMAT { +diff --git a/tests/conftest.py b/tests/conftest.py +index 408bb15b..32674325 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -1,4 +1,5 @@ + import platform ++import sysconfig + + import pytest + +@@ -8,6 +9,10 @@ def is_pypy(): + impl = platform.python_implementation() + return impl.lower() == "pypy" + ++@pytest.fixture(scope="session") ++def is_free_threaded(): ++ return bool(sysconfig.get_config_var("Py_GIL_DISABLED")) ++ + + def pytest_configure(config): + config.addinivalue_line("markers", "skip_pypy: skip this test on PyPy") +diff --git a/tests/test_buffer_view.py b/tests/test_buffer_view.py +index bc0fb4df..dc499895 100644 +--- a/tests/test_buffer_view.py ++++ b/tests/test_buffer_view.py +@@ -12,7 +12,7 @@ def test_buffer_view(copy): + if copy is not None: + kwargs["copy"] = copy + +- data = b"bytes" ++ data = bytearray(b"bytes") + buf = Buffer(data, **kwargs) + buf.write(b"0") + +@@ -26,7 +26,7 @@ def test_buffer_view(copy): + + @pytest.mark.skip_pypy + def test_buffer_view_raises_when_writing_past_data_length_at_once(): +- data = b"bytes" ++ data = bytearray(b"bytes") + buf = Buffer(data, copy=False) + + # Won't write pasted underlying buffer if passed data all at once +@@ -74,7 +74,7 @@ def test_buffer_view_raises_when_truncating(): + @pytest.mark.skip_pypy + @pytest.mark.parametrize("whence", (0, 1, 2)) + def test_buffer_view_raises_when_write_after_bad_seek(whence): +- buf = Buffer(b"bytes", copy=False) ++ buf = Buffer(bytearray(b"bytes"), copy=False) + + buf.seek(2, whence=0) # Seek forward 2 from start, also okay + buf.seek(2, whence=1) # Seek forward 2 from current position, okay +diff --git a/tests/test_rust_io.py b/tests/test_rust_io.py +index 6737262e..72b5e3e1 100644 +--- a/tests/test_rust_io.py ++++ b/tests/test_rust_io.py +@@ -4,7 +4,7 @@ + + + @pytest.mark.parametrize("Obj", (File, Buffer)) +-def test_obj_api(tmpdir, Obj, is_pypy): ++def test_obj_api(tmpdir, Obj, is_pypy, is_free_threaded): + if isinstance(Obj, File): + buf = File(str(tmpdir.join("file.txt"))) + else: +@@ -30,7 +30,7 @@ def test_obj_api(tmpdir, Obj, is_pypy): + ): + buf.seek(0) + +- if isinstance(out, bytes) and is_pypy: ++ if isinstance(out, bytes) and (is_pypy or is_free_threaded): + with pytest.raises(OSError): + buf.readinto(out) + continue +diff --git a/tests/test_variants.py b/tests/test_variants.py +index 1afa2c5b..740913f4 100644 +--- a/tests/test_variants.py ++++ b/tests/test_variants.py +@@ -106,7 +106,7 @@ def test_variants_raise_exception(variant_str): + @pytest.mark.parametrize("variant_str", VARIANTS) + @given(raw_data=st.binary()) + def test_variants_compress_into( +- variant_str, input_type, output_type, raw_data, tmp_path_factory, is_pypy ++ variant_str, input_type, output_type, raw_data, tmp_path_factory, is_pypy, is_free_threaded + ): + # TODO: Fix segfault when using blosc2 compress_into cramjam.File + # decompress_into appears to work fine. +@@ -148,9 +148,9 @@ def test_variants_compress_into( + else: + output = output_type(b"0" * compressed_len) + +- if is_pypy and isinstance(output, (bytes, memoryview)): ++ if (is_pypy or is_free_threaded) and isinstance(output, (bytes, memoryview)): + pytest.xfail( +- reason="PyPy de/compress_into w/ bytes or memoryview is a bit flaky behavior" ++ reason="Decompressing into immutable objects is not supported on PyPy or the free-threaded build" + ) + + n_bytes = variant.compress_into(input, output) +@@ -176,7 +176,7 @@ def test_variants_compress_into( + @pytest.mark.parametrize("variant_str", VARIANTS) + @given(raw_data=st.binary()) + def test_variants_decompress_into( +- variant_str, input_type, output_type, tmp_path_factory, raw_data, is_pypy ++ variant_str, input_type, output_type, tmp_path_factory, raw_data, is_pypy, is_free_threaded + ): + if variant_str == "izlib" and output_type == "memoryview": + pytest.skip("See issue https://github.com/milesgranger/cramjam/issues/193") +@@ -213,9 +213,9 @@ def test_variants_decompress_into( + else: + output = output_type(b"0" * len(raw_data)) + +- if is_pypy and isinstance(output, (bytes, memoryview)): ++ if (is_pypy or is_free_threaded) and isinstance(output, (bytes, memoryview)): + pytest.xfail( +- reason="PyPy de/compress_into w/ bytes or memoryview is a bit flaky behavior" ++ reason="Decompressing into immutable objects is not supported on PyPy or the free-threaded build" + ) + + n_bytes = variant.decompress_into(input, output) + +From 828b616c4ae34dd3dad0eac266316cf7d79b584c Mon Sep 17 00:00:00 2001 +From: Nathan Goldbaum +Date: Tue, 20 May 2025 13:20:43 -0400 +Subject: [PATCH 5/5] test only fails on 3.14 + +--- + tests/test_rust_io.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tests/test_rust_io.py b/tests/test_rust_io.py +index 72b5e3e1..ae329691 100644 +--- a/tests/test_rust_io.py ++++ b/tests/test_rust_io.py +@@ -1,3 +1,5 @@ ++import sys ++ + import pytest + + from cramjam import File, Buffer +@@ -30,7 +32,8 @@ def test_obj_api(tmpdir, Obj, is_pypy, is_free_threaded): + ): + buf.seek(0) + +- if isinstance(out, bytes) and (is_pypy or is_free_threaded): ++ if isinstance(out, bytes) and ( ++ is_pypy or (is_free_threaded and sys.version_info >= (3, 14))): + with pytest.raises(OSError): + buf.readinto(out) + continue diff --git a/python-cramjam.spec b/python-cramjam.spec index a820af1..8f6a6bf 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -33,6 +33,11 @@ Source1: get_source %endif +# Ban mutating immutable buffers on the free-threaded build +# (Updates to PyO3 0.25 and fixes Python 3.14 support) +# https://github.com/milesgranger/cramjam/pull/214 +Patch: https://github.com/milesgranger/cramjam/pull/214.patch + BuildSystem: pyproject BuildOption(install): -l cramjam From cf3a917ff3784417f822e2428b876617ad739c26 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 1 Jun 2025 06:57:54 -0400 Subject: [PATCH 26/33] Updated Python 3.14 patch --- 214.patch | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/214.patch b/214.patch index 53f6b0a..0896429 100644 --- a/214.patch +++ b/214.patch @@ -1,7 +1,7 @@ From afeeff893184937aadd1c2a13b32cfb3f5d83f9f Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Thu, 15 May 2025 15:19:22 -0400 -Subject: [PATCH 1/5] Update pyo3 dependency to 0.25 +Subject: [PATCH 1/6] Update pyo3 dependency to 0.25 --- Cargo.lock | 21 ++++++++++----------- @@ -96,7 +96,7 @@ index a2cd5389..d74705e3 100644 From ea61683827df24b636fa4b4bb70119b1eb7a85e8 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Thu, 15 May 2025 15:55:01 -0400 -Subject: [PATCH 2/5] use a mutable bytearray in reference cleanup test to +Subject: [PATCH 2/6] use a mutable bytearray in reference cleanup test to avoid immortalization --- @@ -120,7 +120,7 @@ index 9776bdce..46cc2eda 100644 From aa54ac6678c7b18d53b40d0214f9d6c2604ead4d Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Sun, 18 May 2025 10:53:31 -0400 -Subject: [PATCH 3/5] Use a bytearray in test that mutates a buffer +Subject: [PATCH 3/6] Use a bytearray in test that mutates a buffer --- tests/test_buffer_view.py | 2 +- @@ -143,7 +143,7 @@ index 46cc2eda..bc0fb4df 100644 From becf091553eccbe5f778f387c8557233ca3638d2 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Sun, 18 May 2025 11:46:30 -0400 -Subject: [PATCH 4/5] make tests pass on the free-threaded build +Subject: [PATCH 4/6] make tests pass on the free-threaded build --- src/io.rs | 28 ++++++++++++++++++---------- @@ -355,7 +355,7 @@ index 1afa2c5b..740913f4 100644 From 828b616c4ae34dd3dad0eac266316cf7d79b584c Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Tue, 20 May 2025 13:20:43 -0400 -Subject: [PATCH 5/5] test only fails on 3.14 +Subject: [PATCH 5/6] test only fails on 3.14 --- tests/test_rust_io.py | 5 ++++- @@ -381,3 +381,24 @@ index 72b5e3e1..ae329691 100644 with pytest.raises(OSError): buf.readinto(out) continue + +From c89e7e010fe038d290cdd12cc8c0135992bce7db Mon Sep 17 00:00:00 2001 +From: Nathan Goldbaum +Date: Mon, 26 May 2025 11:22:25 -0600 +Subject: [PATCH 6/6] relax hypothesis pin + +--- + pyproject.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 0584e0bd..7e77e5be 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -31,5 +31,5 @@ dev = [ + "pytest>=5.30", + "pytest-xdist", + "pytest-benchmark", +- "hypothesis<6.123.0" ++ "hypothesis" + ] From a6f9420ae86794c84803338bcfdbf9c550e7c2f5 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 1 Jun 2025 06:56:31 -0400 Subject: [PATCH 27/33] Update to 2.11.0rc3 (close RHBZ#2369614) --- .gitignore | 1 + python-cramjam.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e4b9aa8..ef18df8 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /cramjam-2.10.0rc1.tar.gz /cramjam-2.10.0.tar.gz /cramjam-2.11.0rc2.tar.gz +/cramjam-2.11.0rc3.tar.gz diff --git a/python-cramjam.spec b/python-cramjam.spec index 8f6a6bf..133870d 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -4,7 +4,7 @@ #global snapdate YYYYMMDD Name: python-cramjam -Version: 2.11.0~rc2 +Version: 2.11.0~rc3 Release: %autorelease Summary: Thin Python bindings to de/compression algorithms in Rust diff --git a/sources b/sources index 3660d07..95a7195 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cramjam-2.11.0rc2.tar.gz) = b911fdf26a8bf5b84d2080f613a8e1c1db75ed4b19c5929e74b935f5c356494f5a81e5019bacaf16724db9ddc0aef8fa55fe67142e4aa38d8283aa999cebd3f7 +SHA512 (cramjam-2.11.0rc3.tar.gz) = 7e4ba4b4dd2c625a9ba04591219f35c7bed1d315bea6c004425021b5ecf7fb0ae52e1f65add35031abd00241fe3f45b26d794997704f5d4112a35d37dc7594e8 From c9aa2899b67da4e54685bb0e08eb34f51b6895a1 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 15:51:32 +0200 Subject: [PATCH 28/33] Rebuilt for Python 3.14 From a9dc08b12bf07c486ced50281182daadf42f1888 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 21 Jun 2025 07:20:03 -0400 Subject: [PATCH 29/33] No longer run tests in parallel This seems to reduce flakiness. --- python-cramjam.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python-cramjam.spec b/python-cramjam.spec index 133870d..c9ea497 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -49,7 +49,6 @@ BuildRequires: cargo-rpm-macros >= 24 # dev extra in pyproject.toml. BuildRequires: %{py3_dist numpy} BuildRequires: %{py3_dist pytest} -BuildRequires: %{py3_dist pytest-xdist} BuildRequires: %{py3_dist hypothesis} %endif @@ -152,7 +151,7 @@ k="${k-}${k+ and }not test_variants_decompress_into" # Failed: DID NOT RAISE k="${k-}${k+ and }not test_variants_raise_exception[deflate]" -%pytest -k "${k-}" --ignore=benchmarks/test_bench.py -v -n auto +%pytest -k "${k-}" --ignore=benchmarks/test_bench.py -v %endif From 05fe45941efb39e55fa0050bb5d2cdae7a6735f2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 07:23:46 +0000 Subject: [PATCH 30/33] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 2344e1fb467094500df377cd51fca5e3218f5a5a Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 27 Jul 2025 07:44:26 -0400 Subject: [PATCH 31/33] Update to 2.11.0 (close RHBZ#2383690) --- .gitignore | 1 + 214.patch | 404 -------------------------------------------- python-cramjam.spec | 8 +- sources | 2 +- 4 files changed, 3 insertions(+), 412 deletions(-) delete mode 100644 214.patch diff --git a/.gitignore b/.gitignore index ef18df8..a7a581a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /cramjam-2.10.0.tar.gz /cramjam-2.11.0rc2.tar.gz /cramjam-2.11.0rc3.tar.gz +/cramjam-2.11.0.tar.gz diff --git a/214.patch b/214.patch deleted file mode 100644 index 0896429..0000000 --- a/214.patch +++ /dev/null @@ -1,404 +0,0 @@ -From afeeff893184937aadd1c2a13b32cfb3f5d83f9f Mon Sep 17 00:00:00 2001 -From: Nathan Goldbaum -Date: Thu, 15 May 2025 15:19:22 -0400 -Subject: [PATCH 1/6] Update pyo3 dependency to 0.25 - ---- - Cargo.lock | 21 ++++++++++----------- - Cargo.toml | 4 ++-- - 2 files changed, 12 insertions(+), 13 deletions(-) - -diff --git a/Cargo.lock b/Cargo.lock -index 45c1da51..52c0011b 100644 ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -544,11 +544,10 @@ dependencies = [ - - [[package]] - name = "pyo3" --version = "0.24.1" -+version = "0.25.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "17da310086b068fbdcefbba30aeb3721d5bb9af8db4987d6735b2183ca567229" -+checksum = "f239d656363bcee73afef85277f1b281e8ac6212a1d42aa90e55b90ed43c47a4" - dependencies = [ -- "cfg-if", - "indoc", - "libc", - "memoffset", -@@ -562,9 +561,9 @@ dependencies = [ - - [[package]] - name = "pyo3-build-config" --version = "0.24.1" -+version = "0.25.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e27165889bd793000a098bb966adc4300c312497ea25cf7a690a9f0ac5aa5fc1" -+checksum = "755ea671a1c34044fa165247aaf6f419ca39caa6003aee791a0df2713d8f1b6d" - dependencies = [ - "once_cell", - "python3-dll-a", -@@ -573,9 +572,9 @@ dependencies = [ - - [[package]] - name = "pyo3-ffi" --version = "0.24.1" -+version = "0.25.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "05280526e1dbf6b420062f3ef228b78c0c54ba94e157f5cb724a609d0f2faabc" -+checksum = "fc95a2e67091e44791d4ea300ff744be5293f394f1bafd9f78c080814d35956e" - dependencies = [ - "libc", - "pyo3-build-config", -@@ -583,9 +582,9 @@ dependencies = [ - - [[package]] - name = "pyo3-macros" --version = "0.24.1" -+version = "0.25.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "5c3ce5686aa4d3f63359a5100c62a127c9f15e8398e5fdeb5deef1fed5cd5f44" -+checksum = "a179641d1b93920829a62f15e87c0ed791b6c8db2271ba0fd7c2686090510214" - dependencies = [ - "proc-macro2", - "pyo3-macros-backend", -@@ -595,9 +594,9 @@ dependencies = [ - - [[package]] - name = "pyo3-macros-backend" --version = "0.24.1" -+version = "0.25.0" - source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "f4cf6faa0cbfb0ed08e89beb8103ae9724eb4750e3a78084ba4017cbe94f3855" -+checksum = "9dff85ebcaab8c441b0e3f7ae40a6963ecea8a9f5e74f647e33fcf5ec9a1e89e" - dependencies = [ - "heck 0.5.0", - "proc-macro2", -diff --git a/Cargo.toml b/Cargo.toml -index a2cd5389..d74705e3 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -65,11 +65,11 @@ wasm32-compat = ["libcramjam/wasm32-compat"] - - - [dependencies] --pyo3 = { version = "^0.24", default-features = false, features = ["macros"] } -+pyo3 = { version = "^0.25", default-features = false, features = ["macros"] } - libcramjam = { version = "^0.7", default-features = false } - - [build-dependencies] --pyo3-build-config = "^0.24" -+pyo3-build-config = "^0.25" - - [profile.release] - strip = true - -From ea61683827df24b636fa4b4bb70119b1eb7a85e8 Mon Sep 17 00:00:00 2001 -From: Nathan Goldbaum -Date: Thu, 15 May 2025 15:55:01 -0400 -Subject: [PATCH 2/6] use a mutable bytearray in reference cleanup test to - avoid immortalization - ---- - tests/test_buffer_view.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/test_buffer_view.py b/tests/test_buffer_view.py -index 9776bdce..46cc2eda 100644 ---- a/tests/test_buffer_view.py -+++ b/tests/test_buffer_view.py -@@ -99,7 +99,7 @@ def test_buffer_view_cleanup(): - n_refs = 0 - - def get_buffer(): -- data = b"bytes" -+ data = bytearray(b"bytes") - buf = cramjam.Buffer(data, copy=False) - - nonlocal n_refs - -From aa54ac6678c7b18d53b40d0214f9d6c2604ead4d Mon Sep 17 00:00:00 2001 -From: Nathan Goldbaum -Date: Sun, 18 May 2025 10:53:31 -0400 -Subject: [PATCH 3/6] Use a bytearray in test that mutates a buffer - ---- - tests/test_buffer_view.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/test_buffer_view.py b/tests/test_buffer_view.py -index 46cc2eda..bc0fb4df 100644 ---- a/tests/test_buffer_view.py -+++ b/tests/test_buffer_view.py -@@ -37,7 +37,7 @@ def test_buffer_view_raises_when_writing_past_data_length_at_once(): - - @pytest.mark.skip_pypy - def test_buffer_view_raises_when_writing_past_data_length_incrementally(): -- data = b"bytes" -+ data = bytearray(b"bytes") - buf = Buffer(data, copy=False) - - # This is okay, up to length of underlying buffer - -From becf091553eccbe5f778f387c8557233ca3638d2 Mon Sep 17 00:00:00 2001 -From: Nathan Goldbaum -Date: Sun, 18 May 2025 11:46:30 -0400 -Subject: [PATCH 4/6] make tests pass on the free-threaded build - ---- - src/io.rs | 28 ++++++++++++++++++---------- - tests/conftest.py | 5 +++++ - tests/test_buffer_view.py | 6 +++--- - tests/test_rust_io.py | 4 ++-- - tests/test_variants.py | 12 ++++++------ - 5 files changed, 34 insertions(+), 21 deletions(-) - -diff --git a/src/io.rs b/src/io.rs -index 2e772ddf..7d552dd0 100644 ---- a/src/io.rs -+++ b/src/io.rs -@@ -14,6 +14,7 @@ use pyo3::exceptions::{self, PyBufferError}; - use pyo3::ffi; - use pyo3::prelude::*; - use pyo3::types::PyBytes; -+use pyo3::IntoPyObjectExt; - use std::path::PathBuf; - - pub(crate) trait AsBytes { -@@ -176,8 +177,8 @@ impl RustyFile { - pub struct PythonBuffer { - pub(crate) inner: std::pin::Pin>, - pub(crate) pos: usize, -- #[cfg(PyPy)] -- pub(crate) owner: PyObject, -+ #[cfg(any(PyPy, Py_GIL_DISABLED))] -+ pub(crate) owner: Py, - } - // PyBuffer is thread-safe: the shape of the buffer is immutable while a Py_buffer exists. - // Accessing the buffer contents is protected using the GIL. -@@ -207,14 +208,23 @@ impl PythonBuffer { - } - /// Get the underlying buffer as a mutable slice of bytes - pub fn as_slice_mut(&mut self) -> PyResult<&mut [u8]> { -- #[cfg(PyPy)] -+ #[cfg(any(PyPy, Py_GIL_DISABLED))] - { - Python::with_gil(|py| { - let is_memoryview = unsafe { ffi::PyMemoryView_Check(self.owner.as_ptr()) } == 1; - if is_memoryview || self.owner.bind(py).is_instance_of::() { -- Err(pyo3::exceptions::PyTypeError::new_err( -- "With PyPy, an output of type `bytes` or `memoryview` does not work. See issue pypy/pypy#4918", -- )) -+ #[cfg(PyPy)] -+ { -+ Err(pyo3::exceptions::PyTypeError::new_err( -+ "Cannot create mutable reference to `bytes` or `memoryview` on PyPy. See issue pypy/pypy#4918", -+ )) -+ } -+ #[cfg(Py_GIL_DISABLED)] -+ { -+ Err(pyo3::exceptions::PyTypeError::new_err( -+ "Cannot create mutable reference to `bytes` or `memoryview` on the free-threaded build. See issue milesgranger/cramjam#213" -+ )) -+ } - } else { - Ok(()) - } -@@ -274,8 +284,8 @@ impl<'a, 'py> TryFrom<&'a Bound<'py, PyAny>> for PythonBuffer { - let buf = Self { - inner: std::pin::Pin::from(buf), - pos: 0, -- #[cfg(PyPy)] -- owner: Python::with_gil(|py| obj.to_object(py)), -+ #[cfg(any(PyPy, Py_GIL_DISABLED))] -+ owner: Python::with_gil(|py| obj.into_py_any(py).unwrap()), - }; - // sanity checks - if buf.inner.shape.is_null() { -@@ -412,7 +422,6 @@ impl RustyBuffer { - pub fn __init__(py: Python, mut data: Option>, copy: Option) -> PyResult { - if let Some(maybe_bytestype) = data.as_mut() { - let mut bytestype = maybe_bytestype.extract::>(py)?; -- - if copy.unwrap_or(true) { - let mut buf = vec![]; - bytestype.read_to_end(&mut buf)?; -@@ -648,7 +657,6 @@ impl RustyBuffer { - (*view).buf = bytes.as_ptr() as *mut std::os::raw::c_void; - (*view).len = bytes.len() as isize; - (*view).readonly = 0; -- (*view).itemsize = 1; - - (*view).format = std::ptr::null_mut(); - if (flags & ffi::PyBUF_FORMAT) == ffi::PyBUF_FORMAT { -diff --git a/tests/conftest.py b/tests/conftest.py -index 408bb15b..32674325 100644 ---- a/tests/conftest.py -+++ b/tests/conftest.py -@@ -1,4 +1,5 @@ - import platform -+import sysconfig - - import pytest - -@@ -8,6 +9,10 @@ def is_pypy(): - impl = platform.python_implementation() - return impl.lower() == "pypy" - -+@pytest.fixture(scope="session") -+def is_free_threaded(): -+ return bool(sysconfig.get_config_var("Py_GIL_DISABLED")) -+ - - def pytest_configure(config): - config.addinivalue_line("markers", "skip_pypy: skip this test on PyPy") -diff --git a/tests/test_buffer_view.py b/tests/test_buffer_view.py -index bc0fb4df..dc499895 100644 ---- a/tests/test_buffer_view.py -+++ b/tests/test_buffer_view.py -@@ -12,7 +12,7 @@ def test_buffer_view(copy): - if copy is not None: - kwargs["copy"] = copy - -- data = b"bytes" -+ data = bytearray(b"bytes") - buf = Buffer(data, **kwargs) - buf.write(b"0") - -@@ -26,7 +26,7 @@ def test_buffer_view(copy): - - @pytest.mark.skip_pypy - def test_buffer_view_raises_when_writing_past_data_length_at_once(): -- data = b"bytes" -+ data = bytearray(b"bytes") - buf = Buffer(data, copy=False) - - # Won't write pasted underlying buffer if passed data all at once -@@ -74,7 +74,7 @@ def test_buffer_view_raises_when_truncating(): - @pytest.mark.skip_pypy - @pytest.mark.parametrize("whence", (0, 1, 2)) - def test_buffer_view_raises_when_write_after_bad_seek(whence): -- buf = Buffer(b"bytes", copy=False) -+ buf = Buffer(bytearray(b"bytes"), copy=False) - - buf.seek(2, whence=0) # Seek forward 2 from start, also okay - buf.seek(2, whence=1) # Seek forward 2 from current position, okay -diff --git a/tests/test_rust_io.py b/tests/test_rust_io.py -index 6737262e..72b5e3e1 100644 ---- a/tests/test_rust_io.py -+++ b/tests/test_rust_io.py -@@ -4,7 +4,7 @@ - - - @pytest.mark.parametrize("Obj", (File, Buffer)) --def test_obj_api(tmpdir, Obj, is_pypy): -+def test_obj_api(tmpdir, Obj, is_pypy, is_free_threaded): - if isinstance(Obj, File): - buf = File(str(tmpdir.join("file.txt"))) - else: -@@ -30,7 +30,7 @@ def test_obj_api(tmpdir, Obj, is_pypy): - ): - buf.seek(0) - -- if isinstance(out, bytes) and is_pypy: -+ if isinstance(out, bytes) and (is_pypy or is_free_threaded): - with pytest.raises(OSError): - buf.readinto(out) - continue -diff --git a/tests/test_variants.py b/tests/test_variants.py -index 1afa2c5b..740913f4 100644 ---- a/tests/test_variants.py -+++ b/tests/test_variants.py -@@ -106,7 +106,7 @@ def test_variants_raise_exception(variant_str): - @pytest.mark.parametrize("variant_str", VARIANTS) - @given(raw_data=st.binary()) - def test_variants_compress_into( -- variant_str, input_type, output_type, raw_data, tmp_path_factory, is_pypy -+ variant_str, input_type, output_type, raw_data, tmp_path_factory, is_pypy, is_free_threaded - ): - # TODO: Fix segfault when using blosc2 compress_into cramjam.File - # decompress_into appears to work fine. -@@ -148,9 +148,9 @@ def test_variants_compress_into( - else: - output = output_type(b"0" * compressed_len) - -- if is_pypy and isinstance(output, (bytes, memoryview)): -+ if (is_pypy or is_free_threaded) and isinstance(output, (bytes, memoryview)): - pytest.xfail( -- reason="PyPy de/compress_into w/ bytes or memoryview is a bit flaky behavior" -+ reason="Decompressing into immutable objects is not supported on PyPy or the free-threaded build" - ) - - n_bytes = variant.compress_into(input, output) -@@ -176,7 +176,7 @@ def test_variants_compress_into( - @pytest.mark.parametrize("variant_str", VARIANTS) - @given(raw_data=st.binary()) - def test_variants_decompress_into( -- variant_str, input_type, output_type, tmp_path_factory, raw_data, is_pypy -+ variant_str, input_type, output_type, tmp_path_factory, raw_data, is_pypy, is_free_threaded - ): - if variant_str == "izlib" and output_type == "memoryview": - pytest.skip("See issue https://github.com/milesgranger/cramjam/issues/193") -@@ -213,9 +213,9 @@ def test_variants_decompress_into( - else: - output = output_type(b"0" * len(raw_data)) - -- if is_pypy and isinstance(output, (bytes, memoryview)): -+ if (is_pypy or is_free_threaded) and isinstance(output, (bytes, memoryview)): - pytest.xfail( -- reason="PyPy de/compress_into w/ bytes or memoryview is a bit flaky behavior" -+ reason="Decompressing into immutable objects is not supported on PyPy or the free-threaded build" - ) - - n_bytes = variant.decompress_into(input, output) - -From 828b616c4ae34dd3dad0eac266316cf7d79b584c Mon Sep 17 00:00:00 2001 -From: Nathan Goldbaum -Date: Tue, 20 May 2025 13:20:43 -0400 -Subject: [PATCH 5/6] test only fails on 3.14 - ---- - tests/test_rust_io.py | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/tests/test_rust_io.py b/tests/test_rust_io.py -index 72b5e3e1..ae329691 100644 ---- a/tests/test_rust_io.py -+++ b/tests/test_rust_io.py -@@ -1,3 +1,5 @@ -+import sys -+ - import pytest - - from cramjam import File, Buffer -@@ -30,7 +32,8 @@ def test_obj_api(tmpdir, Obj, is_pypy, is_free_threaded): - ): - buf.seek(0) - -- if isinstance(out, bytes) and (is_pypy or is_free_threaded): -+ if isinstance(out, bytes) and ( -+ is_pypy or (is_free_threaded and sys.version_info >= (3, 14))): - with pytest.raises(OSError): - buf.readinto(out) - continue - -From c89e7e010fe038d290cdd12cc8c0135992bce7db Mon Sep 17 00:00:00 2001 -From: Nathan Goldbaum -Date: Mon, 26 May 2025 11:22:25 -0600 -Subject: [PATCH 6/6] relax hypothesis pin - ---- - pyproject.toml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pyproject.toml b/pyproject.toml -index 0584e0bd..7e77e5be 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -31,5 +31,5 @@ dev = [ - "pytest>=5.30", - "pytest-xdist", - "pytest-benchmark", -- "hypothesis<6.123.0" -+ "hypothesis" - ] diff --git a/python-cramjam.spec b/python-cramjam.spec index c9ea497..cb1b1c2 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -4,7 +4,7 @@ #global snapdate YYYYMMDD Name: python-cramjam -Version: 2.11.0~rc3 +Version: 2.11.0 Release: %autorelease Summary: Thin Python bindings to de/compression algorithms in Rust @@ -33,11 +33,6 @@ Source1: get_source %endif -# Ban mutating immutable buffers on the free-threaded build -# (Updates to PyO3 0.25 and fixes Python 3.14 support) -# https://github.com/milesgranger/cramjam/pull/214 -Patch: https://github.com/milesgranger/cramjam/pull/214.patch - BuildSystem: pyproject BuildOption(install): -l cramjam @@ -62,7 +57,6 @@ BuildRequires: %{py3_dist hypothesis} Summary: %{summary} # 0BSD OR MIT OR Apache-2.0 # Apache-2.0 -# Apache-2.0 OR MIT # BSD-3-Clause # BSD-3-Clause AND MIT # MIT diff --git a/sources b/sources index 95a7195..9b98da9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cramjam-2.11.0rc3.tar.gz) = 7e4ba4b4dd2c625a9ba04591219f35c7bed1d315bea6c004425021b5ecf7fb0ae52e1f65add35031abd00241fe3f45b26d794997704f5d4112a35d37dc7594e8 +SHA512 (cramjam-2.11.0.tar.gz) = d92446c0c0ef885f3544783caa1f179fd50b6a6290ada011495b7385411527f75a2544c0c8cdc36910c83c879dbac7dd130f4fe8f3dc3b885a84a45286cb3695 From 9233dbc99686d740b3767ed1db833511d9bc845c Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 13:32:02 +0200 Subject: [PATCH 32/33] Rebuilt for Python 3.14.0rc2 bytecode From ed709046ea3f6a7ba15bcbcc6248c3c2550c9453 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 13:04:31 +0200 Subject: [PATCH 33/33] Rebuilt for Python 3.14.0rc3 bytecode