pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/py-zstandard py-zstandard: updated to 0.11.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cc1880dadc15
branches:  trunk
changeset: 330260:cc1880dadc15
user:      adam <adam%pkgsrc.org@localhost>
date:      Tue Feb 26 06:42:27 2019 +0000

description:
py-zstandard: updated to 0.11.0

0.11.0 (released 2019-02-24)
============================

Backwards Compatibility Nodes
-----------------------------

* ZstdDecompressor.read() now allows reading sizes of -1 or 0
  and defaults to -1, per the documented behavior of
  io.RawIOBase.read(). Previously, we required an argument that was
  a positive value.
* The readline(), readlines(), __iter__, and __next__ methods
  of ZstdDecompressionReader() now raise io.UnsupportedOperation
  instead of NotImplementedError.
* ZstdDecompressor.stream_reader() now accepts a read_across_frames
  argument. The default value will likely be changed in a future release
  and consumers are advised to pass the argument to avoid unwanted change
  of behavior in the future.
* setup.py now always disables the CFFI backend if the installed
  CFFI package does not meet the minimum version requirements. Before, it was
  possible for the CFFI backend to be generated and a run-time error to
  occur.
* In the CFFI backend, CompressionReader and DecompressionReader
  were renamed to ZstdCompressionReader and ZstdDecompressionReader,
  respectively so naming is identical to the C extension. This should have
  no meaningful end-user impact, as instances aren't meant to be
  constructed directly.
* ZstdDecompressor.stream_writer() now accepts a write_return_read
  argument to control whether write() returns the number of bytes
  read from the source / written to the decompressor. It defaults to off,
  which preserves the existing behavior of returning the number of bytes
  emitted from the decompressor. The default will change in a future release
  so behavior aligns with the specified behavior of io.RawIOBase.
* ZstdDecompressionWriter.__exit__ now calls self.close(). This
  will result in that stream plus the underlying stream being closed as
  well. If this behavior is not desirable, do not use instances as
  context managers.
* ZstdCompressor.stream_writer() now accepts a write_return_read
  argument to control whether write() returns the number of bytes read
  from the source / written to the compressor. It defaults to off, which
  preserves the existing behavior of returning the number of bytes emitted
  from the compressor. The default will change in a future release so
  behavior aligns with the specified behavior of io.RawIOBase.
* ZstdCompressionWriter.__exit__ now calls self.close(). This will
  result in that stream plus any underlying stream being closed as well. If
  this behavior is not desirable, do not use instances as context managers.
* ZstdDecompressionWriter no longer requires being used as a context
  manager.
* ZstdCompressionWriter no longer requires being used as a context
  manager.
* The overlap_size_log attribute on CompressionParameters instances
  has been deprecated and will be removed in a future release. The
  overlap_log attribute should be used instead.
* The overlap_size_log argument to CompressionParameters has been
  deprecated and will be removed in a future release. The overlap_log
  argument should be used instead.
* The ldm_hash_every_log attribute on CompressionParameters instances
  has been deprecated and will be removed in a future release. The
  ldm_hash_rate_log attribute should be used instead.
* The ldm_hash_every_log argument to CompressionParameters has been
  deprecated and will be removed in a future release. The ldm_hash_rate_log
  argument should be used instead.
* The compression_strategy argument to CompressionParameters has been
  deprecated and will be removed in a future release. The strategy
  argument should be used instead.
* The SEARCHLENGTH_MIN and SEARCHLENGTH_MAX constants are deprecated
  and will be removed in a future release. Use MINMATCH_MIN and
  MINMATCH_MAX instead.
* The zstd_cffi module has been renamed to zstandard.cffi. As had
  been documented in the README file since the 0.9.0 release, the
  module should not be imported directly at its new location. Instead,
  import zstandard to cause an appropriate backend module to be loaded
  automatically.

Bug Fixes
---------

