diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index aef58b3..1a8267b 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -39,7 +39,7 @@ jobs: - lint strategy: matrix: - python: [ "3.12", "3.13" ] + python: [ "3.11", "3.12", "3.13" ] fail-fast: false name: "Test on Python ${{ matrix.python }}" diff --git a/fastapi_cache/coder.py b/fastapi_cache/coder.py index 96d4623..b99fdf7 100644 --- a/fastapi_cache/coder.py +++ b/fastapi_cache/coder.py @@ -29,7 +29,7 @@ } -def dec_hook[T](type_: type[T], obj: Any) -> T: +def dec_hook(type_: type[T], obj: Any) -> T: if is_subclass_safe(type_, BaseModel): if isinstance(obj, bytes): return type_.model_validate_json(obj) # type: ignore[no-any-return, attr-defined] diff --git a/pyproject.toml b/pyproject.toml index 77caad9..a7248f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ authors = [ { name = "long2ice", email = "long2ice@gmail.com" }, { name = "Yolley", email = "comingreal@gmail.com" }, ] -requires-python = "~=3.12" +requires-python = ">=3.11" readme = "README.md" license = "Apache-2.0" keywords = [ @@ -87,7 +87,7 @@ build-backend = "hatchling.build" [tool.mypy] files = ["."] -python_version = "3.12" +python_version = "3.11" # equivalent of --strict warn_unused_configs = true disallow_any_generics = true @@ -110,14 +110,14 @@ ignore_errors = true [tool.pyright] strict = ["fastapi_cache", "tests"] -pythonVersion = "3.12" +pythonVersion = "3.11" [tool.pytest.ini_options] addopts = "-p no:warnings" [tool.ruff] line-length = 120 -target-version = "py312" +target-version = "py311" [tool.ruff.lint] select = [ diff --git a/tox.ini b/tox.ini index 5c18719..20ba3a4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,13 @@ [tox] env_list = - py312,py313 + py311,py312,py313 minversion = 4.11.3 [gh-actions] # Map Github Actions Python version to environment factors # Requires tox-gh-actions 3.x is installed in the GitHub action python = + 3.11: py311 3.12: py312 3.13: py313