Skip to content

Commit e1b71a3

Browse files
madsbkjakirkham
andauthored
Bump minimum NumPy version to 1.20 (#988)
* Bump minimum NumPy version to 1.20 * NumPy 1.20 support Python3.9 * mypy: added a "type: ignore" Co-authored-by: jakirkham <[email protected]>
1 parent 6d9b409 commit e1b71a3

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

.github/workflows/python-package.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ jobs:
1616
strategy:
1717
matrix:
1818
python-version: ['3.7', '3.8', '3.9', '3.10']
19-
numpy_version: ['!=1.21.0', '==1.17.*']
19+
numpy_version: ['>=1.22.0', '==1.20.*']
2020
exclude:
21-
- python-version: 3.9
22-
numpy_version: '==1.17.*'
2321
- python-version: '3.10'
24-
numpy_version: '==1.17.*'
22+
numpy_version: '==1.20.*'
2523
services:
2624
redis:
2725
image: redis
@@ -39,7 +37,7 @@ jobs:
3937
- 27017:27017
4038
steps:
4139
- uses: actions/checkout@v2
42-
with:
40+
with:
4341
fetch-depth: 0
4442
- name: Setup Miniconda
4543
uses: conda-incubator/setup-miniconda@master
@@ -66,7 +64,7 @@ jobs:
6664
python -m pip freeze
6765
- name: Tests
6866
shell: "bash -l {0}"
69-
env:
67+
env:
7068
COVERAGE_FILE: .coverage.${{matrix.python-version}}.${{matrix.numpy_version}}
7169
ZARR_TEST_ABS: 1
7270
ZARR_TEST_MONGO: 1
@@ -92,4 +90,4 @@ jobs:
9290
flake8 zarr
9391
mypy zarr
9492
95-
93+

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py37-npy{117,latest}, py38, py39, docs
7+
envlist = py37-npy{120,latest}, py38, py39, docs
88

99
[testenv]
1010
install_command = pip install --no-binary=numcodecs {opts} {packages}
@@ -21,7 +21,7 @@ commands =
2121
# main unit test runner
2222
py{38,39}: pytest -v --cov=zarr --cov-config=.coveragerc zarr
2323
# don't collect coverage when running older numpy versions
24-
py37-npy117: pytest -v zarr
24+
py37-npy120: pytest -v zarr
2525
# collect coverage and run doctests under py37
2626
py37-npylatest: pytest -v --cov=zarr --cov-config=.coveragerc --doctest-plus zarr --remote-data
2727
# generate a coverage report
@@ -33,7 +33,7 @@ commands =
3333
# print environment for debugging
3434
pip freeze
3535
deps =
36-
py37-npy117: numpy==1.17.*
36+
py37-npy120: numpy==1.20.*
3737
py37-npylatest,py38: -rrequirements_dev_numpy.txt
3838
-rrequirements_dev_minimal.txt
3939
-rrequirements_dev_optional.txt

zarr/meta.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ def decode_fill_value(
237237
return np.array(v, dtype=dtype)[()]
238238
elif dtype.kind in "c":
239239
v = (
240-
cls.decode_fill_value(v[0], dtype.type().real.dtype),
241-
cls.decode_fill_value(v[1], dtype.type().imag.dtype),
240+
cls.decode_fill_value(v[0], dtype.type().real.dtype), # type: ignore
241+
cls.decode_fill_value(v[1], dtype.type().imag.dtype), # type: ignore
242242
)
243243
v = v[0] + 1j * v[1]
244244
return np.array(v, dtype=dtype)[()]

0 commit comments

Comments
 (0)