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.
@@ -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: # pragma: no cover
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.0
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
- [![PyPI - Version](https://img.shields.io/pypi/v/python-cq.svg?color=4051b5&style=for-the-badge)](https://pypi.org/project/python-cq)
36
- [![PyPI - Downloads](https://img.shields.io/pypi/dm/python-cq.svg?color=4051b5&style=for-the-badge)](https://pypistats.org/packages/python-cq)
35
+ [![PyPI - Version](https://shieldcn.dev/pypi/v/python-cq.svg?variant=secondary)](https://pypi.org/project/python-cq)
36
+ [![PyPI - Downloads](https://shieldcn.dev/pypi/dm/python-cq.svg?variant=secondary)](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=vPltQdmQjnfb3eOB2lO6dxqjJEsGOjOyCNj7_2ehNAk,1389
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=L6X_Wa2TZ0IYNXmi8oexTXQyM_lkjJt5Ew4D-2VzwBY,957
32
- python_cq-0.25.0.dist-info/METADATA,sha256=E360s2Dd_Bgp3ApM1TdTLcxS0hM8GWtbsIeE5vLRrVk,4562
33
- python_cq-0.25.0.dist-info/WHEEL,sha256=THafob7ofN-NsuMN7Mg4qZyHaQI7KkD-QlcQatYhXPo,87
34
- python_cq-0.25.0.dist-info/licenses/LICENSE,sha256=oC77BOa9kaaQni5rW-Z-ytz3E5h4EVg248BHg9UFgyg,1063
35
- python_cq-0.25.0.dist-info/RECORD,,
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,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.32.3
2
+ Generator: hatchling 1.32.4
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any