Skip to content

Commit c144e17

Browse files
authored
Merge branch 'master' into search-button
2 parents 25a7275 + 45f3cd6 commit c144e17

File tree

73 files changed

+2880
-3138
lines changed

Some content is hidden

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

73 files changed

+2880
-3138
lines changed

CHANGES.rst

Lines changed: 127 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,125 @@
1+
Release 8.0.0 (in development)
2+
==============================
3+
4+
Dependencies
5+
------------
6+
7+
Incompatible changes
8+
--------------------
9+
10+
.. rst-class:: compact
11+
12+
* Remove deprecated functions from ``sphinx.util``:
13+
14+
* Removed ``sphinx.util.path_stabilize``
15+
(use ``sphinx.util.osutil.path_stabilize``).
16+
* Removed ``sphinx.util.display_chunk``
17+
(use ``sphinx.util.display.display_chunk``).
18+
* Removed ``sphinx.util.status_iterator``
19+
(use ``sphinx.util.display.status_iterator``).
20+
* Removed ``sphinx.util.SkipProgressMessage``
21+
(use ``sphinx.util.display.SkipProgressMessage``).
22+
* Removed ``sphinx.util.progress_message``
23+
(use ``sphinx.util.display.progress_message``).
24+
* Removed ``sphinx.util.epoch_to_rfc1123``
25+
(use ``sphinx.http_date.epoch_to_rfc1123``).
26+
* Removed ``sphinx.util.rfc1123_to_epoch``
27+
(use ``sphinx.http_date.rfc1123_to_epoch``).
28+
* Removed ``sphinx.util.save_traceback``
29+
(use ``sphinx.exceptions.save_traceback``).
30+
* Removed ``sphinx.util.format_exception_cut_frames``
31+
(use ``sphinx.exceptions.format_exception_cut_frames``).
32+
* Removed ``sphinx.util.xmlname_checker``
33+
(use ``sphinx.builders.epub3._XML_NAME_PATTERN``).
34+
35+
Patch by Adam Turner.
36+
* Removed :py:func:`!sphinx.util.osutil.cd`
37+
(use :py:func:`contextlib.chdir`).
38+
Patch by Adam Turner.
39+
* Removed :py:func:`!sphinx.util.typing.stringify`
40+
(use :py:func:`!sphinx.util.typing.stringify_annotation`).
41+
Patch by Adam Turner.
42+
* #12593: Raise an error for invalid :confval:`html_sidebars` values.
43+
Patch by Adam Turner.
44+
* #12593: Raise an error in :py:func:`!Theme.get_config` for invalid sections.
45+
Patch by Adam Turner.
46+
* #11693: Remove support for old-style :file:`Makefile` and :file:`make.bat`
47+
output in :program:`sphinx-quickstart`.
48+
* #11693: Remove the :option:`!--no-use-make-mode`, :option:`!-M`,
49+
:option:`!--use-make-mode`, and :option:`!-m` options
50+
from :program:`sphinx-quickstart`.
51+
Patch by Adam Turner.
52+
* Removed the tuple interface to :py:class:`!sphinx.ext.autodoc.ObjectMember`.
53+
Patch by Adam Turner.
54+
* #12630: Sphinx 8 makes two changes to the ``linkcheck`` configuration defaults:
55+
56+
* :confval:`linkcheck_allow_unauthorized` is now ``False`` by default.
57+
* :confval:`linkcheck_report_timeouts_as_broken` is now ``False`` by default.
58+
59+
Patch by James Addison.
60+
* #12597: Change the default of :confval:`show_warning_types`
61+
from ``False`` to ``True``.
62+
Patch by Chris Sewell.
63+
64+
Deprecated
65+
----------
66+
67+
Features added
68+
--------------
69+
70+
Bugs fixed
71+
----------
72+
73+
Testing
74+
-------
75+
76+
Release 7.4.7 (released Jul 20, 2024)
77+
=====================================
78+
79+
Bugs fixed
80+
----------
81+
82+
* #12096: Warn when files are overwritten in the build directory.
83+
Patch by Adam Turner and Bénédikt Tran.
84+
* #12620: Ensure that old-style object description options are respected.
85+
Patch by Adam Turner.
86+
* #12601, #12625: Support callable objects in :py:class:`~typing.Annotated` type
87+
metadata in the Python domain.
88+
Patch by Adam Turner.
89+
* #12601, #12622: Resolve :py:class:`~typing.Annotated` warnings with
90+
``sphinx.ext.autodoc``,
91+
especially when using :mod:`dataclasses` as type metadata.
92+
Patch by Adam Turner.
93+
* #12589, #12626: autosummary: Fix warnings with :rst:role:`!autolink`.
94+
Patch by Adam Turner.
95+
96+
Release 7.4.6 (released Jul 18, 2024)
97+
=====================================
98+
99+
Bugs fixed
100+
----------
101+
102+
* #12589, #9743, #12609: autosummary: Do not add the package prefix when
103+
generating autosummary directives for modules within a package.
104+
Patch by Adam Turner.
105+
* #12613: Reduce log severity for ambiguity detection during inventory loading.
106+
Patch by James Addison.
107+
108+
Release 7.4.5 (released Jul 16, 2024)
109+
=====================================
110+
111+
Bugs fixed
112+
----------
113+
114+
* #12593, #12600: Revert coercing the type of selected :confval:`html_sidebars`
115+
values to a list.
116+
Log an error message when string values are detected.
117+
Patch by Adam Turner.
118+
* #12594: LaTeX: since 7.4.0, :rst:dir:`seealso` and other "light" admonitions
119+
now break PDF builds if they contain a :dudir:`figure` directive; and also
120+
if they are contained in a table cell (rendered by ``tabulary``).
121+
Patch by Jean-François B.
122+
1123
Release 7.4.4 (released Jul 15, 2024)
2124
=====================================
3125

@@ -159,11 +281,13 @@ Bugs fixed
159281
Patch by Matthias Geier.
160282
* #12224: Properly detect WebP files.
161283
Patch by Benjamin Cabé.
162-
* #12380: LaTeX: Footnote mark sometimes indicates ``Page N`` where ``N`` is
163-
the current page number and the footnote does appear on that same page.
284+
* #12380: LaTeX: Avoid footnote markers ``Page N`` when ``N`` is already
285+
the current page number.
164286
Patch by Jean-François B.
165287
* #12410: LaTeX: for French and ``'lualatex'`` as :confval:`latex_engine`
166-
``polyglossia`` and not ``babel`` is used (contrarily to ``'xelatex'``).
288+
use ``babel`` as with ``'xelatex'`` (and not ``polyglossia``).
289+
Patch by Jean-François B.
290+
* #12520: LaTeX: let :rst:dir:`todolist` produce correct hyperlinks in PDF.
167291
Patch by Jean-François B.
168292
* #12416: Ensure that configuration setting aliases are always synchronised
169293
when one value or the other is modified.

doc/_themes/sphinx13/static/sphinx13.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,16 @@ div.sphinxsidebar #searchbox {
218218
margin: 12px 0 20px 0;
219219
}
220220

221+
div.sphinxsidebar #searchbox input[type="text"] {
222+
border-radius: var(--admonition-radius) 0 0 var(--admonition-radius);
223+
}
224+
225+
div.sphinxsidebar #searchbox input[type="submit"] {
226+
border-radius: 0 var(--admonition-radius) var(--admonition-radius) 0;
227+
color: white;
228+
background: var(--colour-sphinx-blue);
229+
}
230+
221231
div.footer {
222232
background-color: var(--colour-sphinx-blue);
223233
color: #ccc;

doc/man/sphinx-quickstart.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ Options
133133
.. versionchanged:: 7.3
134134
Support for disabling the make-mode will be removed in Sphinx 8.
135135

136+
.. versionremoved:: 8.0
137+
The :option:`!--no-use-make-mode` option.
138+
The :option:`!--use-make-mode` now has no effect.
139+
136140
.. option:: --makefile, --no-makefile
137141

138142
Create (or not create) makefile.

doc/usage/configuration.rst

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,14 +1331,16 @@ Options for warning control
13311331

13321332
.. confval:: show_warning_types
13331333
:type: :code-py:`bool`
1334-
:default: :code-py:`False`
1334+
:default: :code-py:`True`
13351335

13361336
Add the type of each warning as a suffix to the warning message.
13371337
For example, ``WARNING: [...] [index]`` or ``WARNING: [...] [toc.circular]``.
13381338
This setting can be useful for determining which warnings types to include
13391339
in a :confval:`suppress_warnings` list.
13401340

13411341
.. versionadded:: 7.3.0
1342+
.. versionchanged:: 8.0.0
1343+
The default is now :code-py:`True`.
13421344

13431345
.. confval:: suppress_warnings
13441346
:type: :code-py:`Sequence[str]`
@@ -3714,20 +3716,17 @@ and the number of workers to use.
37143716

37153717
.. confval:: linkcheck_allow_unauthorized
37163718
:type: :code-py:`bool`
3717-
:default: :code-py:`True`
3719+
:default: :code-py:`False`
37183720

37193721
When a webserver responds with an HTTP 401 (unauthorised) response,
37203722
the current default behaviour of the *linkcheck* builder is
3721-
to treat the link as "working".
3722-
To change that behaviour, set this option to :code-py:`False`.
3723-
3724-
.. attention::
3725-
The default value for this option will be changed in Sphinx 8.0;
3726-
from that version onwards,
3727-
HTTP 401 responses to checked hyperlinks will be treated
3728-
as "broken" by default.
3723+
to treat the link as "broken".
3724+
To change that behaviour, set this option to :code-py:`True`.
37293725

3730-
.. xref RemovedInSphinx80Warning
3726+
.. versionchanged:: 8.0
3727+
The default value for this option changed to :code-py:`False`,
3728+
meaning HTTP 401 responses to checked hyperlinks
3729+
are treated as "broken" by default.
37313730

37323731
.. versionadded:: 7.3
37333732

@@ -3755,21 +3754,18 @@ and the number of workers to use.
37553754

37563755
.. confval:: linkcheck_report_timeouts_as_broken
37573756
:type: :code-py:`bool`
3758-
:default: :code-py:`True`
3757+
:default: :code-py:`False`
37593758

3760-
When an HTTP response is not received from a webserver before the configured
3761-
:confval:`linkcheck_timeout` expires,
3762-
the current default behaviour of the *linkcheck* builder is
3763-
to treat the link as 'broken'.
3764-
To report timeouts using a distinct report code of ``timeout``,
3765-
set :confval:`linkcheck_report_timeouts_as_broken` to :code-py:`False`.
3759+
If :confval:`linkcheck_timeout` expires while waiting for a response from
3760+
a hyperlink, the *linkcheck* builder will report the link as a ``timeout``
3761+
by default. To report timeouts as ``broken`` instead, you can
3762+
set :confval:`linkcheck_report_timeouts_as_broken` to :code-py:`True`.
37663763

3767-
.. attention::
3768-
From Sphinx 8.0 onwards, timeouts that occur while checking hyperlinks
3764+
.. versionchanged:: 8.0
3765+
The default value for this option changed to :code-py:`False`,
3766+
meaning timeouts that occur while checking hyperlinks
37693767
will be reported using the new 'timeout' status code.
37703768

3771-
.. xref RemovedInSphinx80Warning
3772-
37733769
.. versionadded:: 7.3
37743770

37753771
.. confval:: linkcheck_request_headers

pyproject.toml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@ docs = [
8383
]
8484
lint = [
8585
"flake8>=6.0",
86-
"ruff==0.5.2",
86+
"ruff==0.5.4",
8787
"mypy==1.10.1",
8888
"sphinx-lint>=0.9",
89+
"types-colorama==0.4.15.20240311",
8990
"types-docutils==0.21.0.20240711",
91+
"types-Pillow==10.2.0.20240520",
92+
"types-Pygments==2.18.0.20240506",
9093
"types-requests>=2.30.0", # align with requests
9194
"importlib-metadata>=6.0", # for mypy (Python<=3.9)
9295
"tomli>=2", # for mypy (Python<=3.10)
@@ -224,9 +227,6 @@ enable_error_code = [
224227
"ignore-without-code",
225228
"unused-awaitable",
226229
]
227-
disable_error_code = [
228-
"import-untyped",
229-
]
230230

231231
[[tool.mypy.overrides]]
232232
module = [
@@ -244,16 +244,13 @@ strict_optional = false
244244
[[tool.mypy.overrides]]
245245
module = [
246246
"sphinx.application",
247-
"sphinx.cmd.quickstart",
248247
"sphinx.config",
249248
"sphinx.domains",
250249
"sphinx.domains.c",
251250
"sphinx.domains.cpp",
252251
"sphinx.events",
253252
"sphinx.ext.autodoc",
254-
"sphinx.ext.autodoc.directive",
255253
"sphinx.ext.autodoc.importer",
256-
"sphinx.ext.autosummary.generate",
257254
"sphinx.ext.doctest",
258255
"sphinx.ext.graphviz",
259256
"sphinx.ext.inheritance_diagram",
@@ -274,6 +271,14 @@ module = [
274271
]
275272
disallow_any_generics = false
276273

274+
[[tool.mypy.overrides]]
275+
module = [
276+
"defusedxml.ElementTree",
277+
"imagesize",
278+
"snowballstemmer",
279+
]
280+
ignore_missing_imports = true
281+
277282
[tool.pytest.ini_options]
278283
minversion = "6.0"
279284
addopts = [

sphinx/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""The Sphinx documentation toolchain."""
22

3-
__version__ = '7.4.4'
3+
__version__ = '8.0.0'
44
__display_version__ = __version__ # used for command line version
55

66
# Keep this file executable as-is in Python 3!
@@ -27,11 +27,11 @@
2727
#:
2828
#: .. versionadded:: 1.2
2929
#: Before version 1.2, check the string ``sphinx.__version__``.
30-
version_info = (7, 4, 4, 'final', 0)
30+
version_info = (8, 0, 0, 'beta', 0)
3131

3232
package_dir = os.path.abspath(os.path.dirname(__file__))
3333

34-
_in_development = False
34+
_in_development = True
3535
if _in_development:
3636
# Only import subprocess if needed
3737
import subprocess

sphinx/builders/_epub_base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727

2828
try:
2929
from PIL import Image
30+
PILLOW_AVAILABLE = True
3031
except ImportError:
31-
Image = None
32+
PILLOW_AVAILABLE = False
3233

3334

3435
logger = logging.getLogger(__name__)
@@ -440,7 +441,7 @@ def copy_image_files(self) -> None:
440441
"""
441442
if self.images:
442443
if self.config.epub_fix_images or self.config.epub_max_image_width:
443-
if not Image:
444+
if not PILLOW_AVAILABLE:
444445
logger.warning(__('Pillow not found - copying image files'))
445446
super().copy_image_files()
446447
else:

0 commit comments

Comments
 (0)