From e9d271ab8648b3aefc173c6ccdc194899a3da032 Mon Sep 17 00:00:00 2001 From: Apostol Fet Date: Sun, 12 Oct 2025 12:16:24 +0300 Subject: [PATCH 1/2] Added a warning and docs about moving the integration with FastStream --- docs/integrations/faststream.rst | 4 ++++ docs/integrations/index.rst | 2 +- src/dishka/integrations/faststream/__init__.py | 10 ++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/integrations/faststream.rst b/docs/integrations/faststream.rst index 3aedcdc6..6c74bba3 100644 --- a/docs/integrations/faststream.rst +++ b/docs/integrations/faststream.rst @@ -3,6 +3,10 @@ FastStream =========================================== +.. warning:: + The integration has been moved to the `dishka-faststream `_ package and will be removed in future versions. + + Though it is not required, you can use *dishka-faststream* integration. It features: * automatic *REQUEST* scope management using middleware diff --git a/docs/integrations/index.rst b/docs/integrations/index.rst index 5e799d0a..e3d9d4b5 100644 --- a/docs/integrations/index.rst +++ b/docs/integrations/index.rst @@ -46,7 +46,7 @@ Some of the integrations are supported by a community, refer to their documentat * - :ref:`grpcio` - :ref:`Aiogram_dialog` - - :ref:`FastStream` + - `FastStream `_ (:abbr:`com (Community support)`) - * - :ref:`Fastapi` diff --git a/src/dishka/integrations/faststream/__init__.py b/src/dishka/integrations/faststream/__init__.py index c3a9401c..68e46713 100644 --- a/src/dishka/integrations/faststream/__init__.py +++ b/src/dishka/integrations/faststream/__init__.py @@ -1,9 +1,19 @@ +import warnings + from faststream.__about__ import ( __version__ as FASTSTREAM_VERSION, # noqa: N812 ) from dishka import FromDishka +warnings.warn( + "The integration has been moved to the dishka-faststream package" + " and will be removed in future versions." + "\nhttps://github.com/faststream-community/dishka-faststream", + DeprecationWarning, + stacklevel=2, +) + FASTSTREAM_05 = FASTSTREAM_VERSION.startswith("0.5") FASTSTREAM_06 = FASTSTREAM_VERSION.startswith("0.6") From 58eda42980014b7e2192ac7b2fd4357fc5036972 Mon Sep 17 00:00:00 2001 From: Apostol Fet Date: Mon, 13 Oct 2025 22:45:03 +0300 Subject: [PATCH 2/2] Added command to install dishka-faststream --- docs/integrations/faststream.rst | 3 +++ src/dishka/integrations/faststream/__init__.py | 1 + 2 files changed, 4 insertions(+) diff --git a/docs/integrations/faststream.rst b/docs/integrations/faststream.rst index 6c74bba3..c255128a 100644 --- a/docs/integrations/faststream.rst +++ b/docs/integrations/faststream.rst @@ -5,6 +5,9 @@ FastStream .. warning:: The integration has been moved to the `dishka-faststream `_ package and will be removed in future versions. + .. code-block:: shell + + pip install dishka-faststream Though it is not required, you can use *dishka-faststream* integration. It features: diff --git a/src/dishka/integrations/faststream/__init__.py b/src/dishka/integrations/faststream/__init__.py index 68e46713..49f6610d 100644 --- a/src/dishka/integrations/faststream/__init__.py +++ b/src/dishka/integrations/faststream/__init__.py @@ -9,6 +9,7 @@ warnings.warn( "The integration has been moved to the dishka-faststream package" " and will be removed in future versions." + "\n`pip install dishka-faststream`" "\nhttps://github.com/faststream-community/dishka-faststream", DeprecationWarning, stacklevel=2,