Zstandard

Latest version: v0.22.0

Safety actively analyzes 613461 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

0.22.0

Backwards Compatibility Notes

* `ZstdDecompressor.decompressobj()` will change `read_across_frames` to
default to `True` in a future release. If you depend on the current
functionality of stopping at frame boundaries, start explicitly passing
`read_across_frames=False` to preserve the current behavior.
* `manylinux2010` wheels are no longer published since this wheel format
is no longer supported by the pypa/manylinux project.
* Removed CI coverage for PyPy 3.7 and 3.8, which are no longer supported
PyPy versions.
* Support for Python 3.7 has been dropped because it reached end of life.
Python 3.8 is the minimum supported Python version. The code should still be
compatible with Python 3.7 and removing of version checks from `setup.py`
will likely yield a working install. However, this is no officially supported.

Bug Fixes

* `ZstdDecompressor.decompress()` with `allow_extra_data=False` would
previously allow extra data to exist after an *empty* zstd frame (a frame
holding 0 length input). This scenario now raises an exception.

Changes

* `ZstdDecompressor.decompressobj()` now accepts a `read_across_frames`
boolean named argument to control whether to transparently read across
multiple zstd frames. It defaults to `False` to preserve existing
behavior.
* Added CI coverage for PyPy 3.10.
* Added CI coverage for newer Anaconda Python versions.
* Packages used in CI have been upgraded to latest versions. This should
nominally only impact developers of this project and not end-users.
* `pyproject.toml` now declares a `[build-system]` section saying to build
with setuptools.
* CI now builds wheels with pip instead of `setup.py` directly.
* Official support for CPython 3.12. Binary wheels for 3.12 are now published
during releases. There were no meaningful code changes to support Python 3.12.
* Binary wheels for musllinux_1_1 x86_64 and aarch64 are now being built and
published.

0.21.0

Backwards Compatibility Notes

* Support for Python 3.6 has been dropped. Python 3.7 is the minimum supported
Python version.

Changes

* Bundled zstd library upgraded from 1.5.4 to 1.5.5.
* PyO3 Rust crate upgraded from 0.15 to 0.18.
* CI environment changed from Ubuntu 20.04 -> 22.04, Windows 2019 -> 2022,
macOS 11 -> macOS 12.
* C types now use `PyType_Spec` and corresponding APIs. (187) Contributed by
Mike Hommey.

0.20.0

Backwards Compatibility Notes

* This will likely be the last release officially supporting Python 3.6.
Python 3.6 is end of life as of 2021-12-23.

Changes

* Bundled zstd library upgraded from 1.5.2 to 1.5.4.
* Use of the deprecated ``ZSTD_copyDCtx()`` was removed from the C and
Rust backends.

0.19.0

Bug Fixes
---------

* The C backend implementation of `ZstdDecompressionObj.decompress()` could
have raised an assertion in cases where the function was called multiple
times on an instance. In non-debug builds, calls to this method could have
leaked memory.

Changes
-------

* PyPy 3.6 support dropped; Pypy 3.8 and 3.9 support added.
* Anaconda 3.6 support dropped.
* Official support for Python 3.11. This did not require meaningful code changes
and previous release(s) likely worked with 3.11 without any changes.
* CFFI's build system now respects distutils's `compiler.preprocessor` if it
is set. (179)
* The internal logic of `ZstdDecompressionObj.decompress()` was refactored.
This may have fixed unconfirmed issues where ``unused_data`` was set
prematurely. The new logic will also avoid an extra call to
`ZSTD_decompressStream()` in some scenarios, possibly improving performance.
* `ZstdDecompressor.decompress()` how has a `read_across_frames` keyword
argument. It defaults to False. True is not yet implemented and will raise an
exception if used. The new argument will default to True in a future release
and is provided now so callers can start passing ``read_across_frames=False``
to preserve the existing functionality during a future upgrade.
* `ZstdDecompressor.decompress()` now has an `allow_extra_data` keyword
argument to control whether an exception is raised if input contains extra
data. It defaults to True, preserving existing behavior of ignoring extra
data. It will likely default to False in a future release. Callers desiring
the current behavior are encouraged to explicitly pass
`allow_extra_data=True` so behavior won't change during a future upgrade.

0.16.0

Backwards Compatibility Notes

* Support for Python 3.5 has been dropped. Python 3.6 is now the minimum required Python version.

Changes

* Bundled zstd library upgraded from 1.4.8 to 1.5.0.
* ``manylinux2014_aarch64`` wheels are now being produced for CPython 3.6+. (145).
* Wheels are now being produced for CPython 3.10.
* Arguments to ``ZstdCompressor()`` and ``ZstdDecompressor()`` are now all optional in the C backend and an explicit ``None`` value is accepted. Before, the C backend wouldn't accept an explicit ``None`` value (but the CFFI backend would). The new behavior should be consistent between the backends. (153)

0.15.2

Backwards Compatibility Notes

* ``ZstdCompressor.multi_compress_to_buffer()`` and
``ZstdDecompressor.multi_decompress_to_buffer()`` are no longer
available when linking against a system zstd library. These
experimental features are only available when building against the
bundled single file zstd C source file distribution. (106)

Changes

* ``setup.py`` now recognizes a ``ZSTD_EXTRA_COMPILER_ARGS``
environment variable to specify additional compiler arguments
to use when compiling the C backend.
* PyPy build and test coverage has been added to CI.
* Added CI jobs for building against external zstd library.
* Wheels supporting macOS ARM/M1 devices are now being produced.
* References to Python 2 have been removed from the in-repo Debian packaging
code.
* Significant work has been made on a Rust backend. It is currently feature
complete but not yet optimized. We are not yet shipping the backend as part
of the distributed wheels until it is more mature.
* The ``.pyi`` type annotations file has replaced various default argument
values with ``...``.

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.