Thanks for the great library!
Just ran into an issue with instance checks on typing.py aliases.
def test_isinstance_proxy():
p = wrapt.ObjectProxy({1: 2})
assert isinstance(p, dict) # Passes just fine
assert isinstance(p, Dict) # Fails
This is due to GenericAlias / _BaseGenericAlias being implemented as:
def __instancecheck__(self, obj):
return self.__subclasscheck__(type(obj)) # Should be obj.__class__
I imagine this is a python bug? Is this something you have run into before?
Thanks for the great library!
Just ran into an issue with instance checks on typing.py aliases.
This is due to GenericAlias / _BaseGenericAlias being implemented as:
I imagine this is a python bug? Is this something you have run into before?