modern-di-faststream 2.4.0__tar.gz → 2.5.0__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.
- {modern_di_faststream-2.4.0 → modern_di_faststream-2.5.0}/PKG-INFO +1 -1
- modern_di_faststream-2.5.0/modern_di_faststream/__init__.py +9 -0
- {modern_di_faststream-2.4.0 → modern_di_faststream-2.5.0}/modern_di_faststream/main.py +2 -2
- {modern_di_faststream-2.4.0 → modern_di_faststream-2.5.0}/pyproject.toml +1 -1
- modern_di_faststream-2.4.0/modern_di_faststream/__init__.py +0 -4
- {modern_di_faststream-2.4.0 → modern_di_faststream-2.5.0}/.gitignore +0 -0
- {modern_di_faststream-2.4.0 → modern_di_faststream-2.5.0}/README.md +0 -0
- {modern_di_faststream-2.4.0 → modern_di_faststream-2.5.0}/modern_di_faststream/py.typed +0 -0
|
@@ -14,7 +14,7 @@ T_co = typing.TypeVar("T_co", covariant=True)
|
|
|
14
14
|
P = typing.ParamSpec("P")
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
faststream_message_provider = providers.ContextProvider(scope=Scope.REQUEST, context_type=faststream.StreamMessage)
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
_major, _minor, *_ = version("faststream").split(".")
|
|
@@ -78,7 +78,7 @@ def setup_di(
|
|
|
78
78
|
msg = "Broker must be defined to setup DI"
|
|
79
79
|
raise RuntimeError(msg)
|
|
80
80
|
|
|
81
|
-
container.providers_registry.add_providers(
|
|
81
|
+
container.providers_registry.add_providers(faststream_message_provider)
|
|
82
82
|
app.context.set_global("di_container", container)
|
|
83
83
|
app.after_shutdown(container.close_async)
|
|
84
84
|
app.broker.add_middleware(_DIMiddlewareFactory(container))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|