From fead746c11d2bcea351021d9f3998db132e4b849 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:46:15 -0700 Subject: [PATCH] Drop support for Python 3.8 --- pyproject.toml | 3 +-- python_docs_theme/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4571a41..09e9bc3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ description = "The Sphinx theme for the CPython docs and related projects" readme = "README.md" license.file = "LICENSE" authors = [{name = "PyPA", email = "distutils-sig@python.org"}] -requires-python = ">=3.8" +requires-python = ">=3.9" classifiers = [ "Development Status :: 5 - Production/Stable", "Framework :: Sphinx :: Theme", @@ -20,7 +20,6 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "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", diff --git a/python_docs_theme/__init__.py b/python_docs_theme/__init__.py index 7b9df30..0ee7d25 100644 --- a/python_docs_theme/__init__.py +++ b/python_docs_theme/__init__.py @@ -2,7 +2,7 @@ import hashlib import os -from functools import lru_cache +from functools import cache from pathlib import Path from typing import Any @@ -12,7 +12,7 @@ THEME_PATH = Path(__file__).parent.resolve() -@lru_cache(maxsize=None) +@cache def _asset_hash(path: str) -> str: """Append a `?digest=` to an url based on the file content.""" full_path = THEME_PATH / path.replace("_static/", "static/")