Commit Graph
19910 Commits
Author SHA1 Message Date
Adam Turner c8f4a03dac Fix COM812 2023-02-18 01:58:05 +00: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
Jeremy Maitin-Shepard 44684e1654 Restore correct parallel search index building (#11192)
Revert b32841e153
to fix parallel search index building

The image-related changes were already reverted in
2a7c40d07f,
but the search index changes also need to be reverted.

It would be nice to support parallel search index building, but the
necessary support for merging the search indices produced by each
process needs to be added first.
2023-02-15 05:26:10 +00:00
Adam Turner cfd43d4dbe Simplify coverage workflow reporting
``PYTHONDEVMODE`` and ``PYTHONWARNDEFAULTENCODING`` are used in the
main tests, remove from the coverage workflow.
2023-02-15 05:24:51 +00:00
Adam Turner 9b104523e9 Ignore `coverage.py` warnings 2023-02-15 05:14:44 +00:00
Karolina Surma a7f5d91c29 Remove `smartypants` from LICENSE (#11152)
smartypants was removed from Sphinx in commit
ce31e1c0c7
2023-02-15 04:47:30 +00:00
Mike Taves 23bf041ce4 Remove unicode prefix (`u`) from strings (#11158) 2023-02-15 04:37:33 +00:00
Adam Turner c17300aa7a Treat Python warnings as errors during testing 2023-02-15 04:34:10 +00:00
Adam Turner a502e75233 Refactor `sphinx.util.images.guess_mimetype` 2023-02-15 04:10:18 +00:00
Adam Turner 607908924c Always cancel in-progress workflows on new commits
The current ``github.head_ref || github.run_id`` syntax only cancels
in-progress GitHub Actions runs triggered by pull requests, as
``head_ref`` is only defined for pull requests, and ``run_id`` is
always unique. This changes to using ``ref``, which is the name of
the branch or tag linked to the commit, meaning that in-progress jobs
will be cancelled on pushes to a branch.
2023-02-15 03:35:49 +00:00
Adam Turner ff852bc7c3 Update GitHub Actions workflows 2023-02-15 03:10:50 +00:00
Adam Turner bb9821b968 Resolve Ruff SIM114 violations 2023-02-15 02:09:47 +00:00
Jean-François B 6ffe7be080 LaTeX: workaround to help users of luatex-ja LaTeX classes (#11191)
Close #11179
2023-02-11 21:43:03 +01:00
Adam Turner ffe4c079d3 Define `sphinx.builders.gettext.LocalTimeZone.tzname()` 2023-02-11 13:26:36 +00:00
Hugo van Kemenade 59cdb1ffe1 Ensure Ruff creates logs in colour for GitHub Actions (#11190) 2023-02-11 13:21:27 +00:00
Hugo van Kemenade 7f62f539be Correct the Python Developer Guide markup style advice link (#11189) 2023-02-11 13:19:51 +00:00
Adam Turner bd4684f483 Fix Ruff bidirectional text errors 2023-02-11 13:17:18 +00:00
Adam Turner 845ef67f6c Ignore some pylint checks in Ruff 2023-02-09 03:36:40 +00:00
Adam Turner fd3c619dbf Collapse `.startswith and .endswith` tests 2023-02-09 03:36:17 +00:00
Jean Abou-Samra ecfd08d325 Skip sphinx.locale.init_console when running tests (#11159)
Tests for Sphinx's CLIs, like test_apidoc, indirectly init_console to
initialize translations for Sphinx's console domain, the one with
Sphinx's log messages. This bleeds over subsequent tests by making
warnings translated. Fix this by skipping init_console when running
Sphinx's test suite.
2023-01-31 22:10:48 +00:00
Adam Turner 4c4745af9c Fix various Ruff errors 2023-01-31 18:30:43 +00:00
Adam Turner 7395b05b1c Ignore various lint checks in Ruff 2023-01-31 18:30:20 +00:00
Adam Turner fedce24134 Ruff code TYP renamed to TCH 2023-01-31 18:13:53 +00:00
Jean-François B b88713e68e Update LaTeX docs 2023-01-24 14:45:46 +01:00
Jean-François B 55170d01d7 LaTeX: `\emph replaced by \sphinxparam and \sphinxsamedocref` 2023-01-24 14:11:24 +01:00
Adam Turner a7bf030944 Remove unneeded typing imports 2023-01-23 08:44:54 +00:00
Adam Turner a6c21f92f8 Enable more Ruff checks 2023-01-23 08:32:25 +00:00
Adam Turner b069d80924 Detect import sorting problems with Ruff 2023-01-23 08:10:22 +00:00
Adam Turner 999b20ff43 Sort imports with Ruff's convention 2023-01-23 08:10:03 +00:00
Adam Turner 3c8b76d1cc Ignore `S701` in Ruff 2023-01-23 08:07:31 +00:00
Adam Turner bf88cd44d0 Ignore `SIM115` in Ruff 2023-01-23 08:07:31 +00:00
Adam Turner a6b34dd13d Update `PL` code ignores in Ruff 2023-01-23 08:07:31 +00:00
Jean-François B ddf4daf2c6 Doc of html_file_suffix (closes #11141) (#11144) 2023-01-22 19:32:12 +01:00
Jean-François B 6845c3fd96 Ignore UP031 check with Ruff 0.0.229 2023-01-22 18:54:22 +01:00
Jean-François B 3362021cfb Merge pull request #11146 from jfbu/update_test_needs_sphinx
Update test_config.py::test_needs_sphinx for Alabaster 0.7.13 compat
2023-01-22 18:07:46 +01:00
Jean-François B 0fcd359663 Update test_config.py::test_needs_sphinx for Alabaster 0.7.13 compat
Relates #11145
2023-01-21 11:11:03 +01:00
Adam Turner e17f39e7b5 Merge branch '6.1.x'
# Conflicts:
#	CHANGES
#	sphinx/__init__.py
2023-01-10 16:00:59 +00:00
Adam Turner 30f347226f Bump version 2023-01-10 15:56:43 +00:00
Adam Turner 776d01eb62 Bump to 6.1.3 final v6.1.3 2023-01-10 15:55:21 +00:00
Adam Turner a2e922ac6c CHANGES for Sphinx 6.1.3 2023-01-10 15:55:03 +00:00
Adam Turner 31162a9b63 Handle exceptions for `get_node_source and get_node_line` 2023-01-10 15:51:37 +00:00
Adam Turner dcb4429aba Restore Sphinx 5 `nodes.Element` copying behaviour 2023-01-10 14:53:17 +00:00
Adam Turner 2a7c40d07f Undo parallel image changes 2023-01-10 14:53:17 +00:00
Adam Turner 7841d3d9b2 Ignore more checks in Ruff 0.0.214 2023-01-10 14:53:17 +00:00
Jean-François B e5bdb93788 Merge pull request #11105 from jfbu/latex_remove_dimens
LaTeX: remove some internal \dimen registers
2023-01-08 20:04:37 +01:00
Jean-François B 3a7e0f88b6 LaTeX: remove deprecated internal `\dimen` at 6.2.0 not 7.0.0 2023-01-08 19:56:33 +01:00
Jean-François B 19b0710944 Fix #11079 (LaTeX: figure with align disappears if not followed by text) 2023-01-08 19:40:24 +01:00
Adam Turner 670bcb743b Documentation reshuffle (#11112) 2023-01-08 13:52:36 +00:00
Adam Turner 67291f414e Replace deprecation tooling with module level `__getattr__` (#11054) 2023-01-08 00:27:19 +00:00
Adam Turner f022db3e8a Ignore more checks in Ruff 0.0.214 2023-01-07 22:28:45 +00:00