python-event-sourcery 0.4.0a5__tar.gz → 0.4.0a6__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.
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/PKG-INFO +1 -1
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/subscription.py +1 -1
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/outbox.py +3 -3
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/subscription.py +9 -2
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/pyproject.toml +1 -1
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/LICENSE +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/__init__.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/aggregate/__init__.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/aggregate/aggregate.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/aggregate/repository.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/__init__.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/dispatcher.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/event/__init__.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/event/dto.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/event/registry.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/event/serde.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/event_store.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/exceptions.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/factory.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/in_memory.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/interfaces.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/outbox.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/stream_id.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/versioning.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/py.typed +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/read_model/__init__.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/read_model/cursors_dao.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/read_model/projector.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/__init__.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/dto.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/event_store.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/py.typed +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/stream.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/__init__.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/cursors_dao.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/dto.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/event_store.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/guid.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/jsonb.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/models.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/outbox.py +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/py.typed +0 -0
- {python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/subscription.py +0 -0
|
@@ -110,6 +110,6 @@ class SubscriptionBuilder(PositionPhase, FilterPhase, BuildPhase):
|
|
|
110
110
|
) -> Iterator[list[Recorded]]:
|
|
111
111
|
seconds = self._to_timedelta(timelimit)
|
|
112
112
|
subscription = self._build(batch_size=size, timelimit=seconds)
|
|
113
|
-
return (
|
|
113
|
+
return ( # pragma: no cover # apparently, bug in coverage.py
|
|
114
114
|
[self._serde.deserialize_record(e) for e in batch] for batch in subscription
|
|
115
115
|
)
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/outbox.py
RENAMED
|
@@ -6,7 +6,7 @@ from itertools import islice
|
|
|
6
6
|
|
|
7
7
|
from esdbclient import EventStoreDBClient, RecordedEvent
|
|
8
8
|
from esdbclient.exceptions import DeadlineExceeded, NotFound
|
|
9
|
-
from esdbclient.persistent import
|
|
9
|
+
from esdbclient.persistent import AbstractPersistentSubscription
|
|
10
10
|
|
|
11
11
|
from event_sourcery.event_store import RecordedRaw
|
|
12
12
|
from event_sourcery.event_store.interfaces import (
|
|
@@ -25,7 +25,7 @@ class ESDBOutboxStorageStrategy(OutboxStorageStrategy):
|
|
|
25
25
|
_outbox_name: str
|
|
26
26
|
_max_publish_attempts: int
|
|
27
27
|
_timeout: float | None
|
|
28
|
-
_active_subscription:
|
|
28
|
+
_active_subscription: AbstractPersistentSubscription = field(init=False)
|
|
29
29
|
|
|
30
30
|
def create_subscription(self) -> None:
|
|
31
31
|
try:
|
|
@@ -51,7 +51,7 @@ class ESDBOutboxStorageStrategy(OutboxStorageStrategy):
|
|
|
51
51
|
delattr(self, "_active_subscription")
|
|
52
52
|
|
|
53
53
|
@property
|
|
54
|
-
def active_subscription(self) ->
|
|
54
|
+
def active_subscription(self) -> AbstractPersistentSubscription:
|
|
55
55
|
return self._active_subscription
|
|
56
56
|
|
|
57
57
|
def outbox_entries(
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/subscription.py
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
from collections.abc import
|
|
1
|
+
from collections.abc import Iterator
|
|
2
2
|
from dataclasses import dataclass
|
|
3
3
|
from datetime import timedelta
|
|
4
4
|
from functools import partial
|
|
5
|
+
from typing import Protocol
|
|
5
6
|
|
|
6
7
|
import esdbclient.exceptions
|
|
7
8
|
from esdbclient import EventStoreDBClient, RecordedEvent
|
|
@@ -11,13 +12,19 @@ from event_sourcery.event_store.interfaces import SubscriptionStrategy
|
|
|
11
12
|
from event_sourcery_esdb import dto
|
|
12
13
|
|
|
13
14
|
|
|
15
|
+
class BuilderCallable(Protocol):
|
|
16
|
+
def __call__(
|
|
17
|
+
self, commit_position: Position | None = None
|
|
18
|
+
) -> Iterator[RecordedEvent]: ...
|
|
19
|
+
|
|
20
|
+
|
|
14
21
|
@dataclass(repr=False)
|
|
15
22
|
class ESDBSubscriptionStrategy(SubscriptionStrategy):
|
|
16
23
|
_client: EventStoreDBClient
|
|
17
24
|
|
|
18
25
|
@staticmethod
|
|
19
26
|
def _iterator(
|
|
20
|
-
builder:
|
|
27
|
+
builder: BuilderCallable,
|
|
21
28
|
size: int,
|
|
22
29
|
) -> Iterator[list[RecordedRaw]]:
|
|
23
30
|
subscription = builder()
|
|
File without changes
|
|
File without changes
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/aggregate/__init__.py
RENAMED
|
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
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery/event_store/outbox.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/event_store.py
RENAMED
|
File without changes
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/py.typed
RENAMED
|
File without changes
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_esdb/stream.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/dto.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/guid.py
RENAMED
|
File without changes
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/jsonb.py
RENAMED
|
File without changes
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/models.py
RENAMED
|
File without changes
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/outbox.py
RENAMED
|
File without changes
|
{python_event_sourcery-0.4.0a5 → python_event_sourcery-0.4.0a6}/event_sourcery_sqlalchemy/py.typed
RENAMED
|
File without changes
|
|
File without changes
|