Commit Graph

1115 Commits

Author SHA1 Message Date
Adam Turner
8878bee000 Replace the header image with a new SVG logo 2023-10-04 16:56:46 +01:00
Bénédikt Tran
46f8f76e56 Fix the lazy loading conditions for MathJax (#11597)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-09-21 18:18:09 +01:00
Adam Turner
2a631f97ef Restore support for YYYY copyright lines 2023-08-30 22:51:23 +01:00
Adam Turner
ff18318613 Add an `'include-read'` event (#11657) 2023-08-30 22:21:16 +01:00
Albert Y. Shih
4692208fde Fix two relative link bugs in inheritance diagrams (#11634)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-30 18:44:37 +01:00
Matt Wozniski
8248be31db autodoc: Reset `sys.modules` on partial import failure (#11645)
If importing with ``TYPE_CHECKING is True`` fails, reset the state of ``sys.modules``
so that the attempt with ``TYPE_CHECKING is False`` may succeed.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-29 20:05:41 +01:00
Bénédikt Tran
76658c49a9 Fix `sphinx.ext.autodoc.preserve_defaults` (#11550)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-17 01:19:25 +00:00
Stephen Finucane
53a930f8c7 Fix C coverage support in `sphinx.ext.coverage` (#11591) 2023-08-15 14:50:15 +01:00
picnixz
2656f34848 Fix rendering of `Literal` annotations with enum values (#11517)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-14 23:33:57 +01:00
Halldor Fannar
0bad447070 Emit "source-read" events for files read via the `include` directive (#11510)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: picnixz <10796600+picnixz@users.noreply.github.com>
2023-08-14 16:02:04 +01:00
Adam Turner
2ef9728b6e Mark idempotent translations as 'translated' (#11580) 2023-08-12 04:51:52 +01:00
alvinhochun
c52d55ebd7 Exclude substitution definitions from the `gettext` builder (#9846)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-10 10:01:25 +01:00
Albert Y. Shih
3e30fa36a2 Fix missing and broken links in inheritance diagrams (#10614)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-08 20:32:58 +01:00
Adam Turner
85ffb3b0fd Fix `test_assets_order` for Pygments 2.16 2023-08-07 21:51:05 +01:00
Adam Turner
1cfb68d8be Consistently name the object description options (#11533)
*  The directive option ``:noindex:`` was renamed to ``:no-index:``.
*  The directive option ``:noindexentry:`` was renamed to ``:no-index-entry:``.
*  The directive option ``:nocontentsentry:`` was renamed to ``:no-contents-entry:``.

The previous names are retained as aliases, but will be deprecated
and removed in a future version of Sphinx (9.0 or later).
2023-07-28 22:30:26 +01:00
Ralf Grubenmann
6178163cb1 Fix relative references in SVGs generated by `sphinx.ext.graphviz` (#11078)
Co-authored-by: Ralf Grubenmann <ralf.grubenmann@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-28 05:47:23 +01:00
Adam Turner
ad61e41157 Drop support for Python 3.8 (#11511) 2023-07-25 02:07:23 +01:00
Adam Turner
066e0fabc6 Add translation progress information (#11509)
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
2023-07-24 20:19:31 +01:00
picnixz
82bc15aec3 Enable skipping anchor verification on a per-URL basis (#11489)
Add a new ``linkcheck_anchors_ignore_for_url`` configuration variable.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-24 12:15:42 +01:00
Stefanie Molin
e09d02e440 Allow `copyright` to contain multiple entries (#10983)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-11 22:43:48 +01:00
TLouf
86b07d4a97 Allow multi-line object description signatures (#11011)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Jean-François B <2589111+jfbu@users.noreply.github.com>
Co-authored-by: TLouf <loufthomas@gmail.com>
2023-05-11 14:28:57 +01:00
Adam Turner
706f5f9cc8 Warn on deprecated Python-specific index types (#11412) 2023-05-09 22:57:39 +01:00
James Addison
c9d0933e5d linkcheck: Use context managers for HTTP requests (#11318)
This closes HTTP responses when no content reads are required, as
when requests are made in streaming mode, ``requests`` doesn't know
whether the caller may intend to later read content from a streamed
HTTP response object and holds the socket open.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-09 17:09:35 +01:00
Adam Turner
2a9e805206 Remove the deprecated Setuptools integration (#11363) 2023-04-27 01:22:04 +01:00
James Addison
59de8d5202 Revert "Support and prefer `.jinja to _t` for static templates (#11165)" (#11329)
This reverts commit 5d13215b58.
2023-04-23 19:06:44 +01:00
James Addison
d8f15c7361 Increase timeout threshold for `linkcheck` tests (#11326) 2023-04-21 02:08:14 +01:00
Bénédikt Tran
61576516d4 Fix duplicated labels in TeX output (#11093) 2023-04-17 12:07:32 +02:00
Jean-François B
b95fc0e88b Use leaner TeX syntax (follow-up to #11319)
Because it is cool.  And avoids overhead.  Matter of principle.
2023-04-11 20:41:58 +02:00
Jean-François B
509cc4533c LaTeX: get aligned longtable obey current list indent
Fix #11268.

Thanks to @picnixz.
2023-04-11 20:32:31 +02:00
James Addison
5d13215b58 Support and prefer `.jinja to _t` for static templates (#11165)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-04-07 18:07:15 +01:00
James Addison
f82c3c9912 Disable localisation when `SOURCE_DATE_EPOCH` is set (#10949)
This commit disables Sphinx's localisation features when reproducible
builds are requested, as determined by a non-empty SOURCE_DATE_EPOCH_
environment variable.

The `Reproducible Builds`_ project aims to provide confidence to
consumers of packaged software that the artefacts they're downloading
and installing have not been altered by the environment they were
built in, and can be replicated at a later date if required.

Builds of localised documentation using Sphinx currently account for
a large category of reproducible build testing failures, because the
builders intentionally use varying environment locales at build-time.
This can affect the contents of the ``objects.inv`` file.

During investigation, it turned out that many ``gettext``-localised
values (particularly in Python modules under ``sphinx.domains``) were
being translated at module-load-time and would not subsequently be
re-localised.

This creates two unusual effects:

1. Attempting to write a test case to build the same application in
   two different languages was not initially possible, as the
   first-loaded translation catalogue (as found in the 
   ``sphinx.locale.translators`` global variable) would remain in-use
   for subsequent application builds under different locales.

2. Localisation of strings could vary depending on whether the
   relevant modules were loaded before or after the resource
   catalogues were populated.

We fix this by performing all translations lazily so that module
imports can occur in any order and localisation of inventory entries
should occur only when translations of those items are requested.

Localisation can then be disabled by configuring the ``gettext``
language to the ISO-639-3 'undetermined' code (``'und'``), as this
should not have an associated translation catalogue. We also want to
prevent ``gettext`` from  attempting to determine the host's locale
from environment variables (including ``LANGUAGE``).

.. _SOURCE_DATE_EPOCH: https://reproducible-builds.org/docs/source-date-epoch/
.. _Reproducible Builds: https://www.reproducible-builds.org/
2023-04-07 17:49:36 +01:00
Jens Hedegaard Nielsen
3edae68904 autosummary: Support documenting inherited attributes (#10691)
The current implementation of ``import_ivar_by_name`` filters
attributes if the name of the object that the attribute belongs to
does not match the object being documented. However, for inherited
attributes this is not the case. Filtering only on the attribute name
seems to resolve the issue. It is not clear to me if there are any
unwanted sideeffects of this and we should filter on the list of
qualnames for the object and all its super classes (if any).

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-04-06 23:33:43 +01:00
picnixz
aba392d87f Support type comments in `PropertyDocumenter` (#11298) 2023-04-06 22:56:17 +01:00
Clément Pinard
9299003d40 Autosummary: Extend `__all__` members to template rendering (#10811)
When ``False``, the ``autosummary_ignore_module_all`` option adds
members to the module's members entry that will be used for autodoc,
but otherwise ignores it. As such, if a class is available in the 
``__all__``, it won't be generated.

This commit aims to extend the ``__all__`` handling not only to
members, but also to corresponding attribute types (function,
classes, exceptions, modules)

The ``imported_members`` option is set to ``True`` if the object has
an ``__all__`` member and ``autosummary_ignore_module_all`` is ``False``
2023-04-06 00:02:37 +01:00
Martin Liška
8e26d78b79 Remove hidden state from `test_nosearch` (#11291)
Currently, ``test_nosearch`` depends on ``html_search_language='de'``
from a previous test and thus fails if run individually.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-04-05 13:43:24 +01:00
Jean-François B
126737c3cd Add unit test for issue #11110 as fixed by #11113 2023-04-03 18:26:34 +02:00
Jean-François B
89a4cdb673 Let the #11276 test actually be one which would have failed earlier 2023-03-31 19:27:54 +02:00
Jean-François B
8f6ad4a3e5 Fix #11274: external links may break PDF build if under \sphinxupquote 2023-03-31 18:19:35 +02:00
Dimitri Papadopoulos
669bcc0a19 Fix typos found by codespell 2023-03-27 07:22:07 +02:00
Adam Turner
7d928b3e79 Increase `test_linkcheck` timeouts 2023-03-24 01:07:25 +00:00
Adam Turner
97f07ca83c Speed up `test_linkcheck` 2023-03-24 00:29:27 +00:00
Adam Turner
44326fe247 Remove tests that rely on setuptools 2023-03-05 19:03:06 +00:00
Adam Turner
43e681e88f Remove `.egg support from pycode ModuleAnalyser`
Python eggs are a now-obsolete binary distribution format.
2023-03-05 19:03:06 +00:00
Jean-François B
7945aeb22d LaTeX: fix 5.1.0 bugs related to topic and contents boxes (#11102)
* Fix #11095 (PDF wrong placement of shadow of topic boxes since 5.1.0)

* Fix #11096 (LaTeX shadowsize regression at 5.1.0)

* Fix #11099 (shadowrule legacy sphinxsetup key vanished at 5.1.0)

* Fix #11101 (LaTeX div.topic_padding of sphinxsetup had wrong name)

* Add some checks that various sphinxsetup keys do not break PDF build

* Update LaTeX docs

* Update CHANGES

* Can not use :dudir:`contents` has it links to wrong place
2023-01-06 23:52:19 +01:00
Adam Turner
4032070e81 Run pyupgrade (#11070) 2023-01-02 00:01:14 +00:00
Adam Turner
f4c8a0a68e Insert `from __future__ import annotations` 2023-01-01 20:48:37 +00:00
Adam Turner
a1c10f5d5e Happy New Year! 2023-01-01 19:40:01 +00:00
Adam Turner
a6257fc83b Make copyright text inclusion test date-independent
Improve clarity on what the test is looking for in the footer
2023-01-01 19:38:55 +00:00
Adam Turner
bf06d7ef4d Factor out HTML 4 translator (#11051)
Move the HTML 4 translator into a private module.
2022-12-30 00:53:04 +00:00
James Addison
041e5f8268 Add test coverage for 'today_fmt' reference substitution (#10980) 2022-12-29 14:19:43 +00:00