python-docs-theme 2024.10__tar.gz → 2025.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/PKG-INFO +4 -2
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/README.md +1 -0
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/pyproject.toml +6 -1
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/__init__.py +15 -6
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/pydoctheme.css +21 -11
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/LICENSE +0 -0
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/footerdonate.html +0 -0
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/layout.html +0 -0
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/copybutton.js +0 -0
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/menu.js +0 -0
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/py.png +0 -0
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/py.svg +0 -0
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/pydoctheme_dark.css +0 -0
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/search-focus.js +0 -0
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/sidebar.js_t +0 -0
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/themetoggle.js +0 -0
- {python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/theme.conf +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: python-docs-theme
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2025.2
|
|
4
4
|
Summary: The Sphinx theme for the CPython docs and related projects
|
|
5
5
|
Author-email: PyPA <distutils-sig@python.org>
|
|
6
6
|
Requires-Python: >=3.9
|
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
20
|
Classifier: Topic :: Documentation
|
|
21
21
|
Classifier: Topic :: Software Development :: Documentation
|
|
22
|
+
Requires-Dist: sphinx>=3.4
|
|
22
23
|
Project-URL: Code, https://github.com/python/python-docs-theme
|
|
23
24
|
Project-URL: Download, https://pypi.org/project/python-docs-theme/
|
|
24
25
|
Project-URL: Homepage, https://github.com/python/python-docs-theme/
|
|
@@ -27,6 +28,7 @@ Project-URL: Issue tracker, https://github.com/python/python-docs-theme/issues
|
|
|
27
28
|
# Python Docs Sphinx Theme
|
|
28
29
|
|
|
29
30
|
This is the theme for the Python documentation.
|
|
31
|
+
It requires Python 3.9 or newer and Sphinx 3.4 or newer.
|
|
30
32
|
|
|
31
33
|
Note that when adopting this theme, you're also borrowing an element of the
|
|
32
34
|
trust and credibility established by the CPython core developers over the
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Python Docs Sphinx Theme
|
|
2
2
|
|
|
3
3
|
This is the theme for the Python documentation.
|
|
4
|
+
It requires Python 3.9 or newer and Sphinx 3.4 or newer.
|
|
4
5
|
|
|
5
6
|
Note that when adopting this theme, you're also borrowing an element of the
|
|
6
7
|
trust and credibility established by the CPython core developers over the
|
|
@@ -6,7 +6,6 @@ requires = [
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "python-docs-theme"
|
|
9
|
-
version = "2024.10"
|
|
10
9
|
description = "The Sphinx theme for the CPython docs and related projects"
|
|
11
10
|
readme = "README.md"
|
|
12
11
|
license.file = "LICENSE"
|
|
@@ -28,6 +27,12 @@ classifiers = [
|
|
|
28
27
|
"Topic :: Documentation",
|
|
29
28
|
"Topic :: Software Development :: Documentation",
|
|
30
29
|
]
|
|
30
|
+
dynamic = [ "version" ]
|
|
31
|
+
|
|
32
|
+
dependencies = [
|
|
33
|
+
"sphinx>=3.4",
|
|
34
|
+
]
|
|
35
|
+
|
|
31
36
|
urls.Code = "https://github.com/python/python-docs-theme"
|
|
32
37
|
urls.Download = "https://pypi.org/project/python-docs-theme/"
|
|
33
38
|
urls.Homepage = "https://github.com/python/python-docs-theme/"
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import hashlib
|
|
4
|
-
import os
|
|
5
4
|
from functools import cache
|
|
6
5
|
from pathlib import Path
|
|
7
|
-
from typing import Any
|
|
8
6
|
|
|
9
7
|
import sphinx.application
|
|
10
8
|
from sphinx.builders.html import StandaloneHTMLBuilder
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
TYPE_CHECKING = False
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from typing import Any
|
|
13
|
+
|
|
14
|
+
from sphinx.application import Sphinx
|
|
15
|
+
from sphinx.util.typing import ExtensionMetadata
|
|
16
|
+
|
|
17
|
+
__version__ = "2025.2"
|
|
18
|
+
|
|
19
|
+
THEME_PATH = Path(__file__).resolve().parent
|
|
13
20
|
|
|
14
21
|
|
|
15
22
|
@cache
|
|
@@ -52,13 +59,15 @@ def _html_page_context(
|
|
|
52
59
|
)
|
|
53
60
|
|
|
54
61
|
|
|
55
|
-
def setup(app):
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
def setup(app: Sphinx) -> ExtensionMetadata:
|
|
63
|
+
app.require_sphinx("3.4")
|
|
64
|
+
|
|
65
|
+
app.add_html_theme("python_docs_theme", str(THEME_PATH))
|
|
58
66
|
|
|
59
67
|
app.connect("html-page-context", _html_page_context)
|
|
60
68
|
|
|
61
69
|
return {
|
|
70
|
+
"version": __version__,
|
|
62
71
|
"parallel_read_safe": True,
|
|
63
72
|
"parallel_write_safe": True,
|
|
64
73
|
}
|
{python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/pydoctheme.css
RENAMED
|
@@ -140,6 +140,8 @@ span.pre {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
div.sphinxsidebar {
|
|
143
|
+
display: flex;
|
|
144
|
+
width: min(25vw, 350px);
|
|
143
145
|
float: none;
|
|
144
146
|
position: sticky;
|
|
145
147
|
top: 0;
|
|
@@ -156,13 +158,17 @@ div.sphinxsidebar h4 {
|
|
|
156
158
|
margin-top: 1.5em;
|
|
157
159
|
}
|
|
158
160
|
|
|
161
|
+
div.bodywrapper {
|
|
162
|
+
margin-left: min(25vw, 350px);
|
|
163
|
+
}
|
|
164
|
+
|
|
159
165
|
div.sphinxsidebarwrapper {
|
|
160
|
-
width: 217px;
|
|
161
166
|
box-sizing: border-box;
|
|
162
167
|
height: 100%;
|
|
163
168
|
overflow-x: hidden;
|
|
164
169
|
overflow-y: auto;
|
|
165
|
-
float:
|
|
170
|
+
float: none;
|
|
171
|
+
flex-grow: 1;
|
|
166
172
|
}
|
|
167
173
|
|
|
168
174
|
div.sphinxsidebarwrapper > h3:first-child {
|
|
@@ -191,6 +197,9 @@ div.sphinxsidebar input[type='text'] {
|
|
|
191
197
|
}
|
|
192
198
|
|
|
193
199
|
#sidebarbutton {
|
|
200
|
+
display: flex;
|
|
201
|
+
justify-content: center;
|
|
202
|
+
align-items: center;
|
|
194
203
|
/* Sphinx 4.x and earlier compat */
|
|
195
204
|
height: 100%;
|
|
196
205
|
background-color: #CCCCCC;
|
|
@@ -199,20 +208,14 @@ div.sphinxsidebar input[type='text'] {
|
|
|
199
208
|
font-size: 1.2em;
|
|
200
209
|
cursor: pointer;
|
|
201
210
|
padding-top: 1px;
|
|
202
|
-
float:
|
|
203
|
-
display: table;
|
|
211
|
+
float: none;
|
|
204
212
|
/* after Sphinx 4.x and earlier is dropped, only the below is needed */
|
|
205
213
|
width: 12px;
|
|
214
|
+
min-width: 12px;
|
|
206
215
|
border-radius: 0 5px 5px 0;
|
|
207
216
|
border-left: none;
|
|
208
217
|
}
|
|
209
218
|
|
|
210
|
-
#sidebarbutton span {
|
|
211
|
-
/* Sphinx 4.x and earlier compat */
|
|
212
|
-
display: table-cell;
|
|
213
|
-
vertical-align: middle;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
219
|
#sidebarbutton:hover {
|
|
217
220
|
background-color: #AAAAAA;
|
|
218
221
|
}
|
|
@@ -489,7 +492,7 @@ div.genindex-jumpbox a {
|
|
|
489
492
|
margin-inline-end: 0;
|
|
490
493
|
}
|
|
491
494
|
/* Remove sidebar and top related bar */
|
|
492
|
-
div.related, .sphinxsidebar {
|
|
495
|
+
div.related, div.sphinxsidebar {
|
|
493
496
|
display: none;
|
|
494
497
|
}
|
|
495
498
|
/* Anchorlinks are not hidden by fixed-positioned navbar when scrolled to */
|
|
@@ -754,3 +757,10 @@ div.deprecated-removed .versionmodified,
|
|
|
754
757
|
div.versionremoved .versionmodified {
|
|
755
758
|
color: var(--deprecated);
|
|
756
759
|
}
|
|
760
|
+
|
|
761
|
+
/* Hide header when printing */
|
|
762
|
+
@media print {
|
|
763
|
+
div.mobile-nav {
|
|
764
|
+
display: none;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/copybutton.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/pydoctheme_dark.css
RENAMED
|
File without changes
|
{python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/search-focus.js
RENAMED
|
File without changes
|
{python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/sidebar.js_t
RENAMED
|
File without changes
|
{python_docs_theme-2024.10 → python_docs_theme-2025.2}/python_docs_theme/static/themetoggle.js
RENAMED
|
File without changes
|
|
File without changes
|