Wed Jan 19 06:04:35 2022 UTC ()
py-zstandard: updated to 0.17.0

0.17.0 (released 2021-01-18)

Backwards Compatibility Notes

ZstdCompressionWriter and ZstdDecompressionWriter now implement __iter__() and __next__(). The methods always raise io.UnsupportedOperation. The added methods are part of the io.IOBase abstract base class / interface and help ensure instances look like other I/O types.
The HASHLOG3_MAX constant has been removed since it is no longer defined in zstd 1.5.1.

Bug Fixes

The ZstdCompressionReader, ZstdCompressionWriter, ZstdDecompressionReader, and ZstdDecompressionWriter types in the C backend now tracks their closed attribute using the proper C type. Before, due to a mismatch between the C struct type and the type declared to Python, Python could read the wrong bits on platforms like s390x and incorrectly report the value of the closed attribute to Python.

Changes

Bundled zstd library upgraded from 1.5.0 to 1.5.1.
The C backend now exposes the symbols ZstdCompressionReader, ZstdCompressionWriter, ZstdDecompressionReader, and ZstdDecompressionWriter. This should match the behavior of the CFFI backend.
ZstdCompressionWriter and ZstdDecompressionWriter now implement __iter__ and __next__, which always raise io.UnsupportedOperation.
Documentation on thread safety has been updated to note that derived objects like ZstdCompressionWriter have the same thread unsafety as the contexts they were derived from.


(adam)
diff -r1.21 -r1.22 pkgsrc/archivers/py-zstandard/Makefile
diff -r1.21 -r1.22 pkgsrc/archivers/py-zstandard/distinfo
diff -r1.2 -r1.3 pkgsrc/archivers/py-zstandard/patches/patch-c-ext_backend__c.c

cvs diff -r1.21 -r1.22 pkgsrc/archivers/py-zstandard/Makefile (expand / switch to unified diff)

--- pkgsrc/archivers/py-zstandard/Makefile 2022/01/04 20:52:32 1.21
+++ pkgsrc/archivers/py-zstandard/Makefile 2022/01/19 06:04:35 1.22
@@ -1,24 +1,23 @@ @@ -1,24 +1,23 @@
1# $NetBSD: Makefile,v 1.21 2022/01/04 20:52:32 wiz Exp $ 1# $NetBSD: Makefile,v 1.22 2022/01/19 06:04:35 adam Exp $
2 2
3DISTNAME= zstandard-0.16.0 3DISTNAME= zstandard-0.17.0
4PKGNAME= ${PYPKGPREFIX}-${DISTNAME} 4PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
5PKGREVISION= 1 
6CATEGORIES= archivers python 5CATEGORIES= archivers python
7MASTER_SITES= ${MASTER_SITE_PYPI:=z/zstandard/} 6MASTER_SITES= ${MASTER_SITE_PYPI:=z/zstandard/}
8 7
9MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://github.com/indygreg/python-zstandard 9HOMEPAGE= https://github.com/indygreg/python-zstandard
11COMMENT= Zstandard bindings for Python 10COMMENT= Zstandard bindings for Python
12LICENSE= modified-bsd 11LICENSE= modified-bsd
13 12
14DEPENDS+= ${PYPKGPREFIX}-cffi>=1.11:../../devel/py-cffi 13DEPENDS+= ${PYPKGPREFIX}-cffi>=1.11:../../devel/py-cffi
15TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis-[0-9]*:../../devel/py-hypothesis 14TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis-[0-9]*:../../devel/py-hypothesis
16 15
17PYSETUPBUILDARGS+= --system-zstd 16PYSETUPBUILDARGS+= --system-zstd
18 17
19PYTHON_VERSIONS_INCOMPATIBLE= 27 18PYTHON_VERSIONS_INCOMPATIBLE= 27
20 19
21BUILDLINK_API_DEPENDS.zstd+= zstd>=1.5.0 20BUILDLINK_API_DEPENDS.zstd+= zstd>=1.5.1
22.include "../../archivers/zstd/buildlink3.mk" 21.include "../../archivers/zstd/buildlink3.mk"
23.include "../../lang/python/egg.mk" 22.include "../../lang/python/egg.mk"
24.include "../../mk/bsd.pkg.mk" 23.include "../../mk/bsd.pkg.mk"

cvs diff -r1.21 -r1.22 pkgsrc/archivers/py-zstandard/distinfo (expand / switch to unified diff)

