python-docs-theme 2024.12__py3-none-any.whl → 2025.2__py3-none-any.whl

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.
@@ -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
- THEME_PATH = Path(__file__).parent.resolve()
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
- current_dir = os.path.abspath(os.path.dirname(__file__))
57
- app.add_html_theme("python_docs_theme", current_dir)
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
  }
@@ -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: left;
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: right;
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 */
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: python-docs-theme
3
- Version: 2024.12
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,4 +1,4 @@
1
- python_docs_theme/__init__.py,sha256=y9oW_V56hYBi9-aRpCvmHNwsbkAWeTog39_y844Aau8,1806
1
+ python_docs_theme/__init__.py,sha256=iAcK7Elf4JUzoTWAZ3rK5Ox7TDJK8X8NabQ6v6Qq6y8,1996
2
2
  python_docs_theme/footerdonate.html,sha256=SVxLBvbrliqOzjau4SdhhtkRGXxX5ZrZN6Yr6luRhIQ,184
3
3
  python_docs_theme/layout.html,sha256=W5gSelJr85H5a1uaSPUDFoONpaGscpqdJkKszq5t95E,7891
4
4
  python_docs_theme/theme.conf,sha256=y8hpLRiQymGaL7AuTvXRxmhUMk6I3ehHCh5fUWbfD88,1040
@@ -6,13 +6,13 @@ python_docs_theme/static/copybutton.js,sha256=LSeNL29gDNKg3fv4rfcb8t-8xkH6HozpCb
6
6
  python_docs_theme/static/menu.js,sha256=JmrKD08_6CiCgQH32As9AgiSiV-th1fZInVrmTCihzA,2137
7
7
  python_docs_theme/static/py.png,sha256=rhc9xIQjUfwcilUa-9tYyyspVJB4ITDapPNZpqgNclY,695
8
8
  python_docs_theme/static/py.svg,sha256=WGW-i8wK-IhZSQPqARL2yNkjxXJsQIHoyFYRDMcznO8,2041
9
- python_docs_theme/static/pydoctheme.css,sha256=WGiCyjamvtiso6O1GheSCSJwMSOk5AgsK6cNChUzv_s,15405
9
+ python_docs_theme/static/pydoctheme.css,sha256=4ctRAZBn9yhKtvFKxDL5PPQSIQFT9UguuB9roGToPe4,15467
10
10
  python_docs_theme/static/pydoctheme_dark.css,sha256=NJ3l0yMhn_hH3CPJ5f_DwxxSr6j4OHHEvaxzkM9Yy2k,3252
11
11
  python_docs_theme/static/search-focus.js,sha256=DwWV71ssKvrzagPenP7yLvFQCdyqFJirbBk1PFRvVoA,559
12
12
  python_docs_theme/static/sidebar.js_t,sha256=swTyAoy6dNGm6Ro0_iRl_9ujRrIz5nq207tMIqNnYgs,3350
13
13
  python_docs_theme/static/themetoggle.js,sha256=6D1LE0wg8DjPP776_KxPCxXdIk-gGJJX5DYpHFLG1Uw,779
14
- python_docs_theme-2024.12.dist-info/entry_points.txt,sha256=VqpxCWQkYo2DkZVV2D2vA9LKmexR1Yhicqsrff4JAag,58
15
- python_docs_theme-2024.12.dist-info/LICENSE,sha256=lx_9CsorlYBu9cw97FX-A1VnHHmrwk-H-jydZBJlWmY,2460
16
- python_docs_theme-2024.12.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
17
- python_docs_theme-2024.12.dist-info/METADATA,sha256=-wlKqyW379XvHkcLOLG_lvgTXeUvBTqk0JWvRZZu_jM,2294
18
- python_docs_theme-2024.12.dist-info/RECORD,,
14
+ python_docs_theme-2025.2.dist-info/entry_points.txt,sha256=VqpxCWQkYo2DkZVV2D2vA9LKmexR1Yhicqsrff4JAag,58
15
+ python_docs_theme-2025.2.dist-info/LICENSE,sha256=lx_9CsorlYBu9cw97FX-A1VnHHmrwk-H-jydZBJlWmY,2460
16
+ python_docs_theme-2025.2.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
17
+ python_docs_theme-2025.2.dist-info/METADATA,sha256=YaQ5cf3Rz81isdduvkbEs3R6QNXIvvo3zycrrf0LsJE,2377
18
+ python_docs_theme-2025.2.dist-info/RECORD,,