Skip to content

Require zarr>=3 on Python >= 3.11 to fix numcodecs 0.16 clash#289

Merged
JoOkuma merged 1 commit intoroyerlab:mainfrom
JoOkuma:fix/zarr-py311-dep
May 1, 2026
Merged

Require zarr>=3 on Python >= 3.11 to fix numcodecs 0.16 clash#289
JoOkuma merged 1 commit intoroyerlab:mainfrom
JoOkuma:fix/zarr-py311-dep

Conversation

@JoOkuma
Copy link
Copy Markdown
Member

@JoOkuma JoOkuma commented May 1, 2026

On Python 3.11+ the resolver freely picks zarr==2.18.x together with numcodecs>=0.16. Newer numcodecs dropped cbuffer_sizes/cbuffer_metainfo, which zarr 2.x's util.py imports at module load — so import zarr (e.g. via geff_spec) ImportErrors and CI tests are cancelled. End users hit the same bug with pip install on Py3.11.

On Py3.10 the resolver is forced to numcodecs<=0.13 (newer numcodecs requires Py>=3.11), so the broken pair is unreachable and zarr 2.18 keeps working there.

Marker-gated lower bound on zarr that only constrains the affected Python versions. Our code already imports zarr v3 APIs (from zarr.storage import StoreLike), so this just makes explicit what we already require.

zarr 2.x's util.py imports cbuffer_sizes/cbuffer_metainfo from
numcodecs.blosc at module load. numcodecs >= 0.16 dropped those
symbols. On Python 3.11+ the resolver freely picks zarr 2.18.x with
numcodecs >= 0.16, so any 'import zarr' (e.g. via geff_spec) raises
ImportError and tests are cancelled.

On Python 3.10 the resolver is forced to numcodecs <= 0.13.1 anyway
(numcodecs >= 0.14 requires Python >= 3.11), so the broken pair is
unreachable and zarr 2.18 keeps working there.

tracksdata's code already uses zarr v3 APIs at runtime
('from zarr.storage import StoreLike') so the constraint just makes
explicit what we already require.
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.70%. Comparing base (d657351) to head (756fc38).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #289   +/-   ##
=======================================
  Coverage   87.70%   87.70%           
=======================================
  Files          57       57           
  Lines        4879     4879           
  Branches      858      858           
=======================================
  Hits         4279     4279           
  Misses        378      378           
  Partials      222      222           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JoOkuma JoOkuma merged commit 6227efc into royerlab:main May 1, 2026
7 checks passed
@JoOkuma JoOkuma deleted the fix/zarr-py311-dep branch May 1, 2026 17:49
TeunHuijben pushed a commit to TeunHuijben/tracksdata that referenced this pull request May 1, 2026
…rlab#289)

zarr 2.x's util.py imports cbuffer_sizes/cbuffer_metainfo from
numcodecs.blosc at module load. numcodecs >= 0.16 dropped those
symbols. On Python 3.11+ the resolver freely picks zarr 2.18.x with
numcodecs >= 0.16, so any 'import zarr' (e.g. via geff_spec) raises
ImportError and tests are cancelled.

On Python 3.10 the resolver is forced to numcodecs <= 0.13.1 anyway
(numcodecs >= 0.14 requires Python >= 3.11), so the broken pair is
unreachable and zarr 2.18 keeps working there.

tracksdata's code already uses zarr v3 APIs at runtime
('from zarr.storage import StoreLike') so the constraint just makes
explicit what we already require.
TeunHuijben added a commit that referenced this pull request May 1, 2026
* block _root signals while updating the view

* save signal state in remove_node in case signal deconnects (would only happen in rare multithreading case)

* precomit fixes

* stop black and ruff from fighting

* Require zarr>=3 on Python >= 3.11 to avoid numcodecs 0.16 clash (#289)

zarr 2.x's util.py imports cbuffer_sizes/cbuffer_metainfo from
numcodecs.blosc at module load. numcodecs >= 0.16 dropped those
symbols. On Python 3.11+ the resolver freely picks zarr 2.18.x with
numcodecs >= 0.16, so any 'import zarr' (e.g. via geff_spec) raises
ImportError and tests are cancelled.

On Python 3.10 the resolver is forced to numcodecs <= 0.13.1 anyway
(numcodecs >= 0.14 requires Python >= 3.11), so the broken pair is
unreachable and zarr 2.18 keeps working there.

tracksdata's code already uses zarr v3 APIs at runtime
('from zarr.storage import StoreLike') so the constraint just makes
explicit what we already require.

* Update src/tracksdata/graph/_test/test_graph_view_signals.py

Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>

* Update src/tracksdata/graph/_test/test_graph_view_signals.py

Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>

* Update src/tracksdata/graph/_test/test_graph_view_signals.py

Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>

---------

Co-authored-by: Jordão Bragantini <jordao.bragantini@czbiohub.org>
Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>
TeunHuijben added a commit to TeunHuijben/tracksdata that referenced this pull request May 1, 2026
* block _root signals while updating the view

* save signal state in remove_node in case signal deconnects (would only happen in rare multithreading case)

* precomit fixes

* stop black and ruff from fighting

* Require zarr>=3 on Python >= 3.11 to avoid numcodecs 0.16 clash (royerlab#289)

zarr 2.x's util.py imports cbuffer_sizes/cbuffer_metainfo from
numcodecs.blosc at module load. numcodecs >= 0.16 dropped those
symbols. On Python 3.11+ the resolver freely picks zarr 2.18.x with
numcodecs >= 0.16, so any 'import zarr' (e.g. via geff_spec) raises
ImportError and tests are cancelled.

On Python 3.10 the resolver is forced to numcodecs <= 0.13.1 anyway
(numcodecs >= 0.14 requires Python >= 3.11), so the broken pair is
unreachable and zarr 2.18 keeps working there.

tracksdata's code already uses zarr v3 APIs at runtime
('from zarr.storage import StoreLike') so the constraint just makes
explicit what we already require.

* Update src/tracksdata/graph/_test/test_graph_view_signals.py

Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>

* Update src/tracksdata/graph/_test/test_graph_view_signals.py

Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>

* Update src/tracksdata/graph/_test/test_graph_view_signals.py

Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>

---------

Co-authored-by: Jordão Bragantini <jordao.bragantini@czbiohub.org>
Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants