Skip to content

Commit 471b8cb

Browse files
authored
Merge pull request #50 from taskiq-python/develop
fix: FastStream 0.5.0 compatibility
2 parents fc48b32 + 5e507fb commit 471b8cb

File tree

6 files changed

+14
-15
lines changed

6 files changed

+14
-15
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
cache: "pip"
2626
cache-dependency-path: pyproject.toml
2727

28-
- uses: actions/cache@v3
28+
- uses: actions/cache@v4
2929
id: cache
3030
with:
3131
path: ${{ env.pythonLocation }}
@@ -39,7 +39,7 @@ jobs:
3939
run: python -m build
4040

4141
- name: Publish
42-
uses: pypa/gh-action-pypi-publish@v1.8.11
42+
uses: pypa/gh-action-pypi-publish@v1.8.14
4343
with:
4444
password: ${{ secrets.PYPI_TOKEN }}
4545

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
uses: actions/setup-python@v5
5050
with:
5151
python-version: ${{ matrix.python-version }}
52-
- uses: actions/cache@v3
52+
- uses: actions/cache@v4
5353
id: cache
5454
with:
5555
path: ${{ env.pythonLocation }}

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description = "FastStream - taskiq integration to schedule FastStream tasks"
88
readme = "README.md"
99
authors = [
1010
{ name = "Taskiq team", email = "taskiq@no-reply.com" },
11-
{ name = "Pastukhov Nikita", email = "diementros@yandex.ru" },
11+
{ name = "Nikita Pastukhov", email = "nikita@pastukhov-dev.com" },
1212
]
1313

1414
keywords = ["taskiq", "tasks", "distributed", "async", "FastStream"]
@@ -43,7 +43,7 @@ dynamic = ["version"]
4343

4444
dependencies = [
4545
"taskiq>=0.10.0,<1.0.0",
46-
"faststream>=0.3.14,<0.5.0",
46+
"faststream>=0.3.14,<0.6.0",
4747
]
4848

4949
[project.optional-dependencies]
@@ -71,14 +71,14 @@ test = [
7171
"taskiq-faststream[redis]",
7272

7373
"coverage[toml]>=7.2.0,<8.0.0",
74-
"pytest>=7.4.0,<8",
74+
"pytest>=7.4.0,<9",
7575
]
7676

7777
dev = [
7878
"taskiq-faststream[test]",
7979

80-
"mypy>=1.8.0,<1.9.0",
81-
"ruff==0.1.13",
80+
"mypy>=1.8.0,<1.10.0",
81+
"ruff==0.4.1",
8282
"pre-commit >=3.6.0,<4.0.0",
8383
]
8484

taskiq_faststream/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
"""FastStream - taskiq integration to schedule FastStream tasks."""
2-
__version__ = "0.1.7"
2+
__version__ = "0.1.8"

taskiq_faststream/broker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import typing
22
import warnings
3+
from typing import Any
34

45
import anyio
56
from faststream.app import FastStream
6-
from faststream.broker.core.asynchronous import BrokerAsyncUsecase
77
from faststream.types import SendableMessage
88
from taskiq import AsyncBroker, BrokerMessage
99
from taskiq.acks import AckableMessage
@@ -31,7 +31,7 @@ class BrokerWrapper(AsyncBroker):
3131
task : Register FastStream scheduled task.
3232
"""
3333

34-
def __init__(self, broker: BrokerAsyncUsecase[typing.Any, typing.Any]) -> None:
34+
def __init__(self, broker: Any) -> None:
3535
super().__init__()
3636
self.serializer = PatchedSerializer()
3737
self.broker = broker
@@ -131,7 +131,7 @@ async def kick(self, message: BrokerMessage) -> None:
131131

132132

133133
async def _broker_publish(
134-
broker: BrokerAsyncUsecase[typing.Any, typing.Any],
134+
broker: Any,
135135
message: BrokerMessage,
136136
) -> None:
137137
labels = message.labels

tests/testcase.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from unittest.mock import MagicMock
55

66
import pytest
7-
from faststream.broker.core.asynchronous import BrokerAsyncUsecase
87
from faststream.utils.functions import timeout_scope
98
from taskiq import AsyncBroker, TaskiqScheduler
109
from taskiq.cli.scheduler.args import SchedulerArgs
@@ -20,14 +19,14 @@ class SchedulerTestcase:
2019
subj_name: str
2120

2221
@staticmethod
23-
def build_taskiq_broker(broker: BrokerAsyncUsecase[Any, Any]) -> AsyncBroker:
22+
def build_taskiq_broker(broker: Any) -> AsyncBroker:
2423
"""Build Taskiq compatible object."""
2524
return BrokerWrapper(broker)
2625

2726
async def test_task(
2827
self,
2928
subject: str,
30-
broker: BrokerAsyncUsecase[Any, Any],
29+
broker: Any,
3130
mock: MagicMock,
3231
event: asyncio.Event,
3332
) -> None:

0 commit comments

Comments
 (0)