In Python 3, the data model was changed to not provide a __hash__ method if __eq__ is overriden in a class. PartialDate defines __eq__ but not __hash__ and is thus unhashable. To quote the docs,
A class that overrides __eq__() and does not define __hash__() will have its __hash__() implicitly set to None. When the __hash__() method of a class is None, instances of the class will raise an appropriate TypeError when a program attempts to retrieve their hash value, and will also be correctly identified as unhashable when checking isinstance(obj, collections.abc.Hashable).
In Python 3, the data model was changed to not provide a
__hash__
method if__eq__
is overriden in a class. PartialDate defines__eq__
but not__hash__
and is thus unhashable. To quote the docs,(from https://docs.python.org/3.7/reference/datamodel.html#object.__hash__)
We store PartialDate's in a set in SIR so it would be nice to make it hashable.