You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#16550
Improve hashability detection for attrs classes.
I added a new parameter to `add_attribute_to_class`,
`overwrite_existing`, since I needed it.
Frozen classes remain hashable, non-frozen default to no. This can be
overriden by passing in `hash=True` or `unsafe_hash=True` (new
parameter, added to stubs) to `define()`.
Inheritance-wise I think we're correct, if a non-hashable class inherits
from a hashable one, it's still unhashable at runtime.
Accompanying tests.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
0 commit comments