python-cq 0.25.0__py3-none-any.whl → 0.25.1__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.
- cq/_core/related_events.py +1 -1
- cq/middlewares/retry.py +3 -0
- {python_cq-0.25.0.dist-info → python_cq-0.25.1.dist-info}/METADATA +3 -3
- {python_cq-0.25.0.dist-info → python_cq-0.25.1.dist-info}/RECORD +6 -6
- {python_cq-0.25.0.dist-info → python_cq-0.25.1.dist-info}/WHEEL +1 -1
- {python_cq-0.25.0.dist-info → python_cq-0.25.1.dist-info}/licenses/LICENSE +0 -0
cq/_core/related_events.py
CHANGED
|
@@ -25,7 +25,7 @@ class AnyIORelatedEvents(RelatedEvents):
|
|
|
25
25
|
task_group: TaskGroup = field(default_factory=create_task_group)
|
|
26
26
|
history: list[Event] = field(default_factory=list, init=False)
|
|
27
27
|
|
|
28
|
-
def __bool__(self) -> bool:
|
|
28
|
+
def __bool__(self) -> bool:
|
|
29
29
|
return bool(self.history)
|
|
30
30
|
|
|
31
31
|
async def __aenter__(self) -> Self:
|
cq/middlewares/retry.py
CHANGED
|
@@ -21,6 +21,9 @@ class RetryMiddleware:
|
|
|
21
21
|
delay: float = 0,
|
|
22
22
|
exceptions: Sequence[type[BaseException]] = (Exception,),
|
|
23
23
|
) -> None:
|
|
24
|
+
if retry < 1:
|
|
25
|
+
raise ValueError(f"`retry` must be at least 1, got {retry}.")
|
|
26
|
+
|
|
24
27
|
self.__delay = delay
|
|
25
28
|
self.__exceptions = tuple(exceptions)
|
|
26
29
|
self.__retry = retry
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: python-cq
|
|
3
|
-
Version: 0.25.
|
|
3
|
+
Version: 0.25.1
|
|
4
4
|
Summary: CQRS library for async Python projects.
|
|
5
5
|
Project-URL: Documentation, https://python-cq.remimd.dev
|
|
6
6
|
Project-URL: Repository, https://github.com/100nm/python-cq
|
|
@@ -32,8 +32,8 @@ Description-Content-Type: text/markdown
|
|
|
32
32
|
|
|
33
33
|
# python-cq
|
|
34
34
|
|
|
35
|
-
[](https://pypi.org/project/python-cq)
|
|
36
|
+
[](https://pypistats.org/packages/python-cq)
|
|
37
37
|
|
|
38
38
|
**python-cq** is an async-first Python library for organizing code around CQRS. It separates reads (queries), writes (commands), and notifications (events) into dedicated message buses, and lets you plug in any dependency injection framework behind a small protocol.
|
|
39
39
|
|
|
@@ -4,7 +4,7 @@ cq/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
4
4
|
cq/_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
cq/_core/message.py,sha256=uyFgiFCm3kVhWFzJ2gBtWNub_cgfCdyXXSJirBW05OQ,286
|
|
6
6
|
cq/_core/middleware.py,sha256=EKrAXCbDEZmGn9JTGpL06Nd0DflTTFbDB1Z7Ja3CqmI,3710
|
|
7
|
-
cq/_core/related_events.py,sha256=
|
|
7
|
+
cq/_core/related_events.py,sha256=msJ0J-ydtxJ5My8qPLhMIFuCCvzbB_WBDD0CTwOEC-0,1369
|
|
8
8
|
cq/_core/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
cq/_core/common/typing.py,sha256=xtXsqzyATZ0LTVfjB-J4sB6dPKHKrpXqd1bZIkwVljA,504
|
|
10
10
|
cq/_core/queuing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -28,8 +28,8 @@ cq/ext/injection.py,sha256=DLdALqRYaJ80wWEcw2wbZRUrNMiZVGg0AdgYIt5FrP8,3150
|
|
|
28
28
|
cq/middlewares/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
29
|
cq/middlewares/contextlib.py,sha256=_kwbXteGADGuzD-o2pPoPWOeTKiXcPCNuDmpG-f-YnY,875
|
|
30
30
|
cq/middlewares/exc.py,sha256=ecAMoksj6B4osySSZ9g_cBR35_tiABQdpII-Drxkz44,1604
|
|
31
|
-
cq/middlewares/retry.py,sha256=
|
|
32
|
-
python_cq-0.25.
|
|
33
|
-
python_cq-0.25.
|
|
34
|
-
python_cq-0.25.
|
|
35
|
-
python_cq-0.25.
|
|
31
|
+
cq/middlewares/retry.py,sha256=WkpMYfAVUR8bnZ1NejX8zeKuPtfCIJlDEj8r4ZkqGBU,1054
|
|
32
|
+
python_cq-0.25.1.dist-info/METADATA,sha256=joDtH5B0cYSWfHLgn0AnWlu5i4aiSRje_xVmqrnzcMA,4528
|
|
33
|
+
python_cq-0.25.1.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
34
|
+
python_cq-0.25.1.dist-info/licenses/LICENSE,sha256=oC77BOa9kaaQni5rW-Z-ytz3E5h4EVg248BHg9UFgyg,1063
|
|
35
|
+
python_cq-0.25.1.dist-info/RECORD,,
|
|
File without changes
|