Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: FastStream 0.5.0 compatibility #50

Merged
merged 30 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0a9b240
chore(deps): bump actions/cache from 3 to 4
dependabot[bot] Jan 22, 2024
7cd8868
chore(deps-dev): bump ruff from 0.1.13 to 0.1.14
dependabot[bot] Jan 22, 2024
64c6ac3
Merge pull request #32 from taskiq-python/dependabot/github_actions/a…
Lancetnik Jan 29, 2024
d27d6e3
Merge pull request #33 from taskiq-python/dependabot/pip/ruff-0.1.14
Lancetnik Jan 29, 2024
d8b7075
chore(deps-dev): update pytest requirement from <8,>=7.4.0 to >=7.4.0,<9
dependabot[bot] Jan 29, 2024
2ddcb5f
chore(deps-dev): bump ruff from 0.1.14 to 0.2.0
dependabot[bot] Feb 5, 2024
4dc17ab
Merge pull request #35 from taskiq-python/dependabot/pip/ruff-0.2.0
Lancetnik Feb 8, 2024
c18808c
chore(deps-dev): bump ruff from 0.2.0 to 0.2.1
dependabot[bot] Feb 12, 2024
7df233e
Merge pull request #36 from taskiq-python/dependabot/pip/ruff-0.2.1
Lancetnik Feb 17, 2024
7b5441d
chore(deps-dev): bump ruff from 0.2.1 to 0.2.2
dependabot[bot] Feb 19, 2024
a59f092
Merge pull request #37 from taskiq-python/dependabot/pip/ruff-0.2.2
Lancetnik Feb 20, 2024
008bc8b
Merge pull request #34 from taskiq-python/dependabot/pip/pytest-gte-7…
Lancetnik Feb 20, 2024
ec5dd5d
chore(deps-dev): bump ruff from 0.2.2 to 0.3.0
dependabot[bot] Mar 4, 2024
89371ed
chore(deps): bump pypa/gh-action-pypi-publish from 1.8.11 to 1.8.12
dependabot[bot] Mar 4, 2024
5f1a587
Merge pull request #38 from taskiq-python/dependabot/pip/ruff-0.3.0
Lancetnik Mar 10, 2024
e858533
Merge pull request #39 from taskiq-python/dependabot/github_actions/p…
Lancetnik Mar 10, 2024
f5f13db
chore(deps): bump pypa/gh-action-pypi-publish from 1.8.12 to 1.8.14
dependabot[bot] Mar 11, 2024
b74c20e
chore(deps-dev): bump ruff from 0.3.0 to 0.3.3
dependabot[bot] Mar 18, 2024
fc8d615
Merge pull request #43 from taskiq-python/dependabot/pip/ruff-0.3.3
Lancetnik Mar 19, 2024
9bf2c08
Merge pull request #42 from taskiq-python/dependabot/github_actions/p…
Lancetnik Mar 19, 2024
302293c
chore(deps-dev): update mypy requirement
dependabot[bot] Mar 19, 2024
4193b8c
Update pyproject.toml
Lancetnik Mar 19, 2024
bb113be
chore(deps-dev): bump ruff from 0.3.3 to 0.3.5
dependabot[bot] Apr 1, 2024
759f0ca
Merge pull request #45 from taskiq-python/dependabot/pip/ruff-0.3.5
Lancetnik Apr 12, 2024
a42f3f9
Merge branch 'develop' into dependabot/pip/mypy-gte-1.8.0-and-lt-1.10.0
Lancetnik Apr 12, 2024
482c8b5
Merge pull request #40 from taskiq-python/dependabot/pip/mypy-gte-1.8…
Lancetnik Apr 12, 2024
fee9dda
fix: FastStream 0.5.0 compat
Lancetnik Apr 22, 2024
39321d1
chore: update dependencies
Lancetnik Apr 22, 2024
dbc53e9
chore: update ruff
Lancetnik Apr 22, 2024
5e507fb
Merge branch 'master' into develop
Lancetnik Apr 22, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
cache: "pip"
cache-dependency-path: pyproject.toml

- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
Expand All @@ -39,7 +39,7 @@ jobs:
run: python -m build

- name: Publish
uses: pypa/gh-action-pypi-publish@v1.8.11
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
password: ${{ secrets.PYPI_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "FastStream - taskiq integration to schedule FastStream tasks"
readme = "README.md"
authors = [
{ name = "Taskiq team", email = "taskiq@no-reply.com" },
{ name = "Pastukhov Nikita", email = "diementros@yandex.ru" },
{ name = "Nikita Pastukhov", email = "nikita@pastukhov-dev.com" },
]

keywords = ["taskiq", "tasks", "distributed", "async", "FastStream"]
Expand Down Expand Up @@ -43,7 +43,7 @@ dynamic = ["version"]

dependencies = [
"taskiq>=0.10.0,<1.0.0",
"faststream>=0.3.14,<0.5.0",
"faststream>=0.3.14,<0.6.0",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -71,14 +71,14 @@ test = [
"taskiq-faststream[redis]",

"coverage[toml]>=7.2.0,<8.0.0",
"pytest>=7.4.0,<8",
"pytest>=7.4.0,<9",
]

dev = [
"taskiq-faststream[test]",

"mypy>=1.8.0,<1.9.0",
"ruff==0.1.13",
"mypy>=1.8.0,<1.10.0",
"ruff==0.4.1",
"pre-commit >=3.6.0,<4.0.0",
]

Expand Down
2 changes: 1 addition & 1 deletion taskiq_faststream/__about__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""FastStream - taskiq integration to schedule FastStream tasks."""
__version__ = "0.1.7"
__version__ = "0.1.8"
6 changes: 3 additions & 3 deletions taskiq_faststream/broker.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import typing
import warnings
from typing import Any

import anyio
from faststream.app import FastStream
from faststream.broker.core.asynchronous import BrokerAsyncUsecase
from faststream.types import SendableMessage
from taskiq import AsyncBroker, BrokerMessage
from taskiq.acks import AckableMessage
Expand Down Expand Up @@ -31,7 +31,7 @@ class BrokerWrapper(AsyncBroker):
task : Register FastStream scheduled task.
"""

def __init__(self, broker: BrokerAsyncUsecase[typing.Any, typing.Any]) -> None:
def __init__(self, broker: Any) -> None:
super().__init__()
self.serializer = PatchedSerializer()
self.broker = broker
Expand Down Expand Up @@ -131,7 +131,7 @@ async def kick(self, message: BrokerMessage) -> None:


async def _broker_publish(
broker: BrokerAsyncUsecase[typing.Any, typing.Any],
broker: Any,
message: BrokerMessage,
) -> None:
labels = message.labels
Expand Down
5 changes: 2 additions & 3 deletions tests/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from unittest.mock import MagicMock

import pytest
from faststream.broker.core.asynchronous import BrokerAsyncUsecase
from faststream.utils.functions import timeout_scope
from taskiq import AsyncBroker, TaskiqScheduler
from taskiq.cli.scheduler.args import SchedulerArgs
Expand All @@ -20,14 +19,14 @@ class SchedulerTestcase:
subj_name: str

@staticmethod
def build_taskiq_broker(broker: BrokerAsyncUsecase[Any, Any]) -> AsyncBroker:
def build_taskiq_broker(broker: Any) -> AsyncBroker:
"""Build Taskiq compatible object."""
return BrokerWrapper(broker)

async def test_task(
self,
subject: str,
broker: BrokerAsyncUsecase[Any, Any],
broker: Any,
mock: MagicMock,
event: asyncio.Event,
) -> None:
Expand Down