--- pkgsrc/archivers/py-zstandard/distinfo 2021/12/02 11:24:50 1.21
+++ pkgsrc/archivers/py-zstandard/distinfo 2022/01/19 06:04:35 1.22
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.21 2021/12/02 11:24:50 adam Exp $ 1$NetBSD: distinfo,v 1.22 2022/01/19 06:04:35 adam Exp $
2 2
3BLAKE2s (zstandard-0.16.0.tar.gz) = 88c934f4127cf2bf215266856fad41a2171075aeb0838427d94e979b33badac8 3BLAKE2s (zstandard-0.17.0.tar.gz) = 2de7fb51d6844b307bbff7e1f46369ad781b68cf454e73104f641a68cdcc6e82
4SHA512 (zstandard-0.16.0.tar.gz) = f528cace58c1f1ec0fbea96e1646d92b05077ab6f5919eec07dc7b4fcfadf97dc848238928276fdb4333fb2cd035509af472ee352608661c3de681bc8dbed318 4SHA512 (zstandard-0.17.0.tar.gz) = 312aa02c7309fac64cf70ca901942118d4b3f12f27d20cc18dcaba5ce155ad81ea8d7657501a33a5fb6cdc8bcca11f91141ea9d6c3fc09c28a84d698b9050391
5Size (zstandard-0.16.0.tar.gz) = 563633 bytes 5Size (zstandard-0.17.0.tar.gz) = 629456 bytes
6SHA1 (patch-c-ext_backend__c.c) = 205801c19412c6d4b43fb3fac76db7990f97ee74 6SHA1 (patch-c-ext_backend__c.c) = e66030166a04c355b941e0d524af59882ec70bb4

cvs diff -r1.2 -r1.3 pkgsrc/archivers/py-zstandard/patches/patch-c-ext_backend__c.c (expand / switch to unified diff)

--- pkgsrc/archivers/py-zstandard/patches/patch-c-ext_backend__c.c 2021/12/02 11:24:50 1.2
+++ pkgsrc/archivers/py-zstandard/patches/patch-c-ext_backend__c.c 2022/01/19 06:04:35 1.3
@@ -1,24 +1,24 @@ @@ -1,24 +1,24 @@
1$NetBSD: patch-c-ext_backend__c.c,v 1.2 2021/12/02 11:24:50 adam Exp $ 1$NetBSD: patch-c-ext_backend__c.c,v 1.3 2022/01/19 06:04:35 adam Exp $
2 2
3Do not use hardcoded version number. 3Do not use hardcoded version number.
4 4
5--- c-ext/backend_c.c.orig 2021-02-27 19:38:19.000000000 +0000 5--- c-ext/backend_c.c.orig 2021-02-27 19:38:19.000000000 +0000
6+++ c-ext/backend_c.c 6+++ c-ext/backend_c.c
7@@ -152,15 +152,13 @@ void zstd_module_init(PyObject *m) { 7@@ -152,15 +152,13 @@ void zstd_module_init(PyObject *m) {
8 PyObject *features = NULL; 8 PyObject *features = NULL;
9 PyObject *feature = NULL; 9 PyObject *feature = NULL;
10 unsigned zstd_ver_no = ZSTD_versionNumber(); 10 unsigned zstd_ver_no = ZSTD_versionNumber();
11- unsigned our_hardcoded_version = 10500; 11- unsigned our_hardcoded_version = 10501;
12- if (ZSTD_VERSION_NUMBER != our_hardcoded_version || 12- if (ZSTD_VERSION_NUMBER != our_hardcoded_version ||
13- zstd_ver_no != our_hardcoded_version) { 13- zstd_ver_no != our_hardcoded_version) {
14+ if (ZSTD_VERSION_NUMBER != zstd_ver_no) { 14+ if (ZSTD_VERSION_NUMBER != zstd_ver_no) {
15 PyErr_Format( 15 PyErr_Format(
16 PyExc_ImportError, 16 PyExc_ImportError,
17 "zstd C API versions mismatch; Python bindings were not " 17 "zstd C API versions mismatch; Python bindings were not "
18 "compiled/linked against expected zstd version (%u returned by the " 18 "compiled/linked against expected zstd version (%u returned by the "
19- "lib, %u hardcoded in zstd headers, %u hardcoded in the cext)", 19- "lib, %u hardcoded in zstd headers, %u hardcoded in the cext)",
20- zstd_ver_no, ZSTD_VERSION_NUMBER, our_hardcoded_version); 20- zstd_ver_no, ZSTD_VERSION_NUMBER, our_hardcoded_version);
21+ "lib, %u hardcoded in zstd headers)", 21+ "lib, %u hardcoded in zstd headers)",
22+ zstd_ver_no, ZSTD_VERSION_NUMBER); 22+ zstd_ver_no, ZSTD_VERSION_NUMBER);
23 return; 23 return;
24 } 24 }