eventsourcing 9.4.0a4__tar.gz → 9.4.0a5__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.0a4 → eventsourcing-9.4.0a5}/PKG-INFO +3 -3
  2. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/projection.py +9 -9
  3. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/pyproject.toml +1 -1
  4. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/AUTHORS +0 -0
  5. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/LICENSE +0 -0
  6. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/README.md +0 -0
  7. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/__init__.py +0 -0
  8. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/application.py +0 -0
  9. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/cipher.py +0 -0
  10. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/compressor.py +0 -0
  11. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/cryptography.py +0 -0
  12. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/dispatch.py +0 -0
  13. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/domain.py +0 -0
  14. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/interface.py +0 -0
  15. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/persistence.py +0 -0
  16. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/popo.py +0 -0
  17. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/postgres.py +0 -0
  18. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/py.typed +0 -0
  19. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/sqlite.py +0 -0
  20. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/system.py +0 -0
  21. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/tests/__init__.py +0 -0
  22. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/tests/application.py +0 -0
  23. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/tests/domain.py +0 -0
  24. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/tests/persistence.py +0 -0
  25. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/tests/postgres_utils.py +0 -0
  26. {eventsourcing-9.4.0a4 → eventsourcing-9.4.0a5}/eventsourcing/utils.py +0 -0
@@ -1,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: eventsourcing
3
- Version: 9.4.0a4
3
+ Version: 9.4.0a5
4
4
  Summary: Event sourcing in Python
5
- Home-page: https://github.com/pyeventsourcing/eventsourcing
6
5
  License: BSD 3-Clause
7
6
  Keywords: event sourcing,event store,domain driven design,domain-driven design,ddd,cqrs,cqs
8
7
  Author: John Bywater
@@ -32,6 +31,7 @@ Requires-Dist: cryptography (>=44.0,<44.1) ; extra == "cryptography"
32
31
  Requires-Dist: psycopg[pool] (<=3.2.99999) ; extra == "postgres"
33
32
  Requires-Dist: pycryptodome (>=3.22,<3.23) ; extra == "crypto"
34
33
  Requires-Dist: typing_extensions
34
+ Project-URL: Homepage, https://github.com/pyeventsourcing/eventsourcing
35
35
  Project-URL: Repository, https://github.com/pyeventsourcing/eventsourcing
36
36
  Description-Content-Type: text/markdown
37
37
 
@@ -134,14 +134,14 @@ class ProjectionRunner(Generic[TApplication, TTrackingRecorder]):
134
134
  gt=self.tracking_recorder.max_tracking_id(self.app.name),
135
135
  topics=self.projection.topics,
136
136
  )
137
- self._has_error = Event()
137
+ self._is_stopping = Event()
138
138
  self.thread_error: BaseException | None = None
139
139
  self.processing_thread = Thread(
140
140
  target=self._process_events_loop,
141
141
  kwargs={
142
142
  "subscription": self.subscription,
143
143
  "projection": self.projection,
144
- "has_error": self._has_error,
144
+ "is_stopping": self._is_stopping,
145
145
  "runner": weakref.ref(self),
146
146
  },
147
147
  )
@@ -158,13 +158,14 @@ class ProjectionRunner(Generic[TApplication, TTrackingRecorder]):
158
158
  return Environment(name, _env)
159
159
 
160
160
  def stop(self) -> None:
161
+ self._is_stopping.set()
161
162
  self.subscription.stop()
162
163
 
163
164
  @staticmethod
164
165
  def _process_events_loop(
165
166
  subscription: ApplicationSubscription,
166
167
  projection: Projection[TrackingRecorder],
167
- has_error: Event,
168
+ is_stopping: Event,
168
169
  runner: weakref.ReferenceType[ProjectionRunner[Application, TrackingRecorder]],
169
170
  ) -> None:
170
171
  try:
@@ -184,12 +185,11 @@ class ProjectionRunner(Generic[TApplication, TTrackingRecorder]):
184
185
  stacklevel=2,
185
186
  )
186
187
 
187
- has_error.set()
188
+ is_stopping.set()
188
189
  subscription.subscription.stop()
189
190
 
190
191
  def run_forever(self, timeout: float | None = None) -> None:
191
- if self._has_error.wait(timeout=timeout):
192
- assert self.thread_error is not None # for mypy
192
+ if self._is_stopping.wait(timeout=timeout) and self.thread_error is not None:
193
193
  raise self.thread_error
194
194
 
195
195
  def wait(self, notification_id: int, timeout: float = 1.0) -> None:
@@ -198,11 +198,11 @@ class ProjectionRunner(Generic[TApplication, TTrackingRecorder]):
198
198
  application_name=self.subscription.name,
199
199
  notification_id=notification_id,
200
200
  timeout=timeout,
201
- interrupt=self._has_error,
201
+ interrupt=self._is_stopping,
202
202
  )
203
203
  except WaitInterruptedError:
204
- assert self.thread_error is not None # for mypy
205
- raise self.thread_error from None
204
+ if self.thread_error is not None:
205
+ raise self.thread_error from None
206
206
 
207
207
  def __enter__(self) -> Self:
208
208
  return self
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "eventsourcing"
3
- version = "9.4.0a4"
3
+ version = "9.4.0a5"
4
4
 
5
5
  description = "Event sourcing in Python"
6
6
  authors = [
File without changes
File without changes