eventsourcing 9.4.0a7__py3-none-any.whl → 9.4.0a8__py3-none-any.whl
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.
- eventsourcing/application.py +3 -7
- eventsourcing/domain.py +346 -357
- eventsourcing/persistence.py +18 -24
- eventsourcing/popo.py +5 -1
- eventsourcing/postgres.py +41 -33
- eventsourcing/projection.py +22 -19
- eventsourcing/sqlite.py +5 -1
- eventsourcing/system.py +19 -11
- eventsourcing/tests/application.py +57 -49
- eventsourcing/tests/domain.py +8 -6
- eventsourcing/tests/persistence.py +162 -143
- eventsourcing/tests/postgres_utils.py +7 -8
- eventsourcing/utils.py +15 -10
- {eventsourcing-9.4.0a7.dist-info → eventsourcing-9.4.0a8.dist-info}/METADATA +1 -1
- eventsourcing-9.4.0a8.dist-info/RECORD +26 -0
- eventsourcing-9.4.0a7.dist-info/RECORD +0 -26
- {eventsourcing-9.4.0a7.dist-info → eventsourcing-9.4.0a8.dist-info}/AUTHORS +0 -0
- {eventsourcing-9.4.0a7.dist-info → eventsourcing-9.4.0a8.dist-info}/LICENSE +0 -0
- {eventsourcing-9.4.0a7.dist-info → eventsourcing-9.4.0a8.dist-info}/WHEEL +0 -0
eventsourcing/application.py
CHANGED
|
@@ -43,7 +43,6 @@ from eventsourcing.persistence import (
|
|
|
43
43
|
Notification,
|
|
44
44
|
Recording,
|
|
45
45
|
Tracking,
|
|
46
|
-
TrackingRecorder,
|
|
47
46
|
Transcoder,
|
|
48
47
|
UUIDAsHex,
|
|
49
48
|
)
|
|
@@ -95,10 +94,9 @@ class Cache(Generic[S, T]):
|
|
|
95
94
|
return self.cache.pop(key)
|
|
96
95
|
return self.cache[key]
|
|
97
96
|
|
|
98
|
-
def put(self, key: S, value: T) ->
|
|
97
|
+
def put(self, key: S, value: T | None) -> None:
|
|
99
98
|
if value is not None:
|
|
100
99
|
self.cache[key] = value
|
|
101
|
-
return None
|
|
102
100
|
|
|
103
101
|
|
|
104
102
|
class LRUCache(Cache[S, T]):
|
|
@@ -153,7 +151,7 @@ class LRUCache(Cache[S, T]):
|
|
|
153
151
|
return result
|
|
154
152
|
raise KeyError
|
|
155
153
|
|
|
156
|
-
def put(self, key: S, value: T) -> Any | None:
|
|
154
|
+
def put(self, key: S, value: T | None) -> Any | None:
|
|
157
155
|
evicted_key = None
|
|
158
156
|
evicted_value = None
|
|
159
157
|
with self.lock:
|
|
@@ -690,9 +688,7 @@ class Application:
|
|
|
690
688
|
_env.update(env)
|
|
691
689
|
return Environment(name, _env)
|
|
692
690
|
|
|
693
|
-
def construct_factory(
|
|
694
|
-
self, env: Environment
|
|
695
|
-
) -> InfrastructureFactory[TrackingRecorder]:
|
|
691
|
+
def construct_factory(self, env: Environment) -> InfrastructureFactory:
|
|
696
692
|
"""
|
|
697
693
|
Constructs an :class:`~eventsourcing.persistence.InfrastructureFactory`
|
|
698
694
|
for use by the application.
|