Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: spec0 compat (python 3.14 compat, numpy 2 min, python 3.12 min)#3564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
ilan-gold wants to merge14 commits intozarr-developers:main
base:main
Choose a base branch
Loading
fromilan-gold:ig/spec0_py314

Conversation

@ilan-gold
Copy link
Contributor

@ilan-goldilan-gold commentedNov 1, 2025
edited
Loading

Sorry if someone already started this! I didn't see it in the repo and I was trying to play around with python 3.14 until I realized the feature I was interested in had actually been released in 3.13. So just pushing here if anyone wants to pick it up (or I can finish depending on the workload).

Fixes#3512

Some questions:

  1. I don't think cupy is 3.14 compat yet:Support Python 3.14 cupy/cupy#9346 but does this matter? Does zarr promise the same level of python support across devices
  2. Is there interest inuv-ifying the CI? Blockers?

Locally most tests pass, and the ones that don't looked a bit me-specific (for example, a numcodecs-related test though I had python 2.18 installed? Need to look into that).

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented indocs/user-guide/*.md
  • Changes documented as a new file inchanges/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@github-actionsgithub-actionsbot added the needs release notesAutomatically applied to PRs which haven't added release notes labelNov 1, 2025
@d-v-b
Copy link
Contributor

2. Is there interest inuv-ifying the CI? Blockers?

i'm ok with uv-fying things. we are using hatch for defining a local test matrix, but we don't have to use that in ci

ilan-gold reacted with thumbs up emoji

@ilan-gold
Copy link
ContributorAuthor

I tried removing thecovariant=True stuff in98404bd but got some strange errors, which I imagine have to do with my lack of knowledge of numpy dtype inheritance i.e., things like:

tests/test_metadata/test_v2.py:224:error:Argument"dtype"to"ArrayV2Metadata"hasincompatibletype"Int16";expected"ZDType[dtype[generic], generic | str | bytes]"  [arg-type]

would love to understand this! I will try to look into it soon

@joshmoore
Copy link
Member

As a side note, recently there was a request (@d-v-b, do you remember where?) of considering using the PSF versioning (https://devguide.python.org/versions/) rather than the SPEC. Just mentioning in case it has an impact on when we would decide to drop, etc.

@d-v-b
Copy link
Contributor

@joshmoore see also#3512

joshmoore reacted with thumbs up emoji

@ilan-goldilan-gold changed the titlechore: spec0 compat (python 3.14 compat, numpy 2 min)chore: spec0 compat (python 3.14 compat, numpy 2 min, python 3.12 min)Nov 3, 2025
@ilan-gold
Copy link
ContributorAuthor

I tried removing the covariant=True stuff in98404bd but got some strange errors

To clarify, the reason I find them strange is that the python docs make it seem like you can just get rid ofcovariant (and if you can't you're misusing it). Maybe I misunderstood. I'll try to look into it, but just figured I'd document my stopping point.

@d-v-b
Copy link
Contributor

d-v-b commentedNov 3, 2025
edited
Loading

based onthese docs, my feeling is that in the context ofZDType[A, B],A andB should be inferred ascontravariant covariant iffA andB only appear as return types of theZDType methods, which I'm pretty sure is the case? Since I needed to do that in 3.11 to make mypy happy.

@ilan-gold
Copy link
ContributorAuthor

iff A and B only appear as return types of the ZDType methods

I feel quite lost here - I would think similar but this seems to work (maybe I'm missing something) whereas the (more complicated)zarr-python one doesn't:

classBase1: ...classSubBase1(Base1): ...classSubSubBase1(SubBase1): ...classBase2: ...classSubBase2(Base2): ...classSubSubBase2(SubBase2): ...classF[T:Base1,S:Base2]: ...classFSub(F[SubBase1,SubBase2]): ...classFSubSub(F[SubSubBase1,SubSubBase2]): ...typeGType=Fg:GType=FSubSub()

So maybe I'm misunderstanding.

@ilan-gold
Copy link
ContributorAuthor

only appear as return types of the ZDType methods

Totally misunderstood this in our context, but I think I got it now! I madedtype_cls not dependent on the generic (I think)86095bb#diff-bb2825e8577e13fd91c0cab0696d2c2736686dc7995484285290b6bee5c4190aR73

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

needs release notesAutomatically applied to PRs which haven't added release notes

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

SPEC 0 minimum supported python version

3 participants

@ilan-gold@d-v-b@joshmoore

[8]ページ先頭

©2009-2025 Movatter.jp