Skip to content
New issue

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

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Un-pin typeguard #421

Closed
dhirschfeld opened this issue May 19, 2024 · 4 comments
Closed

Un-pin typeguard #421

dhirschfeld opened this issue May 19, 2024 · 4 comments
Labels
question User queries

Comments

@dhirschfeld
Copy link

dhirschfeld commented May 19, 2024

dependencies = ["jax>=0.4.23", "jaxtyping>=0.2.24", "typing_extensions>=4.5.0", "typeguard==2.13.3", "equinox>=0.11.2", "lineax>=0.0.5", "optimistix>=0.0.7"]

Why is typeguard pinned to an exact version, especially one that is so old?

It's generally considered very bad packaging practice to pin to exact versions as it's ~never required and prevents getting even security patches without publishing a new release.

Also, it's ancient and won't be getting any updates - current HEAD is 4.2.1:

image

image

Originally posted by @dhirschfeld in #364 (comment)

@patrick-kidger
Copy link
Owner

patrick-kidger commented May 19, 2024

This is intentional. You'll notice jaxtyping is also pinned to the same version.

See threads like patrick-kidger/jaxtyping#124 (comment) and agronholm/typeguard#353. The quick summary is that later versions of typeguard seem to do things that are incompatible with jaxtyping etc. FWIW typeguard v2.13.3 seems to have worked robustly in all use-cases I've had for it.

@patrick-kidger patrick-kidger added the question User queries label May 19, 2024
@dhirschfeld
Copy link
Author

Thanks for the explanation! And the references ❤️

Hopefully the issue can eventually be resolved upstream...

@aowenson-imm
Copy link

A solution is possible: #579

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question User queries
Projects
None yet
Development

No branches or pull requests

3 participants