Sphinx 8.0.0rc1__py3-none-any.whl → 8.0.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.
Potentially problematic release.
This version of Sphinx might be problematic. Click here for more details.
- sphinx/__init__.py +2 -2
- sphinx/application.py +5 -5
- sphinx/builders/linkcheck.py +3 -3
- sphinx/config.py +1 -1
- sphinx/environment/__init__.py +2 -1
- sphinx/highlighting.py +6 -0
- sphinx/locale/ar/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ar/LC_MESSAGES/sphinx.po +2383 -2186
- sphinx/locale/bg/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/bg/LC_MESSAGES/sphinx.po +2249 -2052
- sphinx/locale/bn/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/bn/LC_MESSAGES/sphinx.po +2412 -2215
- sphinx/locale/ca/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ca/LC_MESSAGES/sphinx.po +3029 -2832
- sphinx/locale/cak/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cak/LC_MESSAGES/sphinx.po +2308 -2111
- sphinx/locale/cs/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cs/LC_MESSAGES/sphinx.po +2469 -2272
- sphinx/locale/cy/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cy/LC_MESSAGES/sphinx.po +2393 -2196
- sphinx/locale/da/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/da/LC_MESSAGES/sphinx.po +2532 -2335
- sphinx/locale/de/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/de/LC_MESSAGES/sphinx.po +2492 -2295
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/locale/el/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/el/LC_MESSAGES/sphinx.po +2879 -2682
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.po +2989 -2792
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/locale/eo/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/eo/LC_MESSAGES/sphinx.po +2297 -2100
- sphinx/locale/es/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/es/LC_MESSAGES/sphinx.po +3017 -2820
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/locale/et/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/et/LC_MESSAGES/sphinx.po +2748 -2551
- sphinx/locale/eu/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/eu/LC_MESSAGES/sphinx.po +2459 -2262
- sphinx/locale/fa/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fa/LC_MESSAGES/sphinx.po +2957 -2760
- sphinx/locale/fi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fi/LC_MESSAGES/sphinx.po +2321 -2124
- sphinx/locale/fr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fr/LC_MESSAGES/sphinx.po +2977 -2780
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/locale/gl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/gl/LC_MESSAGES/sphinx.po +2992 -2795
- sphinx/locale/he/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/he/LC_MESSAGES/sphinx.po +2375 -2178
- sphinx/locale/hi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hi/LC_MESSAGES/sphinx.po +2937 -2740
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/locale/hr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hr/LC_MESSAGES/sphinx.po +2532 -2335
- sphinx/locale/hu/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hu/LC_MESSAGES/sphinx.po +2505 -2308
- sphinx/locale/id/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/id/LC_MESSAGES/sphinx.po +2925 -2728
- sphinx/locale/is/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/is/LC_MESSAGES/sphinx.po +2307 -2110
- sphinx/locale/it/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/it/LC_MESSAGES/sphinx.po +2514 -2317
- sphinx/locale/ja/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ja/LC_MESSAGES/sphinx.po +2970 -2773
- sphinx/locale/ka/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ka/LC_MESSAGES/sphinx.po +2868 -2671
- sphinx/locale/ko/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ko/LC_MESSAGES/sphinx.po +3016 -2819
- sphinx/locale/lt/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/lt/LC_MESSAGES/sphinx.po +2476 -2279
- sphinx/locale/lv/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/lv/LC_MESSAGES/sphinx.po +2477 -2280
- sphinx/locale/mk/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/mk/LC_MESSAGES/sphinx.po +2292 -2095
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po +2479 -2282
- sphinx/locale/ne/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ne/LC_MESSAGES/sphinx.po +2481 -2284
- sphinx/locale/nl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/nl/LC_MESSAGES/sphinx.po +2557 -2360
- sphinx/locale/pl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pl/LC_MESSAGES/sphinx.po +2696 -2499
- sphinx/locale/pt/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po +2979 -2782
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po +2469 -2272
- sphinx/locale/ro/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ro/LC_MESSAGES/sphinx.po +2473 -2276
- sphinx/locale/ru/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ru/LC_MESSAGES/sphinx.po +2746 -2549
- sphinx/locale/si/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/si/LC_MESSAGES/sphinx.po +2331 -2134
- sphinx/locale/sk/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sk/LC_MESSAGES/sphinx.po +2966 -2769
- sphinx/locale/sl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sl/LC_MESSAGES/sphinx.po +2404 -2207
- sphinx/locale/sphinx.pot +2262 -2065
- sphinx/locale/sq/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sq/LC_MESSAGES/sphinx.po +2972 -2775
- sphinx/locale/sr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sr/LC_MESSAGES/sphinx.po +2440 -2243
- sphinx/locale/sv/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sv/LC_MESSAGES/sphinx.po +2483 -2286
- sphinx/locale/te/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/te/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/locale/tr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/tr/LC_MESSAGES/sphinx.po +2892 -2695
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po +2400 -2203
- sphinx/locale/ur/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ur/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/locale/vi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/vi/LC_MESSAGES/sphinx.po +2422 -2225
- sphinx/locale/yue/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/yue/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po +3028 -2831
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.po +2250 -2053
- sphinx/project.py +5 -4
- sphinx/util/_pathlib.py +132 -0
- sphinx/util/osutil.py +8 -5
- {sphinx-8.0.0rc1.dist-info → sphinx-8.0.2.dist-info}/METADATA +3 -3
- {sphinx-8.0.0rc1.dist-info → sphinx-8.0.2.dist-info}/RECORD +141 -140
- {sphinx-8.0.0rc1.dist-info → sphinx-8.0.2.dist-info}/LICENSE.rst +0 -0
- {sphinx-8.0.0rc1.dist-info → sphinx-8.0.2.dist-info}/WHEEL +0 -0
- {sphinx-8.0.0rc1.dist-info → sphinx-8.0.2.dist-info}/entry_points.txt +0 -0
sphinx/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""The Sphinx documentation toolchain."""
|
|
2
2
|
|
|
3
|
-
__version__ = '8.0.
|
|
3
|
+
__version__ = '8.0.2'
|
|
4
4
|
__display_version__ = __version__ # used for command line version
|
|
5
5
|
|
|
6
6
|
# Keep this file executable as-is in Python 3!
|
|
@@ -27,7 +27,7 @@ warnings.filterwarnings(
|
|
|
27
27
|
#:
|
|
28
28
|
#: .. versionadded:: 1.2
|
|
29
29
|
#: Before version 1.2, check the string ``sphinx.__version__``.
|
|
30
|
-
version_info = (8, 0,
|
|
30
|
+
version_info = (8, 0, 2, 'final', 0)
|
|
31
31
|
|
|
32
32
|
package_dir = os.path.abspath(os.path.dirname(__file__))
|
|
33
33
|
|
sphinx/application.py
CHANGED
|
@@ -13,7 +13,6 @@ from collections import deque
|
|
|
13
13
|
from collections.abc import Callable, Collection, Sequence # NoQA: TCH003
|
|
14
14
|
from io import StringIO
|
|
15
15
|
from os import path
|
|
16
|
-
from pathlib import Path
|
|
17
16
|
from typing import IO, TYPE_CHECKING, Any, Literal
|
|
18
17
|
|
|
19
18
|
from docutils.nodes import TextElement # NoQA: TCH002
|
|
@@ -32,6 +31,7 @@ from sphinx.locale import __
|
|
|
32
31
|
from sphinx.project import Project
|
|
33
32
|
from sphinx.registry import SphinxComponentRegistry
|
|
34
33
|
from sphinx.util import docutils, logging
|
|
34
|
+
from sphinx.util._pathlib import _StrPath
|
|
35
35
|
from sphinx.util.build_phase import BuildPhase
|
|
36
36
|
from sphinx.util.console import bold
|
|
37
37
|
from sphinx.util.display import progress_message
|
|
@@ -173,9 +173,9 @@ class Sphinx:
|
|
|
173
173
|
self.registry = SphinxComponentRegistry()
|
|
174
174
|
|
|
175
175
|
# validate provided directories
|
|
176
|
-
self.srcdir =
|
|
177
|
-
self.outdir =
|
|
178
|
-
self.doctreedir =
|
|
176
|
+
self.srcdir = _StrPath(srcdir).resolve()
|
|
177
|
+
self.outdir = _StrPath(outdir).resolve()
|
|
178
|
+
self.doctreedir = _StrPath(doctreedir).resolve()
|
|
179
179
|
|
|
180
180
|
if not path.isdir(self.srcdir):
|
|
181
181
|
raise ApplicationError(__('Cannot find source directory (%s)') %
|
|
@@ -231,7 +231,7 @@ class Sphinx:
|
|
|
231
231
|
self.confdir = self.srcdir
|
|
232
232
|
self.config = Config({}, confoverrides or {})
|
|
233
233
|
else:
|
|
234
|
-
self.confdir =
|
|
234
|
+
self.confdir = _StrPath(confdir).resolve()
|
|
235
235
|
self.config = Config.read(self.confdir, confoverrides or {}, self.tags)
|
|
236
236
|
|
|
237
237
|
# set up translation infrastructure
|
sphinx/builders/linkcheck.py
CHANGED
|
@@ -28,13 +28,13 @@ from sphinx.util.nodes import get_node_line
|
|
|
28
28
|
|
|
29
29
|
if TYPE_CHECKING:
|
|
30
30
|
from collections.abc import Callable, Iterator
|
|
31
|
-
from pathlib import Path
|
|
32
31
|
from typing import Any
|
|
33
32
|
|
|
34
33
|
from requests import Response
|
|
35
34
|
|
|
36
35
|
from sphinx.application import Sphinx
|
|
37
36
|
from sphinx.config import Config
|
|
37
|
+
from sphinx.util._pathlib import _StrPath
|
|
38
38
|
from sphinx.util.typing import ExtensionMetadata
|
|
39
39
|
|
|
40
40
|
logger = logging.getLogger(__name__)
|
|
@@ -150,7 +150,7 @@ class CheckExternalLinksBuilder(DummyBuilder):
|
|
|
150
150
|
self.json_outfile.write(json.dumps(data))
|
|
151
151
|
self.json_outfile.write('\n')
|
|
152
152
|
|
|
153
|
-
def write_entry(self, what: str, docname: str, filename:
|
|
153
|
+
def write_entry(self, what: str, docname: str, filename: _StrPath, line: int,
|
|
154
154
|
uri: str) -> None:
|
|
155
155
|
self.txt_outfile.write(f'{filename}:{line}: [{what}] {uri}\n')
|
|
156
156
|
|
|
@@ -226,7 +226,7 @@ class HyperlinkCollector(SphinxPostTransform):
|
|
|
226
226
|
class Hyperlink(NamedTuple):
|
|
227
227
|
uri: str
|
|
228
228
|
docname: str
|
|
229
|
-
docpath:
|
|
229
|
+
docpath: _StrPath
|
|
230
230
|
lineno: int
|
|
231
231
|
|
|
232
232
|
|
sphinx/config.py
CHANGED
|
@@ -590,7 +590,7 @@ def convert_source_suffix(app: Sphinx, config: Config) -> None:
|
|
|
590
590
|
logger.info(__("Converting `source_suffix = %r` to `source_suffix = %r`."),
|
|
591
591
|
source_suffix, config.source_suffix)
|
|
592
592
|
elif not isinstance(source_suffix, dict):
|
|
593
|
-
msg = __("The config value `source_suffix' expects a dictionary,"
|
|
593
|
+
msg = __("The config value `source_suffix' expects a dictionary, "
|
|
594
594
|
"a string, or a list of strings. Got `%r' instead (type %s).")
|
|
595
595
|
raise ConfigError(msg % (source_suffix, type(source_suffix)))
|
|
596
596
|
|
sphinx/environment/__init__.py
CHANGED
|
@@ -36,6 +36,7 @@ if TYPE_CHECKING:
|
|
|
36
36
|
from sphinx.domains import Domain
|
|
37
37
|
from sphinx.events import EventManager
|
|
38
38
|
from sphinx.project import Project
|
|
39
|
+
from sphinx.util._pathlib import _StrPath
|
|
39
40
|
|
|
40
41
|
logger = logging.getLogger(__name__)
|
|
41
42
|
|
|
@@ -413,7 +414,7 @@ class BuildEnvironment:
|
|
|
413
414
|
"""
|
|
414
415
|
return self.project.path2doc(filename)
|
|
415
416
|
|
|
416
|
-
def doc2path(self, docname: str, base: bool = True) ->
|
|
417
|
+
def doc2path(self, docname: str, base: bool = True) -> _StrPath:
|
|
417
418
|
"""Return the filename for the document name.
|
|
418
419
|
|
|
419
420
|
If *base* is True, return absolute path under self.srcdir.
|
sphinx/highlighting.py
CHANGED
|
@@ -6,6 +6,7 @@ from functools import partial
|
|
|
6
6
|
from importlib import import_module
|
|
7
7
|
from typing import TYPE_CHECKING, Any
|
|
8
8
|
|
|
9
|
+
import pygments
|
|
9
10
|
from pygments import highlight
|
|
10
11
|
from pygments.filters import ErrorToken
|
|
11
12
|
from pygments.formatters import HtmlFormatter, LatexFormatter
|
|
@@ -30,6 +31,11 @@ if TYPE_CHECKING:
|
|
|
30
31
|
from pygments.lexer import Lexer
|
|
31
32
|
from pygments.style import Style
|
|
32
33
|
|
|
34
|
+
if tuple(map(int, pygments.__version__.split('.')))[:2] < (2, 18):
|
|
35
|
+
from pygments.formatter import Formatter # NoQA: F811
|
|
36
|
+
|
|
37
|
+
Formatter.__class_getitem__ = classmethod(lambda cls, name: cls) # type: ignore[attr-defined]
|
|
38
|
+
|
|
33
39
|
logger = logging.getLogger(__name__)
|
|
34
40
|
|
|
35
41
|
lexers: dict[str, Lexer] = {}
|
|
Binary file
|