diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e40e10e..31fb09f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,7 @@ jobs: contents: write strategy: matrix: - py_version: ["3.9", "3.10", "3.11", "3.12"] + py_version: ["3.9", "3.10", "3.11", "3.12", "3.13"] os: [ubuntu-latest, windows-latest] runs-on: "${{ matrix.os }}" steps: diff --git a/.python-version b/.python-version index 0b1e0c8..b0ff699 100644 --- a/.python-version +++ b/.python-version @@ -1,4 +1,5 @@ -3.11.4 -3.10.12 -3.9.17 -3.8.17 +3.13.1 +3.12.8 +3.11.11 +3.10.16 +3.9.21 diff --git a/pyproject.toml b/pyproject.toml index ad93e15..97610e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,10 +10,11 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "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", "Operating System :: OS Independent", "Intended Audience :: Developers", ] diff --git a/taskiq_dependencies/dependency.py b/taskiq_dependencies/dependency.py index 3a79e20..3f1c1f4 100644 --- a/taskiq_dependencies/dependency.py +++ b/taskiq_dependencies/dependency.py @@ -1,11 +1,12 @@ import inspect import uuid +from collections.abc import Coroutine from contextlib import _AsyncGeneratorContextManager, _GeneratorContextManager +from types import CoroutineType from typing import ( Any, AsyncGenerator, Callable, - Coroutine, Dict, Generator, Optional, @@ -68,6 +69,16 @@ def Depends( ... +@overload +def Depends( + dependency: Optional[Callable[..., "CoroutineType[Any, Any, _T]"]] = None, + *, + use_cache: bool = True, + kwargs: Optional[Dict[str, Any]] = None, +) -> _T: # pragma: no cover + ... + + @overload def Depends( dependency: Optional[Callable[..., Coroutine[Any, Any, _T]]] = None, diff --git a/tox.ini b/tox.ini index aa5d282..bca4607 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,11 @@ [tox] isolated_build = true env_list = + py313 + py312 py311 py310 py39 - py38 [testenv] skip_install = true