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

typeguard 4.3.0 breaks sized types #299

Open
antonagestam opened this issue Sep 15, 2024 · 1 comment
Open

typeguard 4.3.0 breaks sized types #299

antonagestam opened this issue Sep 15, 2024 · 1 comment

Comments

@antonagestam
Copy link
Owner

This passes on typeguard 4.2.1, but breaks on 4.3.0.

from phantom.sized import SizedIterable
from phantom.predicates.generic import of_complex_type
assert of_complex_type(SizedIterable)(()), 'unexpectedly not of type'

Work-around at the moment is to pin 'typeguard<4.3.0'.

@antonagestam
Copy link
Owner Author

Reported some details of the issue back on the typeguard repository: agronholm/typeguard#465 (comment).

antonagestam added a commit that referenced this issue Sep 15, 2024
typeguard 4.3.0 introduced refined support for protocol type checking,
unfortunately this breaks some existing usages in phantom-types, which
in turn breaks sized types. As there's seemingly no trivial way to work
around the issue, this commit pins typeguard at 4.3.0 until there is a
fix upstream.

#299
antonagestam added a commit that referenced this issue Sep 15, 2024
typeguard 4.3.0 introduced refined support for protocol type checking,
unfortunately this breaks some existing usages in phantom-types, which
in turn breaks sized types. As there's seemingly no trivial way to work
around the issue, this commit pins typeguard at 4.3.0 until there is a
fix upstream.

#299
antonagestam added a commit that referenced this issue Sep 15, 2024
typeguard 4.3.0 introduced refined support for protocol type checking,
unfortunately this breaks some existing usages in phantom-types, which
in turn breaks sized types. As there's seemingly no trivial way to work
around the issue, this commit pins typeguard at 4.3.0 until there is a
fix upstream.

#299
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

No branches or pull requests

1 participant