[project] name = "Flask-Caching" version = "2.5.1" description = "Adds caching support to Flask applications." readme = "README.md" license = "BSD-3-Clause" license-files = ["LICENSE"] authors = [{ name = "Peter Justin", email="peter.justin@outlook.com" }] maintainers = [{ name = "Pallets Ecosystem", email = "contact@palletsprojects.com" }] classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', ] requires-python = ">=3.11" dependencies = [ "flask>=3.0", "cachelib>=0.17.0", ] [project.urls] Documentation = "https://flask-caching.readthedocs.io" Changes = "https://github.com/pallets-eco/flask-caching/releases/" Source = "https://github.com/pallets-eco/flask-caching" Chat = "https://discord.gg/pallets" [dependency-groups] dev = [ "ruff", {include-group = "tox"}, {include-group = "pre-commit"}, {include-group = "docs"}, {include-group = "tests"}, {include-group = "typing"}, ] tox = [ "tox>=4.39", "tox-uv", ] pre-commit = [ "pre-commit", "pre-commit-uv", ] docs = [ "pallets-sphinx-themes", "sphinx", "sphinx-issues", "sphinx-tabs", "sphinx-intl>=2.3.1", "sphinxcontrib-log-cabinet", ] docs-auto = [ "sphinx-autobuild", ] tests = [ "flask[async]", "pytest", "pytest-cov", "pytest-asyncio", "pytest-xprocess", "pylibmc", "redis", "asgiref", ] typing = [ "mypy", "pyright", "pytest", "types-redis>=4.6.0.20241004", "types-uwsgi>=2.0.0.20260408", ] gha-update = [ "gha-update ; python_full_version >= '3.12'", ] [build-system] requires = ["flit_core>=3.11,<5"] build-backend = "flit_core.buildapi" [tool.flit.module] name = "flask_caching" [tool.flit.sdist] include = [ "docs/", "examples/", "tests/", "CHANGES.rst", "uv.lock" ] exclude = [ "docs/_build/", ] [tool.uv] default-groups = ["dev", "pre-commit", "tests", "typing"] [tool.ruff] src = ["src"] fix = true show-fixes = true output-format = "full" [tool.ruff.lint] select = [ "B", # flake8-bugbear "E", # pycodestyle error "F", # pyflakes "I", # isort "UP", # pyupgrade "W", # pycodestyle warning ] ignore = [ "UP007", # Use X | Y for type annotations; doesn't work with some of our (stringy) type definitions - should aim to resolve this ] [tool.ruff.lint.isort] force-single-line = true order-by-type = false [tool.coverage.run] branch = true source = ["flask_caching", "tests"] omit = ["src/flask_caching/contrib/*"] [tool.coverage.paths] source = ["src", "*/site-packages"] [tool.coverage.report] exclude_also = [ "if t.TYPE_CHECKING", "raise NotImplementedError", ": \\.{3}", ] [tool.pytest.ini_options] testpaths = ["tests"] filterwarnings = [ "error", "default::pytest.PytestUnraisableExceptionWarning", ] [tool.mypy] python_version = "3.11" files = ["src/flask_caching/", "tests/typing/"] warn_unused_configs = true strict = true [[tool.mypy.overrides]] module = [ "pylibmc", "google.*", ] ignore_missing_imports = true [tool.pyright] pythonVersion = "3.11" include = ["src", "tests/typing"] typeCheckingMode = "standard" [tool.tox] env_list = [ "py3.14", "py3.13", "py3.12", "py3.11", "style", "typing", "docs", "docs-auto", ] [tool.tox.env_run_base] description = "pytest on latest dependency versions" runner = "uv-venv-lock-runner" package = "wheel" wheel_build_env = ".pkg" constrain_package_deps = true use_frozen_constraints = true dependency_groups = ["tests"] pass_env = ["CI"] env_tmp_dir = "{toxworkdir}/tmp/{envname}" commands = [[ "pytest", "-v", "--capture=tee-sys", "--tb=short", "--basetemp={env_tmp_dir}", {replace = "posargs", default = [], extend = true}, ]] [tool.tox.env.style] description = "run all pre-commit hooks on all files" dependency_groups = ["pre-commit"] skip_install = true commands = [["pre-commit", "run", "--all-files"]] [tool.tox.env.typing] description = "run static type checkers" dependency_groups = ["typing"] commands = [ ["mypy"], ] [tool.tox.docs] docs_dir = "{tox_root}{/}docs" build_dir = "{[tool.tox.docs]docs_dir}{/}_build" sphinx_args = ["--show-traceback", "--fail-on-warning", "--keep-going", "--fresh-env"] [tool.tox.env.docs] description = "build docs" dependency_groups = ["docs"] commands = [[ "sphinx-build", { replace = "ref", of = ["tool", "tox", "docs", "sphinx_args"], extend = true }, { replace = "posargs", default = [], extend = true }, "--builder", "dirhtml", "{[tool.tox.docs]docs_dir}", "{[tool.tox.docs]build_dir}{/}dirhtml", ]] [tool.tox.env.docs-auto] description = "continuously rebuild docs and start a local server" dependency_groups = ["docs", "docs-auto"] package = "editable" commands = [[ "sphinx-autobuild", { replace = "ref", of = ["tool", "tox", "docs", "sphinx_args"], extend = true }, { replace = "posargs", default = [], extend = true }, "--builder", "dirhtml", "--watch", "src", "{[tool.tox.docs]docs_dir}", "{[tool.tox.docs]build_dir}{/}live", ]] [tool.tox.env.update-actions] description = "update GitHub Actions pins" labels = ["update"] dependency_groups = ["gha-update"] skip_install = true commands = [["gha-update"]] [tool.tox.env.update-pre_commit] description = "update pre-commit pins" labels = ["update"] dependency_groups = ["pre-commit"] skip_install = true commands = [["pre-commit", "autoupdate", "--freeze", "-j4"]] [tool.tox.env.update-requirements] description = "update uv lock" labels = ["update"] dependency_groups = [] no_default_groups = true skip_install = true commands = [["uv", "lock", {replace = "posargs", default = ["-U"], extend = true}]]