python-docs-theme 2024.4__tar.gz → 2024.10__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.4 → python_docs_theme-2024.10}/PKG-INFO +2 -3
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/pyproject.toml +31 -13
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/__init__.py +3 -3
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/pydoctheme.css +97 -12
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/pydoctheme_dark.css +36 -7
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/LICENSE +0 -0
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/README.md +0 -0
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/footerdonate.html +0 -0
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/layout.html +0 -0
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/copybutton.js +0 -0
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/menu.js +0 -0
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/py.png +0 -0
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/py.svg +0 -0
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/search-focus.js +0 -0
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/sidebar.js_t +0 -0
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/themetoggle.js +0 -0
- {python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/theme.conf +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-docs-theme
|
|
3
|
-
Version: 2024.
|
|
3
|
+
Version: 2024.10
|
|
4
4
|
Summary: The Sphinx theme for the CPython docs and related projects
|
|
5
5
|
Author-email: PyPA <distutils-sig@python.org>
|
|
6
|
-
Requires-Python: >=3.
|
|
6
|
+
Requires-Python: >=3.9
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
Classifier: Development Status :: 5 - Production/Stable
|
|
9
9
|
Classifier: Framework :: Sphinx :: Theme
|
|
@@ -12,7 +12,6 @@ Classifier: License :: OSI Approved :: Python Software Foundation License
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
[build-system]
|
|
2
2
|
build-backend = "flit_core.buildapi"
|
|
3
3
|
requires = [
|
|
4
|
-
"
|
|
4
|
+
"flit-core>=3.7",
|
|
5
5
|
]
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "python-docs-theme"
|
|
9
|
-
version = "2024.
|
|
9
|
+
version = "2024.10"
|
|
10
10
|
description = "The Sphinx theme for the CPython docs and related projects"
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
license.file = "LICENSE"
|
|
13
|
-
authors = [{name = "PyPA", email = "distutils-sig@python.org"}]
|
|
14
|
-
requires-python = ">=3.
|
|
13
|
+
authors = [ { name = "PyPA", email = "distutils-sig@python.org" } ]
|
|
14
|
+
requires-python = ">=3.9"
|
|
15
15
|
classifiers = [
|
|
16
16
|
"Development Status :: 5 - Production/Stable",
|
|
17
17
|
"Framework :: Sphinx :: Theme",
|
|
@@ -20,7 +20,6 @@ classifiers = [
|
|
|
20
20
|
"Operating System :: OS Independent",
|
|
21
21
|
"Programming Language :: Python",
|
|
22
22
|
"Programming Language :: Python :: 3 :: Only",
|
|
23
|
-
"Programming Language :: Python :: 3.8",
|
|
24
23
|
"Programming Language :: Python :: 3.9",
|
|
25
24
|
"Programming Language :: Python :: 3.10",
|
|
26
25
|
"Programming Language :: Python :: 3.11",
|
|
@@ -33,17 +32,36 @@ urls.Code = "https://github.com/python/python-docs-theme"
|
|
|
33
32
|
urls.Download = "https://pypi.org/project/python-docs-theme/"
|
|
34
33
|
urls.Homepage = "https://github.com/python/python-docs-theme/"
|
|
35
34
|
urls."Issue tracker" = "https://github.com/python/python-docs-theme/issues"
|
|
36
|
-
|
|
37
|
-
python_docs_theme = 'python_docs_theme'
|
|
35
|
+
entry-points."sphinx.html_themes".python_docs_theme = "python_docs_theme"
|
|
38
36
|
|
|
39
37
|
[tool.flit.module]
|
|
40
38
|
name = "python_docs_theme"
|
|
41
39
|
|
|
42
40
|
[tool.flit.sdist]
|
|
43
|
-
include = [
|
|
44
|
-
|
|
45
|
-
]
|
|
41
|
+
include = [ "python_docs_theme/" ]
|
|
42
|
+
|
|
43
|
+
[tool.ruff]
|
|
44
|
+
fix = true
|
|
46
45
|
|
|
47
|
-
[
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
lint.select = [
|
|
47
|
+
"C4", # flake8-comprehensions
|
|
48
|
+
"E", # pycodestyle errors
|
|
49
|
+
"F", # pyflakes errors
|
|
50
|
+
"I", # isort
|
|
51
|
+
"ISC", # flake8-implicit-str-concat
|
|
52
|
+
"LOG", # flake8-logging
|
|
53
|
+
"PGH", # pygrep-hooks
|
|
54
|
+
"PYI", # flake8-pyi
|
|
55
|
+
"RUF022", # unsorted-dunder-all
|
|
56
|
+
"RUF100", # unused noqa (yesqa)
|
|
57
|
+
"UP", # pyupgrade
|
|
58
|
+
"W", # pycodestyle warnings
|
|
59
|
+
"YTT", # flake8-2020
|
|
60
|
+
]
|
|
61
|
+
lint.ignore = [
|
|
62
|
+
"E203", # Whitespace before ':'
|
|
63
|
+
"E221", # Multiple spaces before operator
|
|
64
|
+
"E226", # Missing whitespace around arithmetic operator
|
|
65
|
+
"E241", # Multiple spaces after ','
|
|
66
|
+
]
|
|
67
|
+
lint.isort.required-imports = [ "from __future__ import annotations" ]
|
|
@@ -2,7 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import hashlib
|
|
4
4
|
import os
|
|
5
|
-
from functools import
|
|
5
|
+
from functools import cache
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
from typing import Any
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ from sphinx.builders.html import StandaloneHTMLBuilder
|
|
|
12
12
|
THEME_PATH = Path(__file__).parent.resolve()
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@
|
|
15
|
+
@cache
|
|
16
16
|
def _asset_hash(path: str) -> str:
|
|
17
17
|
"""Append a `?digest=` to an url based on the file content."""
|
|
18
18
|
full_path = THEME_PATH / path.replace("_static/", "static/")
|
|
@@ -24,7 +24,7 @@ def _asset_hash(path: str) -> str:
|
|
|
24
24
|
def _add_asset_hashes(static: list[str], add_digest_to: list[str]) -> None:
|
|
25
25
|
for asset in add_digest_to:
|
|
26
26
|
index = static.index(asset)
|
|
27
|
-
static[index].filename = _asset_hash(asset) # type: ignore
|
|
27
|
+
static[index].filename = _asset_hash(asset) # type: ignore[attr-defined]
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
def _html_page_context(
|
{python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/pydoctheme.css
RENAMED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
@import url('classic.css');
|
|
2
2
|
|
|
3
|
+
/* Common colours */
|
|
4
|
+
:root {
|
|
5
|
+
--good-color: rgb(41 100 51);
|
|
6
|
+
--good-border: rgb(79 196 100);
|
|
7
|
+
--middle-color: rgb(133 72 38);
|
|
8
|
+
--middle-border: rgb(244, 227, 76);
|
|
9
|
+
--bad-color: rgb(159 49 51);
|
|
10
|
+
--bad-border: rgb(244, 76, 78);
|
|
11
|
+
}
|
|
12
|
+
|
|
3
13
|
/* unset some styles from the classic stylesheet */
|
|
4
14
|
div.document,
|
|
5
15
|
div.body,
|
|
@@ -232,7 +242,76 @@ div.body pre {
|
|
|
232
242
|
border: 1px solid #ac9;
|
|
233
243
|
}
|
|
234
244
|
|
|
235
|
-
|
|
245
|
+
/* Admonitions */
|
|
246
|
+
:root {
|
|
247
|
+
--admonition-background: #eee;
|
|
248
|
+
--admonition-border: #ccc;
|
|
249
|
+
--admonition-color: black;
|
|
250
|
+
--attention-background: #bbddff5c;
|
|
251
|
+
--attention-border: #0000ff36;
|
|
252
|
+
--caution-background: #ffc;
|
|
253
|
+
--caution-border: #dd6;
|
|
254
|
+
--danger-background: #ffe4e4;
|
|
255
|
+
--danger-border: red;
|
|
256
|
+
--error-background: #ffe4e4;
|
|
257
|
+
--error-border: red;
|
|
258
|
+
--hint-background: #dfd;
|
|
259
|
+
--hint-border: green;
|
|
260
|
+
--seealso-background: #ffc;
|
|
261
|
+
--seealso-border: #dd6;
|
|
262
|
+
--tip-background: #dfd;
|
|
263
|
+
--tip-border: green;
|
|
264
|
+
--warning-background: #ffe4e4;
|
|
265
|
+
--warning-border: red;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
div.body div.admonition {
|
|
269
|
+
background-color: var(--admonition-background);
|
|
270
|
+
border: 1px solid var(--admonition-border);
|
|
271
|
+
border-radius: 3px;
|
|
272
|
+
color: var(--admonition-color);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
div.body div.admonition.attention {
|
|
276
|
+
background-color: var(--attention-background);
|
|
277
|
+
border-color: var(--attention-border);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
div.body div.admonition.caution {
|
|
281
|
+
background-color: var(--caution-background);
|
|
282
|
+
border-color: var(--caution-border);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
div.body div.admonition.danger {
|
|
286
|
+
background-color: var(--danger-background);
|
|
287
|
+
border-color: var(--danger-border);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
div.body div.admonition.error {
|
|
291
|
+
background-color: var(--error-background);
|
|
292
|
+
border-color: var(--error-border);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
div.body div.admonition.hint {
|
|
296
|
+
background-color: var(--hint-background);
|
|
297
|
+
border-color: var(--hint-border);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
div.body div.admonition.seealso {
|
|
301
|
+
background-color: var(--seealso-background);
|
|
302
|
+
border-color: var(--seealso-border);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
div.body div.admonition.tip {
|
|
306
|
+
background-color: var(--tip-background);
|
|
307
|
+
border-color: var(--tip-border);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
div.body div.admonition.warning {
|
|
311
|
+
background-color: var(--warning-background);
|
|
312
|
+
border-color: var(--warning-border);
|
|
313
|
+
}
|
|
314
|
+
|
|
236
315
|
div.body div.impl-detail {
|
|
237
316
|
border-radius: 3px;
|
|
238
317
|
}
|
|
@@ -241,10 +320,6 @@ div.body div.impl-detail > p {
|
|
|
241
320
|
margin: 0;
|
|
242
321
|
}
|
|
243
322
|
|
|
244
|
-
div.body div.seealso {
|
|
245
|
-
border: 1px solid #dddd66;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
323
|
div.body a {
|
|
249
324
|
color: #0072aa;
|
|
250
325
|
}
|
|
@@ -323,8 +398,18 @@ div.footer a:hover {
|
|
|
323
398
|
color: #0095c4;
|
|
324
399
|
}
|
|
325
400
|
|
|
401
|
+
/* C API return value annotations */
|
|
402
|
+
:root {
|
|
403
|
+
--refcount: var(--good-color);
|
|
404
|
+
--refcount-return-borrowed-ref: var(--middle-color);
|
|
405
|
+
}
|
|
406
|
+
|
|
326
407
|
.refcount {
|
|
327
|
-
color:
|
|
408
|
+
color: var(--refcount);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.refcount.return_borrowed_ref {
|
|
412
|
+
color: var(--refcount-return-borrowed-ref)
|
|
328
413
|
}
|
|
329
414
|
|
|
330
415
|
.stableabi {
|
|
@@ -625,13 +710,13 @@ div.genindex-jumpbox a {
|
|
|
625
710
|
|
|
626
711
|
/* Version change directives */
|
|
627
712
|
:root {
|
|
628
|
-
--versionadded:
|
|
629
|
-
--versionchanged:
|
|
630
|
-
--deprecated:
|
|
713
|
+
--versionadded: var(--good-color);
|
|
714
|
+
--versionchanged: var(--middle-color);
|
|
715
|
+
--deprecated: var(--bad-color);
|
|
631
716
|
|
|
632
|
-
--versionadded-border:
|
|
633
|
-
--versionchanged-border:
|
|
634
|
-
--deprecated-border:
|
|
717
|
+
--versionadded-border: var(--good-border);
|
|
718
|
+
--versionchanged-border: var(--middle-border);
|
|
719
|
+
--deprecated-border: var(--bad-border);
|
|
635
720
|
}
|
|
636
721
|
|
|
637
722
|
div.versionadded,
|
{python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/pydoctheme_dark.css
RENAMED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/* Common colours */
|
|
2
|
+
:root {
|
|
3
|
+
--good-color: rgb(79 196 100);
|
|
4
|
+
--good-border: var(--good-color);
|
|
5
|
+
--middle-color: rgb(244, 227, 76);
|
|
6
|
+
--middle-border: var(--middle-color);
|
|
7
|
+
--bad-color: rgb(244, 76, 78);
|
|
8
|
+
--bad-border: var(--bad-color);
|
|
9
|
+
}
|
|
10
|
+
|
|
1
11
|
|
|
2
12
|
/* Browser elements */
|
|
3
13
|
:root {
|
|
@@ -79,10 +89,6 @@ table.docutils th {
|
|
|
79
89
|
background-color: #424242;
|
|
80
90
|
}
|
|
81
91
|
|
|
82
|
-
.refcount {
|
|
83
|
-
color: #afa;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
92
|
.stableabi {
|
|
87
93
|
color: #bbf;
|
|
88
94
|
}
|
|
@@ -107,6 +113,29 @@ div.warning {
|
|
|
107
113
|
background-color: rgba(255, 0, 0, 0.5);
|
|
108
114
|
}
|
|
109
115
|
|
|
116
|
+
/* Admonitions */
|
|
117
|
+
:root {
|
|
118
|
+
--admonition-background: #ffffff1a;
|
|
119
|
+
--admonition-border: currentColor;
|
|
120
|
+
--admonition-color: #ffffffde;
|
|
121
|
+
--attention-background: #ffffff1a;
|
|
122
|
+
--attention-border: currentColor;
|
|
123
|
+
--caution-background: #ffff001a;
|
|
124
|
+
--caution-border: #dd6;
|
|
125
|
+
--danger-background: #f003;
|
|
126
|
+
--danger-border: #f66;
|
|
127
|
+
--error-background: #f003;
|
|
128
|
+
--error-border: #f66;
|
|
129
|
+
--hint-background: #0044117a;
|
|
130
|
+
--hint-border: green;
|
|
131
|
+
--seealso-background: #ffff001a;
|
|
132
|
+
--seealso-border: #dd6;
|
|
133
|
+
--tip-background: #0044117a;
|
|
134
|
+
--tip-border: green;
|
|
135
|
+
--warning-background: #ff000033;
|
|
136
|
+
--warning-border: #ff6666;
|
|
137
|
+
}
|
|
138
|
+
|
|
110
139
|
aside.topic,
|
|
111
140
|
div.topic,
|
|
112
141
|
div.note,
|
|
@@ -143,7 +172,7 @@ img.invert-in-dark-mode {
|
|
|
143
172
|
|
|
144
173
|
/* Version change directives */
|
|
145
174
|
:root {
|
|
146
|
-
--versionadded:
|
|
147
|
-
--versionchanged:
|
|
148
|
-
--deprecated:
|
|
175
|
+
--versionadded: var(--good-color);
|
|
176
|
+
--versionchanged: var(--middle-color);
|
|
177
|
+
--deprecated: var(--bad-color);
|
|
149
178
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/copybutton.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/search-focus.js
RENAMED
|
File without changes
|
{python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/sidebar.js_t
RENAMED
|
File without changes
|
{python_docs_theme-2024.4 → python_docs_theme-2024.10}/python_docs_theme/static/themetoggle.js
RENAMED
|
File without changes
|
|
File without changes
|