eventsourcing 9.4.0a6__tar.gz → 9.4.0a8__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.

Potentially problematic release.


This version of eventsourcing might be problematic. Click here for more details.

Files changed (26) hide show
  1. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/PKG-INFO +1 -1
  2. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/application.py +4 -17
  3. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/domain.py +355 -331
  4. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/persistence.py +18 -24
  5. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/popo.py +5 -1
  6. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/postgres.py +41 -33
  7. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/projection.py +22 -19
  8. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/sqlite.py +5 -1
  9. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/system.py +19 -11
  10. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/tests/application.py +57 -49
  11. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/tests/domain.py +8 -6
  12. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/tests/persistence.py +162 -143
  13. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/tests/postgres_utils.py +7 -8
  14. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/utils.py +15 -10
  15. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/pyproject.toml +2 -2
  16. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/AUTHORS +0 -0
  17. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/LICENSE +0 -0
  18. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/README.md +0 -0
  19. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/__init__.py +0 -0
  20. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/cipher.py +0 -0
  21. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/compressor.py +0 -0
  22. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/cryptography.py +0 -0
  23. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/dispatch.py +0 -0
  24. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/interface.py +0 -0
  25. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/py.typed +0 -0
  26. {eventsourcing-9.4.0a6 → eventsourcing-9.4.0a8}/eventsourcing/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: eventsourcing
3
- Version: 9.4.0a6
3
+ Version: 9.4.0a8
4
4
  Summary: Event sourcing in Python
5
5
  License: BSD 3-Clause
6
6
  Keywords: event sourcing,event store,domain driven design,domain-driven design,ddd,cqrs,cqs
@@ -19,8 +19,6 @@ from typing import (
19
19
  )
20
20
  from warnings import warn
21
21
 
22
- from typing_extensions import deprecated
23
-
24
22
  from eventsourcing.domain import (
25
23
  Aggregate,
26
24
  CanMutateProtocol,
@@ -45,7 +43,6 @@ from eventsourcing.persistence import (
45
43
  Notification,
46
44
  Recording,
47
45
  Tracking,
48
- TrackingRecorder,
49
46
  Transcoder,
50
47
  UUIDAsHex,
51
48
  )
@@ -97,10 +94,9 @@ class Cache(Generic[S, T]):
97
94
  return self.cache.pop(key)
98
95
  return self.cache[key]
99
96
 
100
- def put(self, key: S, value: T) -> T | None:
97
+ def put(self, key: S, value: T | None) -> None:
101
98
  if value is not None:
102
99
  self.cache[key] = value
103
- return None
104
100
 
105
101
 
106
102
  class LRUCache(Cache[S, T]):
@@ -155,7 +151,7 @@ class LRUCache(Cache[S, T]):
155
151
  return result
156
152
  raise KeyError
157
153
 
158
- def put(self, key: S, value: T) -> Any | None:
154
+ def put(self, key: S, value: T | None) -> Any | None:
159
155
  evicted_key = None
160
156
  evicted_value = None
161
157
  with self.lock:
@@ -692,9 +688,7 @@ class Application:
692
688
  _env.update(env)
693
689
  return Environment(name, _env)
694
690
 
695
- def construct_factory(
696
- self, env: Environment
697
- ) -> InfrastructureFactory[TrackingRecorder]:
691
+ def construct_factory(self, env: Environment) -> InfrastructureFactory:
698
692
  """
699
693
  Constructs an :class:`~eventsourcing.persistence.InfrastructureFactory`
700
694
  for use by the application.
@@ -905,14 +899,7 @@ class Application:
905
899
  TApplication = TypeVar("TApplication", bound=Application)
906
900
 
907
901
 
908
- @deprecated(
909
- "AggregateNotFound is deprecated, use AggregateNotFoundError instead", category=None
910
- )
911
- class AggregateNotFound(EventSourcingError): # noqa: N818
912
- pass
913
-
914
-
915
- class AggregateNotFoundError(AggregateNotFound):
902
+ class AggregateNotFoundError(EventSourcingError):
916
903
  """
917
904
  Raised when an :class:`~eventsourcing.domain.Aggregate`
918
905
  object is not found in a :class:`Repository`.