Skip to content

Commit 5067eb9

Browse files
committed
Merge branch 'refs/heads/master' into tutorial-autodoc-parallel
2 parents 333c1b3 + 0d1e41f commit 5067eb9

File tree

148 files changed

+56838
-52994
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+56838
-52994
lines changed

CHANGES.rst

+110-42
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,62 @@
1-
Release 7.3.0 (in development)
1+
Release 7.3.5 (in development)
22
==============================
33

4+
Bugs fixed
5+
----------
6+
7+
8+
Release 7.3.4 (released Apr 17, 2024)
9+
=====================================
10+
11+
Bugs fixed
12+
----------
13+
14+
* Handle cases when ``Any`` is not an instance of ``type``.
15+
Patch by Adam Turner.
16+
17+
Release 7.3.3 (released Apr 17, 2024)
18+
=====================================
19+
20+
Bugs fixed
21+
----------
22+
23+
* #12290: Fix a false-positive warning when setting a configuration value
24+
with ``Any`` as the valid type to a type other than the value's default.
25+
Patch by Adam Turner.
26+
27+
Release 7.3.2 (released Apr 17, 2024)
28+
=====================================
29+
30+
Bugs fixed
31+
----------
32+
33+
* Preload all themes defined via entry points.
34+
Patch by Adam Turner.
35+
* Fix a bad interaction between the ``'Furo'`` theme and the new-style for
36+
configuration values.
37+
Patch by Adam Turner.
38+
39+
Release 7.3.1 (released Apr 17, 2024)
40+
=====================================
41+
442
Dependencies
543
------------
644

7-
* #11411: Support `Docutils 0.21`_. Patch by Adam Turner.
45+
* Require ``tomli`` on Python 3.10 and earlier.
46+
Patch by Adam Turner.
847

9-
.. _Docutils 0.21: https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-21-2024-04-09
48+
Release 7.3.0 (released Apr 16, 2024)
49+
=====================================
1050

11-
Incompatible changes
12-
--------------------
51+
Dependencies
52+
------------
53+
54+
* #11858: Increase the minimum supported version of Alabaster to 0.7.14.
55+
Patch by Adam Turner.
56+
* #11411: Support `Docutils 0.21`_. Patch by Adam Turner.
57+
58+
.. _Docutils 0.21: https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-21-2024-04-09
59+
* #12012: Use ``types-docutils`` instead of ``docutils-stubs``.
1360

1461
Deprecated
1562
----------
@@ -22,59 +69,57 @@ Deprecated
2269
the public properties :attr:`!sphinx.testing.util.SphinxTestApp.status`
2370
and :attr:`!sphinx.testing.util.SphinxTestApp.warning` instead.
2471
Patch by Bénédikt Tran.
25-
* tests: :func:`!sphinx.testing.util.strip_escseq` is deprecated in favor of
72+
* tests: :func:`!sphinx.testing.util.strip_escseq` is deprecated in favour of
2673
:func:`!sphinx.util.console.strip_colors`.
2774
Patch by Bénédikt Tran.
2875

2976
Features added
3077
--------------
3178

32-
* Add public type alias :class:`sphinx.util.typing.ExtensionMetadata`.
33-
This can be used by extension developers
34-
to annotate the return type of their ``setup`` function.
35-
Patch by Chris Sewell.
36-
37-
* #12193: Improve ``external`` warnings for unknown roles.
38-
In particular, suggest related role names if an object type is mistakenly used.
39-
Patch by Chris Sewell.
40-
41-
* #12131: Added :confval:`show_warning_types` configuration option.
42-
Patch by Chris Sewell.
43-
79+
* #12265: Support theme configuration via ``theme.toml``.
4480
* #11701: HTML Search: Adopt the new `\<search\>`_ element.
4581
Patch by Bénédikt Tran.
4682

4783
.. _`\<search\>`: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search
48-
84+
* #11776: Add long option names to ``sphinx-build``.
85+
Patch by Hugo van Kemenade, Adam Turner, Bénédikt Tran, and Ezio Melotti.
86+
* Organise the ``sphinx-build`` options into groups.
87+
Patch by Adam Turner.
88+
* #11855: Defer computation of configuration values.
89+
Patch by Adam Turner.
90+
* Add ``:no-search:`` as an alias of the ``:nosearch:`` metadata field.
91+
Patch by Adam Turner.
4992
* #11803: autodoc: Use an overriden ``__repr__()`` function in an enum,
5093
if defined. Patch by Shengyu Zhang.
51-
52-
* #11892: Improved performance when resolving cross references in cpp domain.
94+
* #11825: Allow custom targets in the manpage role.
95+
Patch by Nicolas Peugnet.
96+
* #11892: Improved performance when resolving cross references in the C++ domain.
5397
Patch by Rouslan Korneychuk.
54-
98+
* #11905: Add a :rst:dir:`versionremoved` directive.
99+
Patch by Hugo van Kemenade, Adam Turner, and C.A.M. Gerlach.
55100
* #11981: Improve rendering of signatures using ``slice`` syntax,
56101
e.g., ``def foo(arg: np.float64[:,:]) -> None: ...``.
57-
58102
* The manpage builder now adds `OSC 8`_ anchors to hyperlinks, using
59103
the `groff`_ device control command.
60104

61105
.. _OSC 8: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
62106
.. _groff: https://lists.gnu.org/archive/html/groff/2021-10/msg00000.html
63-
64-
* #11015: :rst:dir:`versionadded` wording changes from ``New in [...]``
65-
to ``Added in [...]``.
107+
* #11015: Change the text of the :rst:dir:`versionadded` directive from
108+
``New in [...]`` to ``Added in [...]``.
66109
Patch by Bénédikt Tran.
67-
110+
* #12131: Added :confval:`show_warning_types` configuration option.
111+
Patch by Chris Sewell.
112+
* #12193: Improve ``external`` warnings for unknown roles.
113+
In particular, suggest related role names if an object type is mistakenly used.
114+
Patch by Chris Sewell.
115+
* Add public type alias :class:`sphinx.util.typing.ExtensionMetadata`.
116+
This can be used by extension developers
117+
to annotate the return type of their ``setup`` function.
118+
Patch by Chris Sewell.
68119

69120
Bugs fixed
70121
----------
71122

72-
* #11959: Fix multiple term matching when word appears in both title and document.
73-
Patch by Will Lachance.
74-
* #11958: HTML Search: Fix partial matches overwriting full matches.
75-
Patch by William Lachance.
76-
* #11944: Use anchor in search preview.
77-
Patch by Will Lachance.
78123
* #11668: Raise a useful error when ``theme.conf`` is missing.
79124
Patch by Vinay Sajip.
80125
* #11622: Ensure that the order of keys in ``searchindex.js`` is deterministic.
@@ -100,9 +145,13 @@ Bugs fixed
100145
* #11675: Fix rendering of progression bars in environments that do not support
101146
ANSI control sequences.
102147
Patch by Bénédikt Tran.
148+
* #11861: Whitelist more types with an incorrect ``__module__`` attribute.
149+
Patch by Adam Turner.
103150
* #11715: Apply ``tls_verify`` and ``tls_cacerts`` config to
104151
``ImageDownloader``.
105152
Patch by Nick Touran.
153+
* Allow hyphens in group names for :rst:dir:`productionlist` cross-references.
154+
Patch by Adam Turner.
106155
* #11433: Added the :confval:`linkcheck_allow_unauthorized` configuration option.
107156
Set this option to ``False`` to report HTTP 401 (unauthorized) server
108157
responses as broken.
@@ -119,25 +168,37 @@ Bugs fixed
119168
Patch by Colin Marquardt.
120169
* #11598: Do not use query components in URLs for assets in EPUB rendering.
121170
Patch by David Runge.
122-
* #11917: Fix rendering of annotated inherited members for Python 3.9.
123-
Patch by Janet Carson.
171+
* #11904: Support unary subtraction when parsing annotations.
172+
Patch by James Addison.
124173
* #11925: Blacklist the ``sphinxprettysearchresults`` extension; the functionality
125174
it provides was merged into Sphinx v2.0.0.
126175
Patch by James Addison.
176+
* #11917: Fix rendering of annotated inherited members for Python 3.9.
177+
Patch by Janet Carson.
178+
* #11935: C Domain: Fix namespace-pop context.
179+
Patch by Frank Dana.
180+
* #11923: Avoid zombie processes when parallel builds fail.
181+
Patch by Felix von Drigalski.
127182
* #11353: Support enumeration classes inheriting from mixin or data types.
128183
Patch by Bénédikt Tran.
129184
* #11962: Fix target resolution when using ``:paramtype:`` fields.
130185
Patch by Bénédikt Tran.
186+
* #11944: Use anchor in search preview.
187+
Patch by Will Lachance.
131188
* #12008: Fix case-sensitive lookup of ``std:label`` names in intersphinx inventory.
132189
Patch by Michael Goerz.
190+
* #11958: HTML Search: Fix partial matches overwriting full matches.
191+
Patch by William Lachance.
192+
* #11959: Fix multiple term matching when word appears in both title and document.
193+
Patch by Will Lachance.
133194
* #11474: Fix doctrees caching causing files not be rebuilt in some cases,
134195
e.g., when :confval:`numfig` is ``True``.
135196
Patch by Bénédikt Tran.
136197
* #11278: autodoc: Fix rendering of :class:`functools.singledispatchmethod`
137198
combined with :func:`@classmethod <classmethod>`.
138199
Patch by Bénédikt Tran.
139200
* #11894: Do not add checksums to css files if building using the htmlhelp builder.
140-
Patch by mkay.
201+
Patch by reduerK akiM.
141202
* #12052: Remove ``<script>`` and ``<style>`` tags from the content of search result
142203
summary snippets.
143204
Patch by James Addison.
@@ -155,26 +216,33 @@ Bugs fixed
155216
Patch by James Addison.
156217
* #11970: singlehtml builder: make target URIs to be same-document references in
157218
the sense of :rfc:`RFC 3986, §4.4 <3986#section-4.4>`, e.g., ``index.html#foo``
158-
becomes ``#foo``. Patch by eanorige.
219+
becomes ``#foo``. Patch by Eric Norige.
159220
* #12271: Partially revert Docutils' r9562__ to fix EPUB files.
160221
Patch by Adam Turner.
161222

162223
__ https://sourceforge.net/p/docutils/code/9562/
224+
* #12253: Escape reserved path characters in the remote images post-transform
225+
download cache.
226+
Patch by James Addison and Adam Turner.
163227

164228
Testing
165229
-------
230+
231+
* Reorganise tests into directories.
232+
Patch by Adam Turner.
233+
* Clean up global state in ``SphinxTestApp``.
234+
Patch by Adam Turner.
166235
* #11285: :func:`!pytest.mark.sphinx` and :class:`!sphinx.testing.util.SphinxTestApp`
167236
accept *warningiserror*, *keep_going* and *verbosity* as keyword arguments.
168237
Patch by Bénédikt Tran.
169238
* #11285: :class:`!sphinx.testing.util.SphinxTestApp` *status* and *warning*
170239
arguments are checked to be :class:`io.StringIO` objects (the public API
171240
incorrectly assumed this without checking it).
172241
Patch by Bénédikt Tran.
173-
174-
* pytest: report the result of ``test_run_epubcheck`` as ``skipped`` instead of
175-
``success`` when Java and/or the ``epubcheck.jar`` code are not available.
176-
* utils: use dynamic allocation of unused port numbers for the test HTTP(S)
177-
servers. As a side-effect, this removes the need for test server lockfiles,
242+
* Report the result of ``test_run_epubcheck`` as ``skipped`` instead of
243+
``success`` when either Java or ``epubcheck`` are not available.
244+
* Use dynamic allocation of unused port numbers for the test HTTP(S) servers.
245+
As a side-effect, this removes the need for test server lockfiles,
178246
meaning that any remaining ``tests/test-server.lock`` files can safely be
179247
deleted.
180248

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ dependencies = [
7272
"requests>=2.25.0",
7373
"packaging>=21.0",
7474
"importlib-metadata>=4.8; python_version < '3.10'",
75+
"tomli>=2; python_version < '3.11'",
7576
"colorama>=0.4.5; sys_platform == 'win32'",
7677
]
7778
dynamic = ["version"]

sphinx/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""The Sphinx documentation toolchain."""
22

3-
__version__ = '7.3.0'
3+
__version__ = '7.3.5'
44
__display_version__ = __version__ # used for command line version
55

66
# Keep this file executable as-is in Python 3!
@@ -28,7 +28,7 @@
2828
#:
2929
#: .. versionadded:: 1.2
3030
#: Before version 1.2, check the string ``sphinx.__version__``.
31-
version_info = (7, 3, 0, 'beta', 0)
31+
version_info = (7, 3, 5, 'beta', 0)
3232

3333
package_dir = path.abspath(path.dirname(__file__))
3434

sphinx/config.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,9 @@ def __getstate__(self) -> dict:
463463
# create a picklable copy of ``self._options``
464464
__dict__['_options'] = _options = {}
465465
for name, opt in self._options.items():
466+
if not isinstance(opt, _Opt) and isinstance(opt, tuple) and len(opt) <= 3:
467+
# Fix for Furo's ``_update_default``.
468+
self._options[name] = opt = _Opt(*opt)
466469
real_value = getattr(self, name)
467470
if not is_serializable(real_value):
468471
if opt.rebuild:
@@ -531,6 +534,8 @@ def _validate_valid_types(
531534
return valid_types
532535
if isinstance(valid_types, type):
533536
return frozenset((valid_types,))
537+
if valid_types is Any:
538+
return frozenset({Any}) # type: ignore[arg-type]
534539
if isinstance(valid_types, set):
535540
return frozenset(valid_types)
536541
if not isinstance(valid_types, tuple):
@@ -655,7 +660,7 @@ def check_confval_types(app: Sphinx | None, config: Config) -> None:
655660
if default is None and not valid_types:
656661
continue # neither inferable nor explicitly annotated types
657662

658-
if valid_types is Any: # any type of value is accepted
663+
if valid_types == frozenset({Any}): # any type of value is accepted
659664
continue
660665

661666
if isinstance(valid_types, ENUM):
-73 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)