anydi 0.27.0a2__py3-none-any.whl → 0.27.0a4__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.
- anydi/ext/faststream.py +12 -2
- {anydi-0.27.0a2.dist-info → anydi-0.27.0a4.dist-info}/METADATA +1 -1
- {anydi-0.27.0a2.dist-info → anydi-0.27.0a4.dist-info}/RECORD +6 -6
- {anydi-0.27.0a2.dist-info → anydi-0.27.0a4.dist-info}/LICENSE +0 -0
- {anydi-0.27.0a2.dist-info → anydi-0.27.0a4.dist-info}/WHEEL +0 -0
- {anydi-0.27.0a2.dist-info → anydi-0.27.0a4.dist-info}/entry_points.txt +0 -0
anydi/ext/faststream.py
CHANGED
|
@@ -26,12 +26,22 @@ def install(broker: BrokerUsecase[Any, Any], container: Container) -> None:
|
|
|
26
26
|
"""
|
|
27
27
|
broker._container = container # type: ignore[attr-defined]
|
|
28
28
|
|
|
29
|
-
for
|
|
30
|
-
call =
|
|
29
|
+
for handler in _get_broken_handlers(broker):
|
|
30
|
+
call = handler._original_call # noqa
|
|
31
31
|
for parameter in get_typed_parameters(call):
|
|
32
32
|
patch_call_parameter(call, parameter, container)
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
def _get_broken_handlers(broker: BrokerUsecase[Any, Any]) -> list[Any]:
|
|
36
|
+
if hasattr(broker, "handlers"):
|
|
37
|
+
return [handler.calls[0][0] for handler in broker.handlers.values()]
|
|
38
|
+
# faststream > 0.5.0
|
|
39
|
+
return [
|
|
40
|
+
subscriber.calls[0].handler
|
|
41
|
+
for subscriber in broker._subscribers.values() # noqa
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
|
|
35
45
|
def get_container(broker: BrokerUsecase[Any, Any]) -> Container:
|
|
36
46
|
return cast(Container, getattr(broker, "_container")) # noqa
|
|
37
47
|
|
|
@@ -18,13 +18,13 @@ anydi/ext/django/ninja/__init__.py,sha256=kW3grUgWp_nkWSG_-39ADHMrZLGNcj9TsJ9OW8
|
|
|
18
18
|
anydi/ext/django/ninja/_operation.py,sha256=wSWa7D73XTVlOibmOciv2l6JHPe1ERZcXrqI8W-oO2w,2696
|
|
19
19
|
anydi/ext/django/ninja/_signature.py,sha256=2cSzKxBIxXLqtwNuH6GSlmjVJFftoGmleWfyk_NVEWw,2207
|
|
20
20
|
anydi/ext/fastapi.py,sha256=vhfSyovXuCjvSkx6AiLOTNU975i8wDg72C5fqXQiFLw,2896
|
|
21
|
-
anydi/ext/faststream.py,sha256=
|
|
21
|
+
anydi/ext/faststream.py,sha256=Kuyqin6rKlOOM5x9BHIv-RF9i8zqU_kh4H6Xs0DLI20,1916
|
|
22
22
|
anydi/ext/pytest_plugin.py,sha256=pFLcfxGtJfGSqtk7sPrrHFSKOaZoKZTWt5X8CT0ydmA,4242
|
|
23
23
|
anydi/ext/starlette/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
24
24
|
anydi/ext/starlette/middleware.py,sha256=Ni0BQaPjs_Ha6zcLZYYJ3-XkslTCnL9aCSa06rnRDMI,1139
|
|
25
25
|
anydi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
-
anydi-0.27.
|
|
27
|
-
anydi-0.27.
|
|
28
|
-
anydi-0.27.
|
|
29
|
-
anydi-0.27.
|
|
30
|
-
anydi-0.27.
|
|
26
|
+
anydi-0.27.0a4.dist-info/LICENSE,sha256=V6rU8a8fv6o2jQ-7ODHs0XfDFimot8Q6Km6CylRIDTo,1069
|
|
27
|
+
anydi-0.27.0a4.dist-info/METADATA,sha256=n15Q3IqgLt09UtyCcUkvk4WVwE6QV-3jlGbNQMWj3j4,5163
|
|
28
|
+
anydi-0.27.0a4.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
29
|
+
anydi-0.27.0a4.dist-info/entry_points.txt,sha256=GmQblwzxFg42zva1HyBYJJ7TvrTIcSAGBHmyi3bvsi4,42
|
|
30
|
+
anydi-0.27.0a4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|