From 01d5bcf0524663037ae68bbcea1248ce5238ce00 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Tue, 28 Jan 2025 01:40:31 +0000 Subject: [PATCH] Note minimum requirements for Sphinx (#216) --- .pre-commit-config.yaml | 14 +++++++------- README.md | 1 + pyproject.toml | 4 ++++ python_docs_theme/__init__.py | 2 ++ 4 files changed, 14 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 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/" 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)