summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bump peter-evans/create-pull-request from 4 to 5dependabot/github_actions/peter-evans/create-pull-request-5dependabot[bot]2023-04-101-1/+1
| | | | | | | | | | | | | | Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
* Refactor ``_TranslationProxy``Adam Turner2023-04-081-43/+31
|
* Use PEP 585 and 604 type annotations in ``sphinx.locale``Adam Turner2023-04-081-15/+17
|
* Add a missing word in ``doc/development/theming.rst`` (#11301)James Addison2023-04-071-1/+1
|
* Support and prefer ``.jinja`` to ``_t`` for static templates (#11165)James Addison2023-04-0766-60/+299
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Disable localisation when ``SOURCE_DATE_EPOCH`` is set (#10949)James Addison2023-04-0713-20/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/
* Fix translator class check in ``SigElementFallbackTransform`` (#11283)picnixz2023-04-071-1/+5
|
* Ensure arguments to ``PIL.Image.resize()`` are integers (#11288)James Reinders2023-04-061-1/+1
| | | | | | | Update ``copy_image_files_pil`` so that the computation of ``nh`` is always an integer, as otherwise some calls to ``PIL.Image.resize()`` fail as floats are not allowed Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* autosummary: Support documenting inherited attributes (#10691)Jens Hedegaard Nielsen2023-04-064-8/+86
| | | | | | | | | | | 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>
* Enable 'nit-picky mode' for Sphinx's documentationAdam Turner2023-04-0631-133/+206
| | | | | Fix several reference errors throughout the documentation and set ``nitpick_ignore`` in ``doc/conf.py``.
* Prefer ``importlib.metadata`` from Python 3.10 onwards (#11270)panhongtao2023-04-062-6/+8
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Support type comments in ``PropertyDocumenter`` (#11298)picnixz2023-04-067-23/+115
|
* Clean up the CNAME file in ``sphinx.ext.githubpages`` (#11295)Martin Liška2023-04-061-13/+38
| | | Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
* Fix instability in ``test_ext_viewcode`` (#11297)Martin Liška2023-04-061-2/+4
| | | | Use ``freshenv`` argument and remove ``outdir`` for one test as the previous one can leave an unexpected leftover.
* Fix instability in ``test_build_epub`` (#11296)Martin Liška2023-04-061-3/+3
| | | Some tests need ``app.builder.build_all`` in order to have complete rebuild.
* Use a shared file-system lock in ``create_server`` (#11294)Martin Liška2023-04-063-9/+20
| | | | | | | With parallel run of tests, one gets "Address already in use" errors as all tests attempt to bind to the same port. Fix it with a shared file-system lock. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Autosummary: Extend ``__all__`` members to template rendering (#10811)Clément Pinard2023-04-069-5/+147
| | | | | | | | | | | | | 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``
* Resolve lint errors from Ruff 0.0.261Adam Turner2023-04-054-12/+5
|
* Only use ``_write_doc_doctree_cache`` in serial mode (#11290)Martin Liška2023-04-051-5/+11
| | | | | | | When using multiple processes, the content of ``self.env._write_doc_doctree_cache`` is not synchronised with the main process, meaning we can only use it in serial mode. Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
* Allow parallel execution of tests in ``test_search`` (#11292)Martin Liška2023-04-052-1/+4
| | | Add various ``app.builder.build_all()`` calls.
* Remove hidden state from ``test_nosearch`` (#11291)Martin Liška2023-04-054-15/+18
| | | | | | 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>
* Add an option for displaying short ``Literal`` types (#11109)Adam Turner2023-04-054-0/+104
| | | | | | 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.
* Add entries to the ``.git-blame-ignore-revs`` fileAdam Turner2023-04-041-0/+283
|
* Add ``.git-blame-ignore-revs`` fileAdam Turner2023-04-041-0/+12
|
* Re-combine ``CHANGES`` and ``CHANGES.old``Adam Turner2023-04-042-1249/+1249
| | | | | | | | 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".
* Use literal syntax in ``CHANGES.old``Adam Turner2023-04-041-23/+23
|
* Remove 'Previous versions' section in CHANGESAdam Turner2023-04-041-8/+0
|
* Use the ``:dudir:`` role with explicit titlesAdam Turner2023-04-041-6/+5
|
* Add unit test for issue #11110 as fixed by #11113Jean-François B2023-04-036-0/+74
|
* Update doc and CHANGES for PR #11281Jean-François B2023-04-032-0/+27
|
* Update CHANGES for PR #11110Jean-François B2023-04-031-1/+1
|
* support for imgmath_latex=tectonic (#11281)Dimitar Dimitrov2023-04-031-4/+15
| | | | | | | | | | | * add rudimentary support for using tectonic with imgmath * fix typo * addressing PR comment * revert changes to preview.tex_t; add dvips by default for SVG * bugfix
* Update CHANGES for PR #11113Jean-François B2023-04-031-0/+2
|
* Consider duplicate names when using image post transforms (#11113)aaron-cooper2023-04-031-1/+2
| | | Closes: #11110
* Fix error message wording in builders/latex/transforms.pyJean-François B2023-04-011-3/+5
| | | | | And make it and the two other ones there translatable strings. Using .format for the f-string.
* Update CHANGES for PR #11276Jean-François B2023-03-311-1/+2
| | | | | The initial formulation was wrong, as the bug did not break PDF builds, but created wrong links
* Let the #11276 test actually be one which would have failed earlierJean-François B2023-03-311-0/+10
|
* Resolve lint errors from Ruff 0.0.260Adam Turner2023-03-315-4/+12
|
* Run Ruff linting with a known-to-work versionAdam Turner2023-03-311-4/+11
| | | | | | | This means that CI tests will only fail if the 'known good' version fails. If the latest version of Ruff fails, perhaps due to new checks, CI will not fail overall, but the failures from the latest version will be reported.
* Update CHANGESJean-François B2023-03-311-1/+1
| | | | | | 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.
* Fix #11274: external links may break PDF build if under \sphinxupquoteJean-François B2023-03-314-2/+24
|
* Ignore SIM910 for time being to appease flake8-simplify 0.20.0Jean-François B2023-03-311-0/+1
|
* Pin to ruff==0.0.259 (provisory)Jean-François B2023-03-311-1/+1
| | | | | This is because I would like CI to succeed for a while in order to merge some LaTeX patch.
* LaTeX: rename ``\sphinxnotetitle`` into ``\sphinxstylenotetitle`` (etc)Jean-François B2023-03-274-76/+73
| | | | | Follow-up to #11266. Using \sphinxstyle prefix looked a posteriori better, for coherency, although it is a bit long.
* Update CHANGESJean-François B2023-03-271-2/+3
|
* LaTeX: let \sphinxremovefinalcolon work also if no colon in inputJean-François B2023-03-272-7/+28
|
* Fix typos found by codespellDimitri Papadopoulos2023-03-2716-20/+20
|
* LaTeX: add \sphinxnotetitle et al.Jean-François B2023-03-264-41/+101
| | | | | | | | 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.
* LaTeX: let mark-up for seealso directive use explicit colon (fix #11264)Jean-François B2023-03-265-11/+11
|
* Provis. ignore onerror depr. warn when install. DocUtils with 3.12-devJean-François B2023-03-261-0/+6
|