Commit Graph

5967 Commits

Author SHA1 Message Date
Adam Turner
ce5ce1ac2d Remove support for the `jsdump format in sphinx.search` (#11365) 2023-04-27 01:28:45 +01:00
Adam Turner
973e8fb5cf Remove the deprecated `sphinx.ext.napoleon.iterators` module (#11364) 2023-04-27 01:27:07 +01:00
Adam Turner
2a9e805206 Remove the deprecated Setuptools integration (#11363) 2023-04-27 01:22:04 +01:00
Adam Turner
8dd44d1e13 Remove deprecated `make_old_id` functions (#11360) 2023-04-27 01:01:09 +01:00
Adam Turner
124957a89c Remove deprecated search splitters in `sphinx.search.ja` (#11359) 2023-04-27 00:50:02 +01:00
Adam Turner
4eb706eb21 Bump version 2023-04-26 17:24:54 +01:00
Adam Turner
bc04444cb8 Bump version 2023-04-25 11:53:35 +01:00
Adam Turner
ec993dda36 Bump to 6.2.1 final 2023-04-25 11:53:08 +01:00
Adam Turner
d2aa91f63c Revert the default type of `nitpick_ignore[_regex] to list` 2023-04-25 11:31:57 +01:00
Adam Turner
60d8fa10b8 Bump version 2023-04-23 21:04:09 +01:00
Adam Turner
70102ac2ee Bump to 6.2.0 final 2023-04-23 21:03:34 +01:00
Adam Turner
bffb54734f Note correct deprecation version for `sphinx.util.osutil.cd` 2023-04-23 20:45:25 +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
Adam Turner
aee3c0ab75 Partially revert "Disable localisation when SOURCE_DATE_EPOCH is set (#10949)" (#11343)
This keeps some of the added tests, and avoids a full revert of ``sphinx.locale``.
2023-04-21 19:04:26 +01:00
Bénédikt Tran
e2f66cea49 Update CHANGES for PR #11333 2023-04-18 12:13:20 +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
Adam Turner
7ecf037280 Enable 'nit-picky mode' for Sphinx's documentation
Fix several reference errors throughout the documentation and set
``nitpick_ignore`` in ``doc/conf.py``.
2023-04-06 23:11:39 +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
Adam Turner
4a3febb69a Add an option for displaying short `Literal` types (#11109)
The new ``python_display_short_literal_types`` configuration option
for the ``py`` domain controls display of PEP 586 ``Literal`` types.
The 'short' format is inspired by PEP 604, using the bitwise OR operator
to distinguish the possible legal values for the argument.
2023-04-05 13:07:25 +01:00
Adam Turner
9b0c73d70e Re-combine `CHANGES and CHANGES.old`
The separation made pre-Sphinx 1.0 changes harder to find from the
online documentation, and offered little benefit in terms of file
length given that CHANGES was already near 7,500 lines long. Perhaps
a future change could be to split CHANGES by version, similar to
Python's "What's New".
2023-04-04 22:06:49 +01:00
Adam Turner
ad98c72290 Remove 'Previous versions' section in CHANGES 2023-04-04 19:03:30 +01:00
Adam Turner
961f96de7a Use the `:dudir:` role with explicit titles 2023-04-04 18:34:58 +01:00
Jean-François B
e1b15a5c11 Update doc and CHANGES for PR #11281 2023-04-03 11:12:41 +02:00
Jean-François B
a2ec68fa72 Update CHANGES for PR #11110 2023-04-03 11:11:19 +02:00
Jean-François B
39fa276b36 Update CHANGES for PR #11113 2023-04-03 08:47:39 +02:00
Jean-François B
40ec190353 Update CHANGES for PR #11276
The initial formulation was wrong, as the bug did not break PDF
builds, but created wrong links
2023-03-31 19:31:35 +02:00
Jean-François B
1397cb90f4 Update CHANGES
This is only to relaunch Windows CI which has a problem seen already in
the past with test_gettext_dont_rebuild_mo.  I don't understand why this
happens on Windows and can't test directly on Windows.
2023-03-31 18:38:04 +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
Jean-François B
8f9bac9c4f LaTeX: rename `\sphinxnotetitle into \sphinxstylenotetitle` (etc)
Follow-up to #11266.  Using \sphinxstyle prefix looked a posteriori
better, for coherency, although it is a bit long.
2023-03-27 15:21:06 +02:00
Jean-François B
64bf782d60 Update CHANGES 2023-03-27 12:25:44 +02:00
Jean-François B
7144f4924a LaTeX: add \sphinxnotetitle et al.
In passing I reverted some deprecation I had added at 6bf40599e to some
internals of the sphinxadmonition environment, as it does not look that
pressing anyhow and the redundant namings of two colors in particular
may nevertheless prove useful to user \renewcommand's, as they avoid to
have to refer to \spx@noticetype.
2023-03-26 23:57:04 +02:00
Jean-François B
a7949d4290 LaTeX: let mark-up for seealso directive use explicit colon (fix #11264) 2023-03-26 23:57:04 +02:00
Adam Turner
c7d7f2951d Remove `sphinx.locale.setlocale` 2023-03-24 01:30:44 +00:00
Adam Turner
e3567bfb16 Update CHANGES for Sphinx 6.2.0 2023-03-24 01:05:15 +00:00
Adam Turner
f5c957597d Normalise spelling of Sphinx versions 2023-03-24 00:44:33 +00:00
Jean-François B
8289444c18 Update CHANGES for PR #11254 2023-03-19 21:59:04 +01:00
Jean-François B
c951f5f639 Update CHANGES 2023-03-19 18:39:45 +01:00
Jean-François B
6bf40599e2 LaTeX: add <prefix>_{TeXcolor,TeXextras} options
And add <type>TextColor and <type>TeXextras for <type>=hint, important,
note, tip for variants which do not trigger for sphinxheavybox but
still uses sphinxlightbox (suitably enhanced).

Similar named TeXcolor and TeXextras options for \sphinxbox.
2023-03-19 18:29:09 +01:00
Jean-François B
ed97d7ac9f Update CHANGES for PR #11243 2023-03-15 17:59:43 +01:00
Jean-François B
ee3c720cfa LaTeX: also admonition directives support box-decoration-break=slice 2023-03-13 19:50:31 +01:00
Jean-François B
aeeadb6f1e Fix #11235: LaTeX: `\color` may cause color leaks in topic or notices 2023-03-12 15:55:57 +01:00
Jean-François B
212ed5b940 LaTeX: add support for styling `note (hint, ...) similarly as warning ( danger`, ...) (#11234) 2023-03-12 11:28:36 +01:00
Jean-François B
b635150bc7 LaTeX: `\sphinxbox` for boxing inline text elements 2023-03-07 13:19:19 +01:00
Jean-François B
ba37288d67 LaTeX: fix unintended 1pt upwards vertical shift of rounded box frames
This issue was not clearly visible on code-blocks whose contents always
occupy at least one full height line and 1pt is small compared to it and
the default padding.  It became more obvious when experimenting (work in
progress) with applying the macro to inline contents with zero padding.
2023-03-07 00:58:58 +01:00
Jean-François B
bd1df24a18 Update CHANGES 2023-03-06 22:13:02 +01:00
Jeremy Maitin-Shepard
8de6638697 Add `content_offset parameter to nested_parse_with_titles` (#11147)
Previously, ``nested_parse_with_titles`` always passed ``0`` as the input
offset when invoking ``nested_parse``.  When parsing the content of a
directive, as is a common use case for ``nested_parse_with_titles``,
this leads to incorrect source file/line number information, as it
does not take into account the directive's ``content_offset``, which is
always non-zero.

This issue affects *all* object descriptions due to GH-10887.  It also
affects the ``sphinx.ext.ifconfig`` extension.

The ``py:module`` and ``js:module`` directives employed a workaround for
this issue, by wrapping the calls to ``nested_parse_with_title`` with
``switch_source_input``.  That worked, but was more complicated (and
likely less efficient) than necessary.

This commit adds an optional ``content_offset`` parameter to
``nested_parse_with_titles``, and fixes callers to pass the appropriate
content offset when needed.

This commit eliminates the now-unnecessary calls to
``switch_source_input`` and instead specifies the correct ``content_offset``.
2023-02-15 05:45:28 +00:00
Adam Turner
e17f39e7b5 Merge branch '6.1.x'
# Conflicts:
#	CHANGES
#	sphinx/__init__.py
2023-01-10 16:00:59 +00:00