Skip to content

Commit 54c28a5

Browse files
committed
Require Sphinx 7.3+
1 parent 7c199fa commit 54c28a5

File tree

5 files changed

+48
-45
lines changed

5 files changed

+48
-45
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Python Docs Sphinx Theme
22

33
This is the theme for the Python documentation.
4-
It requires Python 3.10 or newer and Sphinx 7.2 or newer.
4+
It requires Python 3.10 or newer and Sphinx 7.3 or newer.
55

66
Note that when adopting this theme, you're also borrowing an element of the
77
trust and credibility established by the CPython core developers over the

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ classifiers = [
2828
"Topic :: Software Development :: Documentation",
2929
]
3030
dependencies = [
31-
"sphinx>=7.2",
31+
"sphinx>=7.3",
3232
]
3333

3434
urls.Code = "https://github.com/python/python-docs-theme"

python_docs_theme/__init__.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
from __future__ import annotations
22

3-
import os
43
from pathlib import Path
4+
from typing import TYPE_CHECKING
55

6-
THEME_PATH = Path(__file__).parent.resolve()
6+
if TYPE_CHECKING:
7+
from sphinx.application import Sphinx
8+
from sphinx.util.typing import ExtensionMetadata
79

10+
THEME_PATH = Path(__file__).resolve().parent
811

9-
def setup(app):
10-
app.require_sphinx("7.2")
1112

12-
current_dir = os.path.abspath(os.path.dirname(__file__))
13-
app.add_html_theme("python_docs_theme", current_dir)
13+
def setup(app: Sphinx) -> ExtensionMetadata:
14+
app.require_sphinx("7.3")
15+
app.add_html_theme("python_docs_theme", THEME_PATH)
1416

1517
return {
1618
"version": "2024.12",

python_docs_theme/theme.conf

Lines changed: 0 additions & 37 deletions
This file was deleted.

python_docs_theme/theme.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[theme]
2+
inherit = "default"
3+
stylesheets = [
4+
"pydoctheme.css",
5+
]
6+
pygments_style = { default = "default", dark = "monokai" }
7+
8+
[options]
9+
bodyfont = "-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"
10+
headfont = "-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"
11+
footerbgcolor = "white"
12+
footertextcolor = "#555555"
13+
relbarbgcolor = "white"
14+
relbartextcolor = "#666666"
15+
relbarlinkcolor = "#444444"
16+
sidebarbgcolor = "white"
17+
sidebartextcolor = "#444444"
18+
sidebarlinkcolor = "#444444"
19+
sidebarbtncolor = "#cccccc"
20+
bgcolor = "white"
21+
textcolor = "#222222"
22+
linkcolor = "#0090c0"
23+
visitedlinkcolor = "#00608f"
24+
headtextcolor = "#1a1a1a"
25+
headbgcolor = "white"
26+
headlinkcolor = "#aaaaaa"
27+
codebgcolor = "#eeffcc"
28+
codetextcolor = "#333333"
29+
30+
hosted_on = ""
31+
issues_url = ""
32+
license_url = ""
33+
root_name = "Python"
34+
root_url = "https://www.python.org/"
35+
root_icon = "py.svg"
36+
root_icon_alt_text = "Python logo"
37+
root_include_title = "True"
38+
copyright_url = ""

0 commit comments

Comments
 (0)