Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requirement on typeguard 2.* is too strict #80

Closed
jamescooke opened this issue May 26, 2023 · 3 comments · Fixed by #81
Closed

Requirement on typeguard 2.* is too strict #80

jamescooke opened this issue May 26, 2023 · 3 comments · Fixed by #81

Comments

@jamescooke
Copy link

Current behaviour

Current requirement for typeguard is:

typeguard ~= 2.0

However, this release identifier prevents any newer 3.* or 4.* versions of typeguard from being installed into the same environment and makes it hard to use asphalt with other packages that require newer typeguard versions. (typeguard==3.0.0 was release in March 2023 https://pypi.org/project/typeguard/3.0.0/ and version 4 is available.)

Expected behaviour

Please could the pyproject.toml here:

"typeguard ~= 2.0",
be changed to something like typeguard >= 2.0 ? If there are particular uses of typeguard that require the <3.0 API, then those would need to be upgraded.

This would allow for packages using newer versions of typeguard to be installed into environments along with asphalt, which is currently not possible.

See also conversation on jupyter/jupyter_core#353 (comment) 👈🏻 in which the suggestion was made to try Jupyverse which in turn uses asphalt.

@agronholm
Copy link
Member

I hadn't done anything about this because the function used in Asphalt (check_argument_types()) is gone in v3.0 and later, replaced by better alternatives. My WIP 5.0 code already did away with the typeguard dependency altogether, but I was thinking of using Pydantic 2.0 as a more suitable alternative, as it would allow for more sophisticated validation and documentation of configuration. I understand why you're asking for this, but if I am to do anything about this in Asphalt 4, it would most likely be to remove any uses of typeguard altogether.

agronholm added a commit that referenced this issue May 26, 2023
@agronholm
Copy link
Member

If you can thumbs up the linked PR, I can merge it and get a release out soon.

agronholm added a commit that referenced this issue May 26, 2023
@agronholm
Copy link
Member

I've released v4.12.0 which does away with the typeguard dependency.

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 a pull request may close this issue.

2 participants