Skip to content

Commit 9bf0d14

Browse files
authored
Merge branch 'main' into update-2874-release-note
2 parents a236e1b + 7154f98 commit 9bf0d14

13 files changed

Lines changed: 296 additions & 184 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ jobs:
2121
strategy:
2222
matrix:
2323
python-version: ['3.11', '3.12', '3.13']
24-
numpy-version: ['1.25', '2.2']
24+
numpy-version: ['1.26', '2.2']
2525
dependency-set: ["minimal", "optional"]
2626
os: ["ubuntu-latest"]
2727
include:
2828
- python-version: '3.11'
29-
numpy-version: '1.25'
29+
numpy-version: '1.26'
3030
dependency-set: 'optional'
3131
os: 'macos-latest'
3232
- python-version: '3.13'
3333
numpy-version: '2.2'
3434
dependency-set: 'optional'
3535
os: 'macos-latest'
3636
- python-version: '3.11'
37-
numpy-version: '1.25'
37+
numpy-version: '1.26'
3838
dependency-set: 'optional'
3939
os: 'windows-latest'
4040
- python-version: '3.13'

changes/3228.removal.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Removes default chunk encoding settings (filters, serializer, compressors) from the global
2+
configuration object.
3+
4+
This removal is justified on the basis that storing chunk encoding settings in the config required
5+
a brittle, confusing, and inaccurate categorization of array data types, which was particularly
6+
unsuitable after the recent addition of new data types that didn't fit naturally into the
7+
pre-existing categories.
8+
9+
The default chunk encoding is the same (Zstandard compression, and the required object codecs for
10+
variable length data types), but the chunk encoding is now generated by functions that cannot be
11+
reconfigured at runtime. Users who relied on setting the default chunk encoding via the global configuration object should
12+
instead specify the desired chunk encoding explicitly when creating an array.
13+
14+
This change also adds an extra validation step to the creation of Zarr V2 arrays, which ensures that
15+
arrays with a ``VariableLengthUTF8`` or ``VariableLengthBytes`` data type cannot be created without the
16+
correct "object codec".

changes/xxxx.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The minimum version of NumPy has increased to 1.26.

docs/user-guide/arrays.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -246,16 +246,6 @@ built-in delta filter::
246246
>>> z.compressors
247247
(LZMA(codec_name='numcodecs.lzma', codec_config={'filters': [{'id': 3, 'dist': 4}, {'id': 33, 'preset': 1}]}),)
248248

249-
The default compressor can be changed by setting the value of the using Zarr's
250-
:ref:`user-guide-config`, e.g.::
251-
252-
>>> with zarr.config.set({'array.v2_default_compressor.default': {'id': 'blosc'}}):
253-
... z = zarr.create_array(store={}, shape=(100000000,), chunks=(1000000,), dtype='int32', zarr_format=2)
254-
>>> z.filters
255-
()
256-
>>> z.compressors
257-
(Blosc(cname='lz4', clevel=5, shuffle=SHUFFLE, blocksize=0),)
258-
259249
To disable compression, set ``compressors=None`` when creating an array, e.g.::
260250

261251
>>> z = zarr.create_array(store='data/example-8.zarr', shape=(100000000,), chunks=(1000000,), dtype='int32', compressors=None)

docs/user-guide/config.rst

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,7 @@ This is the current default configuration::
4343

4444
>>> zarr.config.pprint()
4545
{'array': {'order': 'C',
46-
'v2_default_compressor': {'default': {'checksum': False,
47-
'id': 'zstd',
48-
'level': 0},
49-
'variable-length-string': {'checksum': False,
50-
'id': 'zstd',
51-
'level': 0}},
52-
'v2_default_filters': {'default': None,
53-
'variable-length-string': [{'id': 'vlen-utf8'}]},
54-
'v3_default_compressors': {'default': [{'configuration': {'checksum': False,
55-
'level': 0},
56-
'name': 'zstd'}],
57-
'variable-length-string': [{'configuration': {'checksum': False,
58-
'level': 0},
59-
'name': 'zstd'}]},
60-
'v3_default_filters': {'default': [], 'variable-length-string': []},
61-
'v3_default_serializer': {'default': {'configuration': {'endian': 'little'},
62-
'name': 'bytes'},
63-
'variable-length-string': {'name': 'vlen-utf8'}},
64-
'write_empty_chunks': False},
46+
'write_empty_chunks': False},
6547
'async': {'concurrency': 10, 'timeout': None},
6648
'buffer': 'zarr.buffer.cpu.Buffer',
6749
'codec_pipeline': {'batch_size': 1,

docs/user-guide/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Required dependencies include:
88

99
- `Python <https://docs.python.org/3/>`_ (3.11 or later)
1010
- `packaging <https://packaging.pypa.io>`_ (22.0 or later)
11-
- `numpy <https://numpy.org>`_ (1.25 or later)
11+
- `numpy <https://numpy.org>`_ (1.26 or later)
1212
- `numcodecs[crc32c] <https://numcodecs.readthedocs.io>`_ (0.14 or later)
1313
- `typing_extensions <https://typing-extensions.readthedocs.io>`_ (4.9 or later)
1414
- `donfig <https://donfig.readthedocs.io>`_ (0.8 or later)

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ requires-python = ">=3.11"
3333
# If you add a new dependency here, please also add it to .pre-commit-config.yml
3434
dependencies = [
3535
'packaging>=22.0',
36-
'numpy>=1.25',
36+
'numpy>=1.26',
3737
'numcodecs[crc32c]>=0.14',
3838
'typing_extensions>=4.9',
3939
'donfig>=0.8',
@@ -154,7 +154,7 @@ features = ["test"]
154154

155155
[[tool.hatch.envs.test.matrix]]
156156
python = ["3.11", "3.12", "3.13"]
157-
numpy = ["1.25", "2.2"]
157+
numpy = ["1.26", "2.2"]
158158
deps = ["minimal", "optional"]
159159

160160
[tool.hatch.envs.test.overrides]
@@ -190,7 +190,7 @@ features = ["test", "gpu"]
190190

191191
[[tool.hatch.envs.gputest.matrix]]
192192
python = ["3.11", "3.12", "3.13"]
193-
numpy = ["1.25", "2.2"]
193+
numpy = ["1.26", "2.2"]
194194
version = ["minimal"]
195195

196196
[tool.hatch.envs.gputest.scripts]
@@ -246,7 +246,7 @@ python = "3.11"
246246
dependencies = [
247247
'zarr[remote]',
248248
'packaging==22.*',
249-
'numpy==1.25.*',
249+
'numpy==1.26.*',
250250
'numcodecs==0.14.*', # 0.14 needed for zarr3 codecs
251251
'fsspec==2023.10.0',
252252
's3fs==2023.10.0',

0 commit comments

Comments
 (0)