DatabaseWrapper no longer hashable-> failure in test_connections_thread_local
|Reported by:||vsajip||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The resolution of #17258 leads to a failure under Python 3.x because the SQLite DatabaseWrapper is no longer hashable. I noticed that the BaseDatabaseWrapper defines __eq__ but not __hash__ - does this not prevent its instances from being keys in dictionaries / members of sets?
If you add __hash__ = object.__hash__ in BaseDatabaseWrapper, then the problem should go away.
Change History (8)
comment:1 follow-up: ↓ 3 Changed 3 years ago by akaariai
- Cc anssi.kaariainen@… added
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:6 Changed 3 years ago by aaugustin
- Triage Stage changed from Unreviewed to Accepted
- Type changed from Uncategorized to Bug