statikk 0.1.22__tar.gz → 0.1.24__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {statikk-0.1.22 → statikk-0.1.24}/PKG-INFO +1 -1
  2. {statikk-0.1.22 → statikk-0.1.24}/src/statikk/engine.py +0 -1
  3. {statikk-0.1.22 → statikk-0.1.24}/src/statikk/models.py +8 -1
  4. {statikk-0.1.22 → statikk-0.1.24}/src/statikk.egg-info/PKG-INFO +1 -1
  5. {statikk-0.1.22 → statikk-0.1.24}/.coveragerc +0 -0
  6. {statikk-0.1.22 → statikk-0.1.24}/.gitignore +0 -0
  7. {statikk-0.1.22 → statikk-0.1.24}/.readthedocs.yml +0 -0
  8. {statikk-0.1.22 → statikk-0.1.24}/AUTHORS.rst +0 -0
  9. {statikk-0.1.22 → statikk-0.1.24}/CHANGELOG.rst +0 -0
  10. {statikk-0.1.22 → statikk-0.1.24}/CONTRIBUTING.rst +0 -0
  11. {statikk-0.1.22 → statikk-0.1.24}/LICENSE.txt +0 -0
  12. {statikk-0.1.22 → statikk-0.1.24}/README.rst +0 -0
  13. {statikk-0.1.22 → statikk-0.1.24}/assets/favicon.png +0 -0
  14. {statikk-0.1.22 → statikk-0.1.24}/assets/logo.png +0 -0
  15. {statikk-0.1.22 → statikk-0.1.24}/docs/Makefile +0 -0
  16. {statikk-0.1.22 → statikk-0.1.24}/docs/_static/.gitignore +0 -0
  17. {statikk-0.1.22 → statikk-0.1.24}/docs/authors.rst +0 -0
  18. {statikk-0.1.22 → statikk-0.1.24}/docs/changelog.rst +0 -0
  19. {statikk-0.1.22 → statikk-0.1.24}/docs/conf.py +0 -0
  20. {statikk-0.1.22 → statikk-0.1.24}/docs/contributing.rst +0 -0
  21. {statikk-0.1.22 → statikk-0.1.24}/docs/index.rst +0 -0
  22. {statikk-0.1.22 → statikk-0.1.24}/docs/license.rst +0 -0
  23. {statikk-0.1.22 → statikk-0.1.24}/docs/readme.rst +0 -0
  24. {statikk-0.1.22 → statikk-0.1.24}/docs/requirements.txt +0 -0
  25. {statikk-0.1.22 → statikk-0.1.24}/docs/usage.rst +0 -0
  26. {statikk-0.1.22 → statikk-0.1.24}/pyproject.toml +0 -0
  27. {statikk-0.1.22 → statikk-0.1.24}/setup.cfg +0 -0
  28. {statikk-0.1.22 → statikk-0.1.24}/setup.py +0 -0
  29. {statikk-0.1.22 → statikk-0.1.24}/src/statikk/__init__.py +0 -0
  30. {statikk-0.1.22 → statikk-0.1.24}/src/statikk/conditions.py +0 -0
  31. {statikk-0.1.22 → statikk-0.1.24}/src/statikk/expressions.py +0 -0
  32. {statikk-0.1.22 → statikk-0.1.24}/src/statikk/fields.py +0 -0
  33. {statikk-0.1.22 → statikk-0.1.24}/src/statikk/typing.py +0 -0
  34. {statikk-0.1.22 → statikk-0.1.24}/src/statikk.egg-info/SOURCES.txt +0 -0
  35. {statikk-0.1.22 → statikk-0.1.24}/src/statikk.egg-info/dependency_links.txt +0 -0
  36. {statikk-0.1.22 → statikk-0.1.24}/src/statikk.egg-info/not-zip-safe +0 -0
  37. {statikk-0.1.22 → statikk-0.1.24}/src/statikk.egg-info/requires.txt +0 -0
  38. {statikk-0.1.22 → statikk-0.1.24}/src/statikk.egg-info/top_level.txt +0 -0
  39. {statikk-0.1.22 → statikk-0.1.24}/tests/conftest.py +0 -0
  40. {statikk-0.1.22 → statikk-0.1.24}/tests/test_engine.py +0 -0
  41. {statikk-0.1.22 → statikk-0.1.24}/tests/test_expressions.py +0 -0
  42. {statikk-0.1.22 → statikk-0.1.24}/tests/test_models.py +0 -0
  43. {statikk-0.1.22 → statikk-0.1.24}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statikk
3
- Version: 0.1.22
3
+ Version: 0.1.24
4
4
  Summary: statikk is a single table application (STA) library for DynamoDb.
5
5
  Home-page: https://github.com/terinia/statikk
6
6
  Author: Balint Biro
@@ -519,7 +519,6 @@ class Table:
519
519
  continue
520
520
  if value is not None:
521
521
  setattr(item, key, value)
522
- item.model_rebuild(force=True)
523
522
  return item
524
523
 
525
524
  def _serialize_item(self, item: DatabaseModel):
@@ -61,6 +61,11 @@ class TreeStructureChange(BaseModel):
61
61
  timestamp: datetime = Field(default_factory=datetime.now)
62
62
 
63
63
 
64
+ class ChangeTrackerMixin:
65
+ def custom_hash(self) -> int:
66
+ return 0
67
+
68
+
64
69
  class TrackingMixin:
65
70
  _original_hash: int = Field(exclude=True)
66
71
 
@@ -137,12 +142,14 @@ class TrackingMixin:
137
142
  return tuple((self._make_hashable(k), self._make_hashable(v)) for k, v in sorted(value.items()))
138
143
  elif isinstance(value, BaseModel) and hasattr(value, "_recursive_hash"):
139
144
  return value._recursive_hash()
145
+ elif isinstance(value, ChangeTrackerMixin):
146
+ return value.custom_hash()
140
147
  else:
141
148
  try:
142
149
  return hash(value)
143
150
  except TypeError:
144
151
  logger.warning(
145
- f"{type(value)} is unhashable, tracking will not work. Consider implementing the TrackingMixin for this type."
152
+ f"{type(value)} is unhashable, tracking will be ignored for this item. Consider implementing the ChangeTrackerMixin for this type."
146
153
  )
147
154
  return None
148
155
  return value
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statikk
3
- Version: 0.1.22
3
+ Version: 0.1.24
4
4
  Summary: statikk is a single table application (STA) library for DynamoDb.
5
5
  Home-page: https://github.com/terinia/statikk
6
6
  Author: Balint Biro
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes