Commit Graph

20086 Commits

Author SHA1 Message Date
Jean-François B
e39949fed0 Update some LaTeX comments and documentation after #11224 2023-03-07 13:58:02 +01:00
Jean-François B
3a142d99cb
Merge pull request #11224 from jfbu/latex_sphinxbox
LaTeX: add ``\sphinxbox`` command
2023-03-07 13:31:01 +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
f8a5183a97 Use narrower [method-assign] instead of [assignment] (mypy 1.1.1) 2023-03-07 11:12:49 +01:00
Jean-François B
c499e090e8 LaTeX: refactor how display environments use sphinxpackageboxes
This is to share code as much as possible and facilitate future
extensions.
2023-03-07 11:00:52 +01:00
Jean-François B
13c779b666 LaTeX: clean-up of comments for refactoring of CSS-like options support 2023-03-07 09:31:52 +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
Jean-François B
ad3235421f LaTeX: refactor support macros for CSS-like sphinxsetup options
Use batch definitions to handle in a unified way options for
code-blocks, topics and admonitions.
2023-03-06 21:58:50 +01:00
Jean-François B
c105ea0ad4 LaTeX: guard usage of shadow color via associated boolean
modified:   sphinxpackageboxes.sty
2023-03-06 21:47:39 +01:00
Jean-François B
4de9d4604d LaTeX: Fix shadow color leaks to border (rounded box) if no border color 2023-03-06 21:43:47 +01:00
Jean Abou-Samra
216a0c849e
Get docname from env in `sphinx.transforms.i18n` (#11160) 2023-03-05 19:19:31 +00:00
Adam Turner
29d7166af2 Drop OrderedDict
Since Python 3.7, dicts maintain insertion order.
2023-03-05 19:03:06 +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
Adam Turner
f435fc05e6 Prefer `contextlib.chdir to sphinx.util.osutil.cd` 2023-03-05 18:49:17 +00:00
Hugo van Kemenade
219d71315c
Make `--jobs a synonym for -j` (#11210)
Make --jobs a synonym for -j
2023-03-05 14:37:35 +00:00
Adam Turner
c5641702b5 Update tests for Babel 2.12 (CLDR 42) 2023-03-05 13:32:37 +00:00
Adam Turner
18f8c0bfc8 Resolve lint errors from Ruff 0.0.254 2023-03-05 12:54:24 +00:00
Adam Turner
ba080286b0 Explicitly select all linter checks 2023-02-18 02:16:50 +00:00
Adam Turner
f363f1b058 Update Ruff configuration 2023-02-18 02:16:50 +00:00
Adam Turner
4804390604 Resolve `flake8-return` errors 2023-02-18 02:16:50 +00:00
Adam Turner
6c56988979 Unescape quotation marks where possible 2023-02-18 02:16:50 +00:00
Adam Turner
13442f6901 Fix pytest style issues 2023-02-18 02:16:50 +00:00
Adam Turner
dc1a519a1d Avoid `unittest.TestCase` methods 2023-02-18 02:05:14 +00:00
Adam Turner
f6435a9bc3 Prefer `@pytest.fixture()` 2023-02-18 01:58:05 +00:00
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