home
·
contact
·
privacy
projects
/
plomtask
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
On cache emptying, also ._disappear() any objects held in it.
[plomtask]
/
plomtask
/
versioned_attributes.py
diff --git
a/plomtask/versioned_attributes.py
b/plomtask/versioned_attributes.py
index d3c364942e3d76edf0eb9618df8366866c603709..cbd1c8e348a9230b10176d55b4b6a490fe11ff33 100644
(file)
--- a/
plomtask/versioned_attributes.py
+++ b/
plomtask/versioned_attributes.py
@@
-19,6
+19,12
@@
class VersionedAttribute:
self.default = default
self.history: dict[str, str | float] = {}
self.default = default
self.history: dict[str, str | float] = {}
+ def __hash__(self) -> int:
+ history_tuples = tuple((k, v) for k, v in self.history.items())
+ hashable = (self.parent.id_, self.table_name, self.default,
+ history_tuples)
+ return hash(hashable)
+
@property
def _newest_timestamp(self) -> str:
"""Return most recent timestamp."""
@property
def _newest_timestamp(self) -> str:
"""Return most recent timestamp."""