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

typing_extensions 4.6.0 breaks phantom types #277

Closed
diabolo-dan opened this issue May 23, 2023 · 4 comments
Closed

typing_extensions 4.6.0 breaks phantom types #277

diabolo-dan opened this issue May 23, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@diabolo-dan
Copy link

    from phantom.predicates import numeric
  File "/usr/local/lib/python3.10/site-packages/phantom/predicates/numeric.py", line 3, in <module>
    from phantom._utils.types import SupportsGe
  File "/usr/local/lib/python3.10/site-packages/phantom/_utils/types.py", line 18, in <module>
    class SupportsLt(
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

Seeing this error with the new version of typing_extensions, which was released this morning (4.6.0). Seems like there are some changes incompatible with the assumptions phantom-types is making.

@antonagestam
Copy link
Owner

Thank you for reporting this, I'll try to look into this soon, but I'm a bit thin on bandwidth at the moment.

@antonagestam antonagestam added the bug Something isn't working label May 23, 2023
@antonagestam
Copy link
Owner

I failed reproducing this and couldn't figure out why. Turns out this is already "accidentally" fixed on main 😅

@antonagestam
Copy link
Owner

I just published 2.0.0 with the fix.

@diabolo-dan
Copy link
Author

Thanks for looking into this quickly

(And thanks also for maintaining the package. It's very useful).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants