Skip to content

Commit ed94877

Browse files
authored
Add Python 3.13, drop Python 3.10 (zarr-developers#2344)
* Add Python 3.13, drop Python 3.10 * Add some doctest skips * Clarify release note
1 parent ba1daa3 commit ed94877

File tree

7 files changed

+34
-36
lines changed

7 files changed

+34
-36
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ body:
2727
attributes:
2828
label: Python Version
2929
description: Version of Python interpreter
30-
placeholder: 3.10, 3.11, 3.12 etc.
30+
placeholder: 3.11, 3.12, 3.13 etc.
3131
validations:
3232
required: true
3333
- type: input

.github/workflows/python-package.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: ['3.10', '3.11', '3.12']
18+
python-version: ['3.11', '3.12', '3.13']
1919
numpy_version: ['>=2.1', '==1.24.*']
2020
exclude:
2121
- python-version: '3.12'
2222
numpy_version: '==1.24.*'
23+
- python-version: '3.13'
24+
numpy_version: '==1.24.*'
2325
services:
2426
redis:
2527
image: redis
@@ -50,7 +52,7 @@ jobs:
5052
- name: Create Conda environment with the rights deps
5153
shell: "bash -l {0}"
5254
run: |
53-
conda create -n zarr-env python==${{matrix.python-version}} bsddb3 pip nodejs
55+
conda create -n zarr-env python==${{matrix.python-version}} pip nodejs
5456
conda activate zarr-env
5557
npm install -g azurite
5658
- name: Install dependencies

.github/workflows/windows-testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: True
1818
matrix:
19-
python-version: ['3.10', '3.11']
19+
python-version: ['3.11', '3.12']
2020
steps:
2121
- uses: actions/checkout@v4
2222
with:

docs/release.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,17 @@ Release notes
2525

2626
Enhancements
2727
~~~~~~~~~~~~
28+
* Added testing on Python 3.13.
2829

2930
Maintenance
3031
~~~~~~~~~~~
32+
* Dropped support for Python 3.10.
33+
By :user:`David Stansby <dstansby>` (:issue:`2344`).
34+
* Removed testing for compatibility with the ``bsddb3`` package.
35+
``bsddb3`` was last released four years ago, and should still work with
36+
``zarr-python`` if you can install it, but to reduce our maintenance
37+
burden we will no longer run our compatibility tests for it.
38+
By :user:`David Stansby <dstansby>` (:issue:`2344`).
3139

3240
Deprecations
3341
~~~~~~~~~~~~
@@ -41,7 +49,7 @@ Enhancements
4149
~~~~~~~~~~~~
4250
* Added support for creating a copy of data when converting a `zarr.Array`
4351
to a numpy array.
44-
By :user:`David Stansby <dstansby>` (:issue:`2106`) and
52+
By :user:`David Stansby <dstansby>` (:issue:`2106`) and
4553
:user:`Joe Hamman <jhamman>` (:issue:`2123`).
4654

4755
Maintenance

docs/tutorial.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,8 @@ storing an array or group. Here is an example using a Berkeley DB B-tree
811811
database for storage (requires `bsddb3
812812
<https://www.jcea.es/programacion/pybsddb.htm>`_ to be installed)::
813813

814+
.. doctest-requires:: bsddb3
815+
814816
>>> import bsddb3
815817
>>> store = zarr.DBMStore('data/example.bdb', open=bsddb3.btopen)
816818
>>> root = zarr.group(store=store, overwrite=True)
@@ -1009,12 +1011,12 @@ class from ``fsspec``. The following example demonstrates how to access
10091011
a ZIP-archived Zarr group on s3 using `s3fs <https://s3fs.readthedocs.io/en/latest/>`_ and ``ZipFileSystem``:
10101012

10111013
>>> s3_path = "s3://path/to/my.zarr.zip"
1012-
>>>
1014+
>>>
10131015
>>> s3 = s3fs.S3FileSystem()
10141016
>>> f = s3.open(s3_path)
10151017
>>> fs = ZipFileSystem(f, mode="r")
10161018
>>> store = FSMap("", fs, check=False)
1017-
>>>
1019+
>>>
10181020
>>> # caching may improve performance when repeatedly reading the same data
10191021
>>> cache = zarr.storage.LRUStoreCache(store, max_size=2**28)
10201022
>>> z = zarr.group(store=cache)

pyproject.toml

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@ build-backend = "setuptools.build_meta"
77
name = "zarr"
88
description = "An implementation of chunked, compressed, N-dimensional arrays for Python"
99
readme = { file = "README.md", content-type = "text/markdown" }
10-
maintainers = [
11-
{ name = "Alistair Miles", email = "[email protected]" }
12-
]
13-
requires-python = ">=3.10"
10+
maintainers = [{ name = "Alistair Miles", email = "[email protected]" }]
11+
requires-python = ">=3.11"
1412
dependencies = [
1513
'asciitree',
1614
'numpy>=1.24',
1715
'fasteners; sys_platform != "emscripten"',
1816
'numcodecs>=0.10.0',
1917
]
20-
dynamic = [
21-
"version",
22-
]
18+
dynamic = ["version"]
2319
classifiers = [
2420
'Development Status :: 6 - Mature',
2521
'Intended Audience :: Developers',
@@ -30,18 +26,14 @@ classifiers = [
3026
'Topic :: Software Development :: Libraries :: Python Modules',
3127
'Operating System :: Unix',
3228
'Programming Language :: Python :: 3',
33-
'Programming Language :: Python :: 3.10',
3429
'Programming Language :: Python :: 3.11',
3530
'Programming Language :: Python :: 3.12',
31+
'Programming Language :: Python :: 3.13',
3632
]
3733
license = { text = "MIT" }
3834

3935
[project.optional-dependencies]
40-
jupyter = [
41-
'notebook',
42-
'ipytree>=0.2.2',
43-
'ipywidgets>=8.0.0',
44-
]
36+
jupyter = ['notebook', 'ipytree>=0.2.2', 'ipywidgets>=8.0.0']
4537
docs = [
4638
'sphinx',
4739
'sphinx-automodapi',
@@ -64,14 +56,11 @@ Homepage = "https://github.com/zarr-developers/zarr-python"
6456
exclude_lines = [
6557
"pragma: no cover",
6658
"pragma: ${PY_MAJOR_VERSION} no cover",
67-
'.*\.\.\.' # Ignore "..." lines
59+
'.*\.\.\.', # Ignore "..." lines
6860
]
6961

7062
[tool.coverage.run]
71-
omit = [
72-
"zarr/meta_v1.py",
73-
"bench/compress_normal.py",
74-
]
63+
omit = ["zarr/meta_v1.py", "bench/compress_normal.py"]
7564

7665
[tool.setuptools]
7766
packages = ["zarr", "zarr._storage", "zarr.tests"]
@@ -100,14 +89,12 @@ exclude = [
10089
"build",
10190
"dist",
10291
"venv",
103-
"docs"
92+
"docs",
10493
]
10594

10695
[tool.ruff.lint]
107-
extend-select = [
108-
"B"
109-
]
110-
ignore = ["B905"] # zip-without-explicit-strict
96+
extend-select = ["B"]
97+
ignore = ["B905"] # zip-without-explicit-strict
11198

11299
[tool.black]
113100
line-length = 100
@@ -136,19 +123,17 @@ doctest_optionflags = [
136123
"ELLIPSIS",
137124
"IGNORE_EXCEPTION_DETAIL",
138125
]
139-
addopts = [
140-
"--durations=10",
141-
]
126+
addopts = ["--durations=10"]
142127
filterwarnings = [
143128
"error:::zarr.*",
144129
"ignore:PY_SSIZE_T_CLEAN will be required.*:DeprecationWarning",
145130
"ignore:The loop argument is deprecated since Python 3.8.*:DeprecationWarning",
146131
"ignore:The .* is deprecated and will be removed in a Zarr-Python version 3*:FutureWarning",
147132
"ignore:The experimental Zarr V3 implementation in this version .*:FutureWarning",
148133
]
149-
doctest_subpackage_requires =[
134+
doctest_subpackage_requires = [
150135
"zarr/core.py = numpy>=2",
151-
"zarr/creation.py = numpy>=2"
136+
"zarr/creation.py = numpy>=2",
152137
]
153138

154139

zarr/storage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,6 @@ class NestedDirectoryStore(DirectoryStore):
16861686
def __init__(
16871687
self, path, normalize_keys=False, dimension_separator: Optional[DIMENSION_SEPARATOR] = "/"
16881688
):
1689-
16901689
warnings.warn(
16911690
V3_DEPRECATION_MESSAGE.format(store=self.__class__.__name__),
16921691
FutureWarning,
@@ -2070,6 +2069,8 @@ class DBMStore(Store):
20702069
<https://www.jcea.es/programacion/pybsddb.htm>`_ package is installed, a
20712070
Berkeley DB database can be used::
20722071
2072+
.. doctest-requires:: bsddb3
2073+
20732074
>>> import bsddb3
20742075
>>> store = zarr.DBMStore('data/array.bdb', open=bsddb3.btopen)
20752076
>>> z = zarr.zeros((10, 10), chunks=(5, 5), store=store, overwrite=True)

0 commit comments

Comments
 (0)