Compare commits
	
		
			8 Commits
		
	
	
		
	
	| Author | SHA256 | Date | |
|---|---|---|---|
| 3d360b3000 | |||
| 13851f15b4 | |||
| 14f5f191d3 | |||
| a849199fcb | |||
| 20a8740cfc | |||
| 6c9af10bca | |||
| 6e37c98078 | |||
| 9598cef9fe | 
@@ -1,14 +1,8 @@
 | 
				
			|||||||
---
 | 
					diff --git a/c-ext/backend_c.c b/c-ext/backend_c.c
 | 
				
			||||||
 c-ext/backend_c.c               |   14 ++++++++++++++
 | 
					index 9aa7a5c..f67191a 100644
 | 
				
			||||||
 setup_zstd.py                   |    1 +
 | 
					--- a/c-ext/backend_c.c
 | 
				
			||||||
 tests/test_module_attributes.py |   10 +++++++++-
 | 
					+++ b/c-ext/backend_c.c
 | 
				
			||||||
 3 files changed, 24 insertions(+), 1 deletion(-)
 | 
					@@ -210,6 +210,20 @@ void zstd_module_init(PyObject *m) {
 | 
				
			||||||
 | 
					 | 
				
			||||||
Index: zstandard-0.24.0/c-ext/backend_c.c
 | 
					 | 
				
			||||||
===================================================================
 | 
					 | 
				
			||||||
--- zstandard-0.24.0.orig/c-ext/backend_c.c	2025-08-17 01:50:50.000000000 +0200
 | 
					 | 
				
			||||||
+++ zstandard-0.24.0/c-ext/backend_c.c	2025-09-16 16:15:10.125710215 +0200
 | 
					 | 
				
			||||||
@@ -210,6 +210,20 @@
 | 
					 | 
				
			||||||
     Py_DECREF(feature);
 | 
					     Py_DECREF(feature);
 | 
				
			||||||
 #endif
 | 
					 #endif
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -29,11 +23,11 @@ Index: zstandard-0.24.0/c-ext/backend_c.c
 | 
				
			|||||||
     if (PyObject_SetAttrString(m, "backend_features", features) == -1) {
 | 
					     if (PyObject_SetAttrString(m, "backend_features", features) == -1) {
 | 
				
			||||||
         return;
 | 
					         return;
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
Index: zstandard-0.24.0/setup_zstd.py
 | 
					diff --git a/setup_zstd.py b/setup_zstd.py
 | 
				
			||||||
===================================================================
 | 
					index 5aefdd0..3d8fe73 100644
 | 
				
			||||||
--- zstandard-0.24.0.orig/setup_zstd.py	2025-08-17 02:20:18.000000000 +0200
 | 
					--- a/setup_zstd.py
 | 
				
			||||||
+++ zstandard-0.24.0/setup_zstd.py	2025-09-16 16:15:10.125758965 +0200
 | 
					+++ b/setup_zstd.py
 | 
				
			||||||
@@ -79,6 +79,7 @@
 | 
					@@ -78,6 +78,7 @@ def get_c_extension(
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
     if system_zstd:
 | 
					     if system_zstd:
 | 
				
			||||||
         extra_args.append("-DZSTD_MULTITHREAD")
 | 
					         extra_args.append("-DZSTD_MULTITHREAD")
 | 
				
			||||||
@@ -41,11 +35,11 @@ Index: zstandard-0.24.0/setup_zstd.py
 | 
				
			|||||||
     else:
 | 
					     else:
 | 
				
			||||||
         extra_args.append("-DZSTD_SINGLE_FILE")
 | 
					         extra_args.append("-DZSTD_SINGLE_FILE")
 | 
				
			||||||
         extra_args.append("-DZSTDLIB_VISIBLE=")
 | 
					         extra_args.append("-DZSTDLIB_VISIBLE=")
 | 
				
			||||||
Index: zstandard-0.24.0/tests/test_module_attributes.py
 | 
					diff --git a/tests/test_module_attributes.py b/tests/test_module_attributes.py
 | 
				
			||||||
===================================================================
 | 
					index a540bfe..a081b1a 100644
 | 
				
			||||||
--- zstandard-0.24.0.orig/tests/test_module_attributes.py	2025-08-17 19:03:17.000000000 +0200
 | 
					--- a/tests/test_module_attributes.py
 | 
				
			||||||
+++ zstandard-0.24.0/tests/test_module_attributes.py	2025-09-16 16:15:10.125970238 +0200
 | 
					+++ b/tests/test_module_attributes.py
 | 
				
			||||||
@@ -26,7 +26,15 @@
 | 
					@@ -26,7 +26,15 @@ class TestModuleAttributes(unittest.TestCase):
 | 
				
			||||||
             },
 | 
					             },
 | 
				
			||||||
         }[zstd.backend]
 | 
					         }[zstd.backend]
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										78
									
								
								fix-zstd-1.5.7.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										78
									
								
								fix-zstd-1.5.7.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,78 @@
 | 
				
			|||||||
 | 
					Index: zstandard-0.23.0/tests/test_compressor_compress.py
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- zstandard-0.23.0.orig/tests/test_compressor_compress.py
 | 
				
			||||||
 | 
					+++ zstandard-0.23.0/tests/test_compressor_compress.py
 | 
				
			||||||
 | 
					@@ -52,7 +52,7 @@ class TestCompressor_compress(unittest.T
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					         cctx = zstd.ZstdCompressor(level=3, write_content_size=False)
 | 
				
			||||||
 | 
					         result = cctx.compress(b"".join(chunks))
 | 
				
			||||||
 | 
					-        self.assertEqual(len(result), 999)
 | 
				
			||||||
 | 
					+        self.assertEqual(len(result), 1029)
 | 
				
			||||||
 | 
					         self.assertEqual(result[0:4], b"\x28\xb5\x2f\xfd")
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					         # This matches the test for read_to_iter() below.
 | 
				
			||||||
 | 
					Index: zstandard-0.23.0/tests/test_compressor_compressobj.py
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- zstandard-0.23.0.orig/tests/test_compressor_compressobj.py
 | 
				
			||||||
 | 
					+++ zstandard-0.23.0/tests/test_compressor_compressobj.py
 | 
				
			||||||
 | 
					@@ -39,7 +39,7 @@ class TestCompressor_compressobj(unittes
 | 
				
			||||||
 | 
					         cobj = cctx.compressobj()
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					         result = cobj.compress(b"".join(chunks)) + cobj.flush()
 | 
				
			||||||
 | 
					-        self.assertEqual(len(result), 999)
 | 
				
			||||||
 | 
					+        self.assertEqual(len(result), 1029)
 | 
				
			||||||
 | 
					         self.assertEqual(result[0:4], b"\x28\xb5\x2f\xfd")
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					         params = zstd.get_frame_parameters(result)
 | 
				
			||||||
 | 
					Index: zstandard-0.23.0/tests/test_compressor_copy_stream.py
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- zstandard-0.23.0.orig/tests/test_compressor_copy_stream.py
 | 
				
			||||||
 | 
					+++ zstandard-0.23.0/tests/test_compressor_copy_stream.py
 | 
				
			||||||
 | 
					@@ -50,7 +50,7 @@ class TestCompressor_copy_stream(unittes
 | 
				
			||||||
 | 
					         r, w = cctx.copy_stream(source, dest)
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					         self.assertEqual(r, 255 * 16384)
 | 
				
			||||||
 | 
					-        self.assertEqual(w, 999)
 | 
				
			||||||
 | 
					+        self.assertEqual(w, 1029)
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					         params = zstd.get_frame_parameters(dest.getvalue())
 | 
				
			||||||
 | 
					         self.assertEqual(params.content_size, zstd.CONTENTSIZE_UNKNOWN)
 | 
				
			||||||
 | 
					Index: zstandard-0.23.0/tests/test_compressor_stream_writer.py
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- zstandard-0.23.0.orig/tests/test_compressor_stream_writer.py
 | 
				
			||||||
 | 
					+++ zstandard-0.23.0/tests/test_compressor_stream_writer.py
 | 
				
			||||||
 | 
					@@ -301,7 +301,7 @@ class TestCompressor_stream_writer(unitt
 | 
				
			||||||
 | 
					         d = zstd.train_dictionary(8192, samples)
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					         h = hashlib.sha1(d.as_bytes()).hexdigest()
 | 
				
			||||||
 | 
					-        self.assertEqual(h, "a46d2f7a3bc3357c9d717d3dadf9a26fde23e93d")
 | 
				
			||||||
 | 
					+        self.assertEqual(h, "f32ddfbe0878bbd428afc00b17810387c6752191")
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					         buffer = io.BytesIO()
 | 
				
			||||||
 | 
					         cctx = zstd.ZstdCompressor(level=9, dict_data=d)
 | 
				
			||||||
 | 
					Index: zstandard-0.23.0/c-ext/backend_c.c
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- zstandard-0.23.0.orig/c-ext/backend_c.c
 | 
				
			||||||
 | 
					+++ zstandard-0.23.0/c-ext/backend_c.c
 | 
				
			||||||
 | 
					@@ -152,7 +152,7 @@ void zstd_module_init(PyObject *m) {
 | 
				
			||||||
 | 
					     PyObject *features = NULL;
 | 
				
			||||||
 | 
					     PyObject *feature = NULL;
 | 
				
			||||||
 | 
					     unsigned zstd_ver_no = ZSTD_versionNumber();
 | 
				
			||||||
 | 
					-    unsigned our_hardcoded_version = 10506;
 | 
				
			||||||
 | 
					+    unsigned our_hardcoded_version = 10507;
 | 
				
			||||||
 | 
					     if (ZSTD_VERSION_NUMBER != our_hardcoded_version ||
 | 
				
			||||||
 | 
					         zstd_ver_no != our_hardcoded_version) {
 | 
				
			||||||
 | 
					         PyErr_Format(
 | 
				
			||||||
 | 
					Index: zstandard-0.23.0/tests/test_module_attributes.py
 | 
				
			||||||
 | 
					===================================================================
 | 
				
			||||||
 | 
					--- zstandard-0.23.0.orig/tests/test_module_attributes.py
 | 
				
			||||||
 | 
					+++ zstandard-0.23.0/tests/test_module_attributes.py
 | 
				
			||||||
 | 
					@@ -5,7 +5,7 @@ import zstandard as zstd
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 class TestModuleAttributes(unittest.TestCase):
 | 
				
			||||||
 | 
					     def test_version(self):
 | 
				
			||||||
 | 
					-        self.assertEqual(zstd.ZSTD_VERSION, (1, 5, 6))
 | 
				
			||||||
 | 
					+        self.assertEqual(zstd.ZSTD_VERSION, (1, 5, 7))
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					         self.assertEqual(zstd.__version__, "0.23.0")
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
@@ -1,22 +1,3 @@
 | 
				
			|||||||
-------------------------------------------------------------------
 | 
					 | 
				
			||||||
Tue Sep 16 14:22:03 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
- Switch from %python_{build,install} to %pyproject_* macros.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-------------------------------------------------------------------
 | 
					 | 
				
			||||||
Mon Sep  8 05:29:20 UTC 2025 - Markéta Machová <mmachova@suse.com>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
- Update to 0.24.0
 | 
					 | 
				
			||||||
  * Support for Python 3.8 has been dropped
 | 
					 | 
				
			||||||
  * Bundled zstd library upgraded from 1.5.6 to 1.5.7.
 | 
					 | 
				
			||||||
  * We now use and require cffi 1.17.0 or newer.
 | 
					 | 
				
			||||||
  * We now collections.abs.Buffer on Python 3.12+ instead of typing.ByteString,
 | 
					 | 
				
			||||||
    as typing.ByteString was deprecated and later removed.
 | 
					 | 
				
			||||||
  * get_frame_parameters() now accepts an optional format argument defining
 | 
					 | 
				
			||||||
    the zstandard frame type.
 | 
					 | 
				
			||||||
  * Initial Python 3.14 support.
 | 
					 | 
				
			||||||
- Drop merged fix-zstd-1.5.7.patch
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-------------------------------------------------------------------
 | 
					-------------------------------------------------------------------
 | 
				
			||||||
Tue Jul 22 07:55:15 UTC 2025 - Markéta Machová <mmachova@suse.com>
 | 
					Tue Jul 22 07:55:15 UTC 2025 - Markéta Machová <mmachova@suse.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# spec file for package python-zstandard
 | 
					# spec file for package python-zstandard
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Copyright (c) 2025 SUSE LLC and contributors
 | 
					# Copyright (c) 2025 SUSE LLC
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# All modifications and additions to the file contributed by third parties
 | 
					# All modifications and additions to the file contributed by third parties
 | 
				
			||||||
# remain the property of their copyright owners, unless otherwise agreed
 | 
					# remain the property of their copyright owners, unless otherwise agreed
 | 
				
			||||||
@@ -18,7 +18,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
%{?sle15_python_module_pythons}
 | 
					%{?sle15_python_module_pythons}
 | 
				
			||||||
Name:           python-zstandard
 | 
					Name:           python-zstandard
 | 
				
			||||||
Version:        0.24.0
 | 
					Version:        0.23.0
 | 
				
			||||||
Release:        0
 | 
					Release:        0
 | 
				
			||||||
Summary:        Zstandard bindings for Python
 | 
					Summary:        Zstandard bindings for Python
 | 
				
			||||||
License:        BSD-3-Clause
 | 
					License:        BSD-3-Clause
 | 
				
			||||||
@@ -26,6 +26,7 @@ Group:          Development/Languages/Python
 | 
				
			|||||||
URL:            https://github.com/indygreg/python-zstandard
 | 
					URL:            https://github.com/indygreg/python-zstandard
 | 
				
			||||||
Source:         https://files.pythonhosted.org/packages/source/z/zstandard/zstandard-%{version}.tar.gz
 | 
					Source:         https://files.pythonhosted.org/packages/source/z/zstandard/zstandard-%{version}.tar.gz
 | 
				
			||||||
Patch0:         feature-detection.patch
 | 
					Patch0:         feature-detection.patch
 | 
				
			||||||
 | 
					Patch1:         fix-zstd-1.5.7.patch
 | 
				
			||||||
BuildRequires:  %{python_module devel}
 | 
					BuildRequires:  %{python_module devel}
 | 
				
			||||||
BuildRequires:  %{python_module pip}
 | 
					BuildRequires:  %{python_module pip}
 | 
				
			||||||
BuildRequires:  %{python_module setuptools}
 | 
					BuildRequires:  %{python_module setuptools}
 | 
				
			||||||
@@ -34,9 +35,9 @@ BuildRequires:  fdupes
 | 
				
			|||||||
BuildRequires:  libzstd-devel = 1.5.7
 | 
					BuildRequires:  libzstd-devel = 1.5.7
 | 
				
			||||||
BuildRequires:  python-rpm-macros
 | 
					BuildRequires:  python-rpm-macros
 | 
				
			||||||
Requires:       libzstd1 = 1.5.7
 | 
					Requires:       libzstd1 = 1.5.7
 | 
				
			||||||
Requires:       python-cffi >= 1.17
 | 
					Requires:       python-cffi >= 1.11
 | 
				
			||||||
# SECTION test requirements
 | 
					# SECTION test requirements
 | 
				
			||||||
BuildRequires:  %{python_module cffi >= 1.17}
 | 
					BuildRequires:  %{python_module cffi >= 1.11}
 | 
				
			||||||
BuildRequires:  %{python_module exceptiongroup}
 | 
					BuildRequires:  %{python_module exceptiongroup}
 | 
				
			||||||
BuildRequires:  %{python_module hypothesis}
 | 
					BuildRequires:  %{python_module hypothesis}
 | 
				
			||||||
BuildRequires:  %{python_module pytest-xdist}
 | 
					BuildRequires:  %{python_module pytest-xdist}
 | 
				
			||||||
@@ -52,11 +53,10 @@ Zstandard bindings for Python
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
%build
 | 
					%build
 | 
				
			||||||
export CFLAGS="%{optflags}"
 | 
					export CFLAGS="%{optflags}"
 | 
				
			||||||
%define py_setup_args "--system-zstd"
 | 
					%python_build --system-zstd
 | 
				
			||||||
%pyproject_wheel
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
%install
 | 
					%install
 | 
				
			||||||
%pyproject_install
 | 
					%python_install
 | 
				
			||||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
 | 
					%python_expand %fdupes %{buildroot}%{$python_sitearch}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%check
 | 
					%check
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								zstandard-0.23.0.tar.gz
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								zstandard-0.23.0.tar.gz
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					version https://git-lfs.github.com/spec/v1
 | 
				
			||||||
 | 
					oid sha256:b2d8c62d08e7255f68f7a740bae85b3c9b8e5466baa9cbf7f57f1cde0ac6bc09
 | 
				
			||||||
 | 
					size 681701
 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
version https://git-lfs.github.com/spec/v1
 | 
					 | 
				
			||||||
oid sha256:fe3198b81c00032326342d973e526803f183f97aa9e9a98e3f897ebafe21178f
 | 
					 | 
				
			||||||
size 905681
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user