Sync from SUSE:SLFO:Main python-zstandard revision ae43f8868d5a9d9db5cda8e663afb86e
This commit is contained in:
79
fix-zstd-1.5.7.patch
Normal file
79
fix-zstd-1.5.7.patch
Normal file
@@ -0,0 +1,79 @@
|
||||
Index: zstandard-0.22.0/tests/test_compressor_compress.py
|
||||
===================================================================
|
||||
--- zstandard-0.22.0.orig/tests/test_compressor_compress.py
|
||||
+++ zstandard-0.22.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.22.0/tests/test_compressor_compressobj.py
|
||||
===================================================================
|
||||
--- zstandard-0.22.0.orig/tests/test_compressor_compressobj.py
|
||||
+++ zstandard-0.22.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.22.0/tests/test_compressor_copy_stream.py
|
||||
===================================================================
|
||||
--- zstandard-0.22.0.orig/tests/test_compressor_copy_stream.py
|
||||
+++ zstandard-0.22.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.22.0/tests/test_compressor_stream_writer.py
|
||||
===================================================================
|
||||
--- zstandard-0.22.0.orig/tests/test_compressor_stream_writer.py
|
||||
+++ zstandard-0.22.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.22.0/c-ext/backend_c.c
|
||||
===================================================================
|
||||
--- zstandard-0.22.0.orig/c-ext/backend_c.c
|
||||
+++ zstandard-0.22.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 = 10505;
|
||||
+ unsigned our_hardcoded_version = 10507;
|
||||
if (ZSTD_VERSION_NUMBER != our_hardcoded_version ||
|
||||
zstd_ver_no != our_hardcoded_version) {
|
||||
PyErr_Format(
|
||||
Index: zstandard-0.22.0/tests/test_module_attributes.py
|
||||
===================================================================
|
||||
--- zstandard-0.22.0.orig/tests/test_module_attributes.py
|
||||
+++ zstandard-0.22.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, 5))
|
||||
+ self.assertEqual(zstd.ZSTD_VERSION, (1, 5, 7))
|
||||
|
||||
self.assertEqual(zstd.__version__, "0.22.0")
|
||||
|
@@ -1,3 +1,41 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 21 10:44:16 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
||||
- Add fix-zstd-1.5.7.patch to make it work with zstd-1.5.7
|
||||
- Drop fix-zstd-1.5.6.patch
|
||||
- Require libzstd1 = 1.5.7
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 6 03:43:14 UTC 2024 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
||||
- Remove Conflict with python-zstd - they should be co-installable
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 5 06:57:08 UTC 2024 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
||||
- Add fix-zstd-1.5.6.patch to work with zstd-1.5.6
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 5 13:37:35 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Use %autosetup macro. Allows us to eliminate usage of deprecated
|
||||
%patchN.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 28 15:34:05 UTC 2023 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Add %{?sle15_python_module_pythons}
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 4 07:46:54 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.de>
|
||||
|
||||
- Update to version 0.22.0
|
||||
* Official support for CPython 3.12
|
||||
* ZstdDecompressor.decompressobj() now accepts a read_across_frames
|
||||
boolean named argument to control whether to transparently read across
|
||||
multiple zstd frames. It still defaults to False to preserve existing
|
||||
behavior
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 19 15:19:47 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-zstandard
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,9 +16,9 @@
|
||||
#
|
||||
|
||||
|
||||
%define skip_python2 1
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-zstandard
|
||||
Version: 0.21.0
|
||||
Version: 0.22.0
|
||||
Release: 0
|
||||
Summary: Zstandard bindings for Python
|
||||
License: BSD-3-Clause
|
||||
@@ -26,15 +26,14 @@ Group: Development/Languages/Python
|
||||
URL: https://github.com/indygreg/python-zstandard
|
||||
Source: https://files.pythonhosted.org/packages/source/z/zstandard/zstandard-%{version}.tar.gz
|
||||
Patch0: feature-detection.patch
|
||||
Patch1: fix-zstd-1.5.7.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libzstd-devel
|
||||
BuildRequires: libzstd-devel = 1.5.7
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: zstd = 1.5.5
|
||||
Requires: libzstd1 = 1.5.7
|
||||
Requires: python-cffi >= 1.11
|
||||
Requires: zstd
|
||||
Conflicts: python-zstd
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module cffi >= 1.11}
|
||||
BuildRequires: %{python_module exceptiongroup}
|
||||
@@ -48,8 +47,7 @@ BuildRequires: %{python_module pytest}
|
||||
Zstandard bindings for Python
|
||||
|
||||
%prep
|
||||
%setup -q -n zstandard-%{version}
|
||||
%patch0 -p1
|
||||
%autosetup -p1 -n zstandard-%{version}
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags}"
|
||||
|
BIN
zstandard-0.21.0.tar.gz
(Stored with Git LFS)
BIN
zstandard-0.21.0.tar.gz
(Stored with Git LFS)
Binary file not shown.
BIN
zstandard-0.22.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
zstandard-0.22.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Reference in New Issue
Block a user