Hello there!
I have upgraded to 17.1.0 and aparently it breaks down on asdict convertion.
I've got this utility validator optional_instance_of that ends up raising a
return hash(_attrs_to_tuple(self, attrs))
TypeError: unhashable type: '_OptionalValidator'
Here's a sample to trigger that behavior:
import attr
def optional_instance_of(of):
return attr.validators.optional(attr.validators.instance_of(of))
@attr.s()
class A:
a = attr.ib(default=None, validator=optional_instance_of(int))
a = A()
print(attr.asdict(a, filter=attr.filters.exclude(type(None))))
Is this related to #142 ?
Hello there!
I have upgraded to 17.1.0 and aparently it breaks down on asdict convertion.
I've got this utility validator
optional_instance_ofthat ends up raising aHere's a sample to trigger that behavior:
Is this related to #142 ?