Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/dishka/integrations/faststream/faststream_05.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
_ReturnT = TypeVar("_ReturnT")
_ParamsP = ParamSpec("_ParamsP")


class FastStreamProvider(Provider):
context = from_context(ContextRepo, scope=Scope.REQUEST)
message = from_context(StreamMessage, scope=Scope.REQUEST)


try:
# AsgiFastStream was introduced in FastStream 0.5.16
from faststream.asgi import AsgiFastStream
Expand Down
3 changes: 2 additions & 1 deletion src/dishka/integrations/faststream/faststream_06.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
get_type_hints,
)

from faststream import BaseMiddleware, Context, FastStream
from faststream import BaseMiddleware, FastStream
from faststream._internal.basic_types import DecodedMessage
from faststream._internal.broker import BrokerUsecase as BrokerType
from faststream._internal.context import ContextRepo
Expand All @@ -31,6 +31,7 @@
_ReturnT = TypeVar("_ReturnT")
_ParamsP = ParamSpec("_ParamsP")


class FastStreamProvider(Provider):
context = from_context(ContextRepo, scope=Scope.REQUEST)
message = from_context(StreamMessage, scope=Scope.REQUEST)
Expand Down
Loading