Skip to content

Commit 3ca458d

Browse files
authored
chore(deps): support faststream <0.8 (#132)
2 parents d3b3dd7 + b719522 commit 3ca458d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ classifiers = [
4141

4242
dependencies = [
4343
"taskiq>=0.12.1,<0.13.0",
44-
"faststream>=0.3.14,<0.7",
44+
"faststream>=0.3.14,<0.8",
4545
]
4646

4747
[project.optional-dependencies]

taskiq_faststream/broker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ async def startup(self) -> None:
5656

5757
async def shutdown(self) -> None:
5858
"""Shutdown wrapped FastStream broker."""
59-
await self.broker.close()
59+
# `stop` replaced `close` in FastStream 0.5.44; `close` removed in 0.7.0.
60+
stop = getattr(self.broker, "stop", None) or self.broker.close
61+
await stop()
6062
await super().shutdown()
6163

6264
async def kick(self, message: PatchedMessage) -> None: # type: ignore[override]

0 commit comments

Comments
 (0)