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
14 changes: 2 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,14 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"

- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.13
cache: "pip"
cache-dependency-path: pyproject.toml

- uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish

- name: Install build dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install build

- name: Build distribution
Expand All @@ -41,7 +32,6 @@ jobs:
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
skip-existing: true

- name: Dump GitHub context
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: 3.13

- uses: astral-sh/setup-uv@v6
with:
version: "latest"
- name: Install Dependencies
run: uv pip install --system ".[dev]"
run: uv pip install --system --group dev .

- name: Run formatter
shell: bash
Expand All @@ -41,21 +41,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
fail-fast: false

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- uses: astral-sh/setup-uv@v6
with:
version: "latest"
- name: Install Dependencies
run: uv pip install --system ".[test]"
run: uv pip install --system --group test .

- run: mkdir coverage
- name: Test
Expand All @@ -76,9 +76,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: 3.13

Expand All @@ -87,7 +87,7 @@ jobs:
version: "latest"

- name: Get coverage files
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
pattern: .coverage*
path: coverage
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ python -m pip install --upgrade pip
After activating the virtual environment as described above, run:

```bash
pip install -e ".[dev]"
pip install --group dev -e .
```

This will install all the dependencies and your local project in your virtual environment.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ pip install taskiq-faststream[rabbit]
# or
pip install taskiq-faststream[kafka]
# or
pip install taskiq-faststream[confluent]
# or
pip install taskiq-faststream[nats]
# or
pip install taskiq-faststream[redis]
Expand Down
35 changes: 14 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "taskiq-faststream"
version = "0.2.3"
version = "0.3.0"
description = "FastStream - taskiq integration to schedule FastStream tasks"
readme = "README.md"
authors = [
Expand All @@ -10,19 +10,19 @@ authors = [

keywords = ["taskiq", "tasks", "distributed", "async", "FastStream"]

requires-python = ">=3.9"
requires-python = ">=3.10"

classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries",
Expand Down Expand Up @@ -63,7 +63,7 @@ redis = [
"faststream[redis]"
]

# local dev
[dependency-groups]
test = [
"taskiq-faststream[nats]",
"taskiq-faststream[rabbit]",
Expand All @@ -77,31 +77,24 @@ test = [
]

dev = [
"taskiq-faststream[test]",
"mypy==1.16.0",
"ruff==0.11.12",
{include-group = "test"},
"mypy==1.18.2",
"ruff==0.13.2",
"pre-commit >=3.6.0,<5.0.0",
]

[build-system]
requires = ["uv_build>=0.9.2"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-root = ""

[project.urls]
Homepage = "https://github.com/taskiq-python/taskiq-faststream"
Tracker = "https://github.com/taskiq-python/taskiq-faststream/issues"
Source = "https://github.com/taskiq-python/taskiq-faststream"

[tool.hatch.metadata]
allow-direct-references = true
allow-ambiguous-features = true

[tool.hatch.version]
path = "taskiq_faststream/__about__.py"

[tool.hatch.build]
skip-excluded-dirs = true
exclude = [
"/tests",
"/.github",
]

[tool.mypy]
python_version = "3.9"
strict = true
Expand Down
6 changes: 5 additions & 1 deletion taskiq_faststream/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

from fast_depends.utils import is_async_gen_callable, is_gen_callable
from faststream.types import SendableMessage
from faststream.utils.functions import to_async

try:
from faststream.utils.functions import to_async
except ImportError:
from faststream._internal.utils import to_async # type: ignore[no-redef]


async def resolve_msg(
Expand Down
4 changes: 2 additions & 2 deletions tests/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from typing import Any
from unittest.mock import MagicMock

import anyio
import pytest
from faststream.types import SendableMessage
from faststream.utils.functions import timeout_scope
from freezegun import freeze_time
from taskiq import AsyncBroker
from taskiq.cli.scheduler.args import SchedulerArgs
Expand Down Expand Up @@ -66,7 +66,7 @@ async def handler(msg: str) -> None:
),
)

with timeout_scope(3.0, True):
with anyio.fail_after(3.0):
await event.wait()

mock.assert_called_once_with("Hi!")
Expand Down