From 2f4ab2453f2af5e23bfa5683162131cbf6715370 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Mon, 27 Jan 2025 18:38:41 +0000 Subject: [PATCH 1/3] Note minimum requirements for Sphinx --- README.md | 1 + pyproject.toml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index f77b491..24308f7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Python Docs Sphinx Theme This is the theme for the Python documentation. +It requires Python 3.9 or newer and Sphinx 3.4 or newer. Note that when adopting this theme, you're also borrowing an element of the trust and credibility established by the CPython core developers over the diff --git a/pyproject.toml b/pyproject.toml index 9b7c60f..1b34d90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,10 @@ classifiers = [ "Topic :: Documentation", "Topic :: Software Development :: Documentation", ] +dependencies = [ + "sphinx>=3.4", +] + urls.Code = "https://github.com/python/python-docs-theme" urls.Download = "https://pypi.org/project/python-docs-theme/" urls.Homepage = "https://github.com/python/python-docs-theme/" From 74f3ff8ef3664f5e9253cc4d5b91ae95f48f031c Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Mon, 27 Jan 2025 18:44:23 +0000 Subject: [PATCH 2/3] Update pre-commit to fix a warning --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 071ad40..f964364 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,17 +1,17 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.8 + rev: v0.9.3 hooks: - id: ruff args: [--exit-non-zero-on-fix] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-case-conflict - id: check-merge-conflict @@ -22,24 +22,24 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.2 + rev: 0.31.0 hooks: - id: check-dependabot - id: check-github-workflows - repo: https://github.com/rhysd/actionlint - rev: v1.7.2 + rev: v1.7.7 hooks: - id: actionlint - repo: https://github.com/tox-dev/pyproject-fmt - rev: 2.2.4 + rev: v2.5.0 hooks: - id: pyproject-fmt args: [--max-supported-python=3.13] - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.20.2 + rev: v0.23 hooks: - id: validate-pyproject From 4eaf0051b5d083924e1af1888472f605b4012691 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Mon, 27 Jan 2025 18:57:06 +0000 Subject: [PATCH 3/3] Enforce runtime requirements --- python_docs_theme/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python_docs_theme/__init__.py b/python_docs_theme/__init__.py index 0ee7d25..295c1c5 100644 --- a/python_docs_theme/__init__.py +++ b/python_docs_theme/__init__.py @@ -53,6 +53,8 @@ def _html_page_context( def setup(app): + app.require_sphinx("3.4") + current_dir = os.path.abspath(os.path.dirname(__file__)) app.add_html_theme("python_docs_theme", current_dir)