phantom-types
phantom-types copied to clipboard
typeguard 4.3.0 breaks sized types
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'.
Reported some details of the issue back on the typeguard repository: https://github.com/agronholm/typeguard/issues/465#issuecomment-2351651934.