* CFFI backend could encounter a failure when sending an empty chunk into
  ZstdDecompressionObj.decompress(). The issue has been fixed.
* CFFI backend could encounter an error when calling
  ZstdDecompressionReader.read() if there was data remaining in an
  internal buffer. The issue has been fixed.

Changes
-------

* ZstDecompressionObj.decompress() now properly handles empty inputs in
  the CFFI backend.
* ZstdCompressionReader now implements read1() and readinto1().
  These are part of the io.BufferedIOBase interface.
* ZstdCompressionReader has gained a readinto(b) method for reading
  compressed output into an existing buffer.
* ZstdCompressionReader.read() now defaults to size=-1 and accepts
  read sizes of -1 and 0. The new behavior aligns with the documented
  behavior of io.RawIOBase.
* ZstdCompressionReader now implements readall(). Previously, this
  method raised NotImplementedError.
* ZstdDecompressionReader now implements read1() and readinto1().
  These are part of the io.BufferedIOBase interface.
* ZstdDecompressionReader.read() now defaults to size=-1 and accepts
  read sizes of -1 and 0. The new behavior aligns with the documented
  behavior of io.RawIOBase.
* ZstdDecompressionReader() now implements readall(). Previously, this
  method raised NotImplementedError.
* The readline(), readlines(), __iter__, and __next__ methods
  of ZstdDecompressionReader() now raise io.UnsupportedOperation
  instead of NotImplementedError. This reflects a decision to never
  implement text-based I/O on (de)compressors and keep the low-level API
  operating in the binary domain.
* README.rst now documented how to achieve linewise iteration using
  an io.TextIOWrapper with a ZstdDecompressionReader.
* ZstdDecompressionReader has gained a readinto(b) method for
  reading decompressed output into an existing buffer. This allows chaining
  to an io.TextIOWrapper on Python 3 without using an io.BufferedReader.
* ZstdDecompressor.stream_reader() now accepts a read_across_frames
  argument to control behavior when the input data has multiple zstd
  *frames*. When False (the default for backwards compatibility), a
  read() will stop when the end of a zstd *frame* is encountered. When
  True, read() can potentially return data spanning multiple zstd
  *frames*. The default will likely be changed to True in a future
  release.
* setup.py now performs CFFI version sniffing and disables the CFFI
  backend if CFFI is too old. Previously, we only used install_requires
  to enforce the CFFI version and not all build modes would properly enforce
  the minimum CFFI version.
* CFFI's ZstdDecompressionReader.read() now properly handles data
  remaining in any internal buffer. Before, repeated read() could
  result in *random* errors.
* Upgraded various Python packages in CI environment.
* Upgrade to hypothesis 4.5.11.
* In the CFFI backend, CompressionReader and DecompressionReader
  were renamed to ZstdCompressionReader and ZstdDecompressionReader,
  respectively.
* ZstdDecompressor.stream_writer() now accepts a write_return_read
  argument to control whether write() returns the number of bytes read
  from the source. It defaults to False to preserve backwards
  compatibility.
* ZstdDecompressor.stream_writer() now implements the io.RawIOBase
  interface and behaves as a proper stream object.
* ZstdCompressor.stream_writer() now accepts a write_return_read
  argument to control whether write() returns the number of bytes read
  from the source. It defaults to False to preserve backwards
  compatibility.
* ZstdCompressionWriter now implements the io.RawIOBase interface and
  behaves as a proper stream object. close() will now close the stream
  and the underlying stream (if possible). __exit__ will now call
  close(). Methods like writable() and fileno() are implemented.
* ZstdDecompressionWriter no longer must be used as a context manager.
* ZstdCompressionWriter no longer must be used as a context manager.
  When not using as a context manager, it is important to call
  flush(FRAME_FRAME) or the compression stream won't be properly
  terminated and decoders may complain about malformed input.
* ZstdCompressionWriter.flush() (what is returned from
  ZstdCompressor.stream_writer()) now accepts an argument controlling the
  flush behavior. Its value can be one of the new constants
  FLUSH_BLOCK or FLUSH_FRAME.
* ZstdDecompressionObj instances now have a flush([length=None]) method.
  This provides parity with standard library equivalent types.
* CompressionParameters no longer redundantly store individual compression
  parameters on each instance. Instead, compression parameters are stored inside
  the underlying ZSTD_CCtx_params instance. Attributes for obtaining
  parameters are now properties rather than instance variables.
* Exposed the STRATEGY_BTULTRA2 constant.
* CompressionParameters instances now expose an overlap_log attribute.
  This behaves identically to the overlap_size_log attribute.
* CompressionParameters() now accepts an overlap_log argument that
  behaves identically to the overlap_size_log argument. An error will be
  raised if both arguments are specified.
* CompressionParameters instances now expose an ldm_hash_rate_log
  attribute. This behaves identically to the ldm_hash_every_log attribute.
* CompressionParameters() now accepts a ldm_hash_rate_log argument that
  behaves identically to the ldm_hash_every_log argument. An error will be
  raised if both arguments are specified.
* CompressionParameters() now accepts a strategy argument that behaves
  identically to the compression_strategy argument. An error will be raised
  if both arguments are specified.
* The MINMATCH_MIN and MINMATCH_MAX constants were added. They are
  semantically equivalent to the old SEARCHLENGTH_MIN and
  SEARCHLENGTH_MAX constants.
* Bundled zstandard library upgraded from 1.3.7 to 1.3.8.
* setup.py denotes support for Python 3.7 (Python 3.7 was supported and
  tested in the 0.10 release).
* zstd_cffi module has been renamed to zstandard.cffi.
* ZstdCompressor.stream_writer() now reuses a buffer in order to avoid
  allocating a new buffer for every operation. This should result in faster
  performance in cases where write() or flush() are being called
  frequently.
* Bundled zstandard library upgraded from 1.3.6 to 1.3.7.

diffstat:

 archivers/py-zstandard/Makefile             |   4 ++--
 archivers/py-zstandard/PLIST                |   8 ++++----
 archivers/py-zstandard/distinfo             |  12 ++++++------
 archivers/py-zstandard/patches/patch-zstd.c |  13 +++----------
 4 files changed, 15 insertions(+), 22 deletions(-)

diffs (80 lines):

diff -r 8dba02f91af2 -r cc1880dadc15 archivers/py-zstandard/Makefile
--- a/archivers/py-zstandard/Makefile   Mon Feb 25 23:37:38 2019 +0000
+++ b/archivers/py-zstandard/Makefile   Tue Feb 26 06:42:27 2019 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.8 2018/11/04 22:12:03 adam Exp $
+# $NetBSD: Makefile,v 1.9 2019/02/26 06:42:27 adam Exp $
 
-DISTNAME=      zstandard-0.10.2
+DISTNAME=      zstandard-0.11.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    archivers python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=z/zstandard/}
diff -r 8dba02f91af2 -r cc1880dadc15 archivers/py-zstandard/PLIST
--- a/archivers/py-zstandard/PLIST      Mon Feb 25 23:37:38 2019 +0000
+++ b/archivers/py-zstandard/PLIST      Tue Feb 26 06:42:27 2019 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2018/11/04 22:12:03 adam Exp $
+@comment $NetBSD: PLIST,v 1.5 2019/02/26 06:42:27 adam Exp $
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
 ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
@@ -8,7 +8,7 @@
 ${PYSITELIB}/zstandard/__init__.py
 ${PYSITELIB}/zstandard/__init__.pyc
 ${PYSITELIB}/zstandard/__init__.pyo
+${PYSITELIB}/zstandard/cffi.py
+${PYSITELIB}/zstandard/cffi.pyc
+${PYSITELIB}/zstandard/cffi.pyo
 ${PYSITELIB}/zstd.so
-${PYSITELIB}/zstd_cffi.py
-${PYSITELIB}/zstd_cffi.pyc
-${PYSITELIB}/zstd_cffi.pyo
diff -r 8dba02f91af2 -r cc1880dadc15 archivers/py-zstandard/distinfo
--- a/archivers/py-zstandard/distinfo   Mon Feb 25 23:37:38 2019 +0000
+++ b/archivers/py-zstandard/distinfo   Tue Feb 26 06:42:27 2019 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.8 2018/11/04 22:12:03 adam Exp $
+$NetBSD: distinfo,v 1.9 2019/02/26 06:42:27 adam Exp $
 
-SHA1 (zstandard-0.10.2.tar.gz) = 34927eb1c094a98ffcdbd7af995e4d7695d1a878
-RMD160 (zstandard-0.10.2.tar.gz) = c8f080cde62a0cb8c95d806a88868f9e535c9e8b
-SHA512 (zstandard-0.10.2.tar.gz) = 5bd2c618dfd7c5ee4f66bccd3b1fc74b96312ef3b14eff170b51d5609b3192ff93077fbf7b19f4eddc7180a76881c4ecd0180e78106b27776717ba727c43f3a3
-Size (zstandard-0.10.2.tar.gz) = 611644 bytes
-SHA1 (patch-zstd.c) = c884da8109768cc331c61fd3caa0b38b8d9c706e
+SHA1 (zstandard-0.11.0.tar.gz) = 05951ab7a967d8cff7e5dccd964e370496943388
+RMD160 (zstandard-0.11.0.tar.gz) = 2e3017be22389dd7bed9a5c9d78795e2eac914f5
+SHA512 (zstandard-0.11.0.tar.gz) = 96e6faa3c31fce59379e037e4e7789b91d1608703ad8540fc8fe3d249ec65670377f2c3233ff21d7ff90a1478ac1fbbd2e169fe2d798a6889a200d71540f75a7
+Size (zstandard-0.11.0.tar.gz) = 641440 bytes
+SHA1 (patch-zstd.c) = ee9e8d349759fcc0dd43bcd68fefdf3390feca6c
diff -r 8dba02f91af2 -r cc1880dadc15 archivers/py-zstandard/patches/patch-zstd.c
--- a/archivers/py-zstandard/patches/patch-zstd.c       Mon Feb 25 23:37:38 2019 +0000
+++ b/archivers/py-zstandard/patches/patch-zstd.c       Tue Feb 26 06:42:27 2019 +0000
@@ -1,24 +1,17 @@
-$NetBSD: patch-zstd.c,v 1.1 2018/10/22 15:32:01 adam Exp $
+$NetBSD: patch-zstd.c,v 1.2 2019/02/26 06:42:27 adam Exp $
 
 Allow newer zstd.
 
---- zstd.c.orig        2018-10-22 15:14:29.000000000 +0000
+--- zstd.c.orig        2019-02-26 00:17:23.000000000 +0000
 +++ zstd.c
 @@ -210,10 +210,6 @@ void zstd_module_init(PyObject* m) {
           We detect this mismatch here and refuse to load the module if this
           scenario is detected.
        */
--      if (ZSTD_VERSION_NUMBER != 10306 || ZSTD_versionNumber() != 10306) {
+-      if (ZSTD_VERSION_NUMBER != 10308 || ZSTD_versionNumber() != 10308) {
 -              PyErr_SetString(PyExc_ImportError, "zstd C API mismatch; Python bindings not compiled against expected zstd version");
 -              return;
 -      }
  
        bufferutil_module_init(m);
        compressionparams_module_init(m);
-@@ -341,4 +337,4 @@ int safe_pybytes_resize(PyObject** obj, 
-       *obj = tmp;
- 
-       return 0;
--}
-\ No newline at end of file
-+}



Home | Main Index | Thread Index | Old Index