Skip to content

Commit 3aa8e2f

Browse files
committed
Require zstandard version 0.9.0+
In `zstandard`'s `0.9.0` release, support for the Python Buffer Protocol was added. As we are supporting this functionality with other compressors, go ahead and support it here too.
1 parent d2a18ad commit 3aa8e2f

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

continuous_integration/environment-3.10.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies:
3939
- toolz
4040
- tornado
4141
- zict # overridden by git tip below
42-
- zstandard
42+
- zstandard >=0.9.0
4343
- pip:
4444
- git+https://github.com/dask/dask
4545
- git+https://github.com/dask/s3fs

continuous_integration/environment-3.8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dependencies:
4141
- toolz
4242
- tornado
4343
- zict
44-
- zstandard
44+
- zstandard >=0.9.0
4545
- pip:
4646
- git+https://github.com/dask/dask
4747
- git+https://github.com/jcrist/crick # Only tested here

continuous_integration/environment-3.9.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dependencies:
4444
- torchvision # Only tested here
4545
- tornado
4646
- zict
47-
- zstandard
47+
- zstandard >=0.9.0
4848
- pip:
4949
- git+https://github.com/dask/dask
5050
- keras

distributed/protocol/compression.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@
7777
with suppress(ImportError):
7878
import zstandard
7979

80+
# Required for Python Buffer Protocol support.
81+
if parse_version(zstandard.__version__) < parse_version("0.9.0"):
82+
raise ImportError("Need zstandard >= 0.9.0")
83+
8084
zstd_compressor = zstandard.ZstdCompressor(
8185
level=dask.config.get("distributed.comm.zstd.level"),
8286
threads=dask.config.get("distributed.comm.zstd.threads"),

0 commit comments

Comments
 (0)