Commit Graph

18540 Commits

Author SHA1 Message Date
Takeshi KOMIYA
13803a79e7 Support docutils-0.18: Consume iterator of Element.traverse()
Since 0.18, Element.traverse() returns an iterator instead of
intermediate object.  As a result, the return value is always considered
as truthy value.  And it becomes fragile when the caller modifies the
doctree on the loop.
2021-10-27 01:49:59 +09:00
Takeshi KOMIYA
2be9d6b092
Merge pull request #9774 from sphinx-doc/bot/pull-translations
Update message catalogs
2021-10-26 01:54:06 +09:00
tk0miya
498bcad4fb Update message catalogs 2021-10-25 16:48:09 +00:00
Takeshi KOMIYA
20ed920352
Merge pull request #9768 from tk0miya/fix_transifex_client
Fix CI: Downgrade python for transifex CI
2021-10-26 01:47:11 +09:00
gibsondan
b1c0d1f00e Closes #9733: Fix for logging handler flushing warnings in the middle of the build
Summary:
My project was mysteriously dropping warnings (see https://github.com/sphinx-doc/sphinx/issues/9733 for detailed repro) and I realized that it's becaues it imports libraries like airflow or mlflow that set up loggers automatically when they are imported. This causes this handler to flush even though shouldFlush is set to always return False. A simple workaround is to override flush to be a no-op.

Test Plan: Repeat repro steps from #9733 - project now always includes warnings
2021-10-25 10:17:01 -05:00
François Freitag
70e0c314ca Fix linkcheck_auth link to Requests authentication
The link was directing to
https://www.sphinx-doc.org/en/master/usage/requests-auth>. Prefer using
the intersphinx module to generate the link, it’s more robust than
directly linking to the page.
2021-10-25 15:04:15 +02:00
Takeshi KOMIYA
c39cf2e750 Fix CI: Downgrade python for transifex CI 2021-10-25 11:00:01 +09:00
Takeshi KOMIYA
f57178739e
Merge pull request #9767 from tk0miya/fix_transifex_client
Fix CI: Downgrade python for transifex CI
2021-10-25 09:41:37 +09:00
Takeshi KOMIYA
71c1fb01b9 Fix CI: Downgrade python for transifex CI
The latest transifex-client could not be installed on python 3.10
environment.  This downgrade python to 3.9 to be install the latest one.

ref: https://github.com/transifex/transifex-client/pull/330
2021-10-25 09:31:43 +09:00
Takeshi KOMIYA
15807d7de0
Merge pull request #9765 from mitya57/typo
Fix a typo in variable name
2021-10-24 03:13:56 +09:00
Dmitry Shachnev
66ec92b2a2 Fix a typo in variable name 2021-10-23 14:33:00 +03:00
Takeshi KOMIYA
3ad591a631 Update CHANGES for PR #9737 2021-10-23 17:07:39 +09:00
Takeshi KOMIYA
b097213098
Merge pull request #9737 from ahippo/latex-aggedright
LaTeX: fix '\raggedright' escaping causing "aggedright" text
2021-10-23 17:06:03 +09:00
Takeshi KOMIYA
b60c43e1d0 Update CHANGES for PR #9685 2021-10-23 16:41:20 +09:00
Takeshi KOMIYA
aea2af418e
Merge pull request #9685 from MatthijsBurgh/patch-1
Set refdoc to be used by missing-reference, intersphinx
2021-10-23 16:22:50 +09:00
Takeshi KOMIYA
b778ee806e Fix #9752: autodoc: Failed to detect type annotation for slots attribute 2021-10-23 14:59:36 +09:00
Takeshi KOMIYA
e6f9603494 Update CHANGES for PR #9763 2021-10-23 13:03:12 +09:00
Takeshi KOMIYA
5daa320d4a
Merge pull request #9763 from QuLogic/fix-parameter-breaks
Fix selection of parameter names in HTML theme
2021-10-23 12:43:18 +09:00
Elliott Sales de Andrade
ac6935bc44 Fix selection of parameter names in HTML theme
Parameters are written in HTML as (leaving out some internal classes):
```
<strong>name</strong><span class="classifier"><a><code><span>TypeName</span></code></a></span>
```
but in rendered form there's a colon between the name and type. This
colon is inserted virtually using CSS, but since it doesn't exist, the
browser thinks both sides are part of the same word.

Styling the virtual text as inline block makes it be treated as a break,
but also makes it apply vertical margins, so we need to set those to
zero again.

See https://github.com/matplotlib/matplotlib/issues/21432
2021-10-22 17:48:21 -04:00
Takeshi KOMIYA
cf96c93cf1
Merge pull request #9724 from tk0miya/support_PreBibliographic_nodes
Support docutils-0.18: allow PreBibliographic nodes before docinfo
2021-10-23 02:33:00 +09:00
Takeshi KOMIYA
8118f979dc Support docutils-0.18: allow PreBibliographic nodes before docinfo
Since 0.18, `meta` directive inserts meta node into the top of the
document.  It confuses MetadataCollector.

This allows doctree contains PreBibliographic nodes just before docinfo
node.
2021-10-23 02:20:46 +09:00
Takeshi KOMIYA
cc85aef61e
Merge pull request #9725 from tk0miya/set_auto_id_prefix_explicitly
Support docutils-0.18: Set auto_id_prefix explicitly
2021-10-23 02:19:41 +09:00
Takeshi KOMIYA
3045e81d6e Update CHANGES for PR #9755 2021-10-23 02:19:03 +09:00
Chris Lamb
ff533f59bb Make util.typing.restify sanitise unreproducible output (eg. memory addresses)
Whilst working on the Reproducible Builds effort [0] I noticed that sphinx
generates output that is not reproducible, causing a number of packages in
Debian to unreproducible.

Specifically, when Sphinx locates an alias of an instance when generating
'autodoc' documentation, it uses the raw Python repr(...) of the object and
does not sanitise it for memory addresses (etc.) like elsewhere in Sphinx.

This can result in documentation like this:

-<dd><p>alias of &lt;webob.client.SendRequest object at 0x7fd769189df0&gt;</p>
+<dd><p>alias of &lt;webob.client.SendRequest object at 0x7f0f02233df0&gt;</p>

Patch attached that uses the object_description method, which was added to fix
precisely this kind of issue.

I originally filed this in Debian as bug #996948 [1].

 [0] https://reproducible-builds.org/
 [1] https://bugs.debian.org/996948
2021-10-23 02:18:01 +09:00
Takeshi KOMIYA
ced8895b12 Fix #9756: autodoc: Crashed if classmethod does not have __func__ attribute 2021-10-23 02:14:57 +09:00
Takeshi KOMIYA
6472fb9224
Merge pull request #9745 from sphinx-doc/bot/pull-translations
Update message catalogs
2021-10-21 01:29:30 +09:00
Takeshi KOMIYA
afb44f15f8
Merge pull request #9753 from Marsfan/patch-1
Add missing space in intersphinx doc
2021-10-21 01:28:57 +09:00
Gabe R
1bc98b7860
Add missing space in intersphinx doc
There was a space missing between `-m` and `sphinx.ext.intersphinx` in the example of showing all mappings in a intersphinx file. I added it in.
2021-10-19 11:33:23 -07:00
tk0miya
05ed77475f Update message catalogs 2021-10-17 00:10:43 +00:00
Andrey Mazo
b3bce77b48 LaTeX: fix '\raggedright' escaping causing "aggedright" text
Sphinx version 4.0 introduced a bug in handling hlists in its LaTeX backend.
Due to improper backslash escaping,
LaTeX "\raggedright" command gets written as
Carriage Return character (0x0D) followed by "aggedright".

This results in stray "aggedright" text appearing in the resulting PDF
and lack of effect \raggedright was supposed to achieve.

Fix this by converting the remaining string to a raw string.

This appears to be the only occurrence of such a missing escaping
based on a quick grep.

Fixes #9734.

Fixes: 20884bb0c9: "refactor: LaTeX: Use raw strings for LaTeX macros"
2021-10-15 02:40:31 +03:00
Matthijs van der Burgh
6363ed4ddd Set refdoc default to pending_xref nodes to be used by missing-reference 2021-10-10 22:02:53 +02:00
Takeshi KOMIYA
f9a33d2b3a Support docutils-0.18: Set auto_id_prefix explicitly
Since docutils-0.18, auto_id_prefix setting will be changed to `'%'`
from `'id'`.  To keep backward compatibility of node IDs, this sets
`'id'` to settings explicitly.
2021-10-11 01:52:05 +09:00
Takeshi KOMIYA
56f97d71a2
Merge pull request #9719 from tk0miya/9718_intersphinx
Fix #9718: intersphinx: Failed to invoke sphinx.ext.intersphinx module
2021-10-10 19:46:07 +09:00
Takeshi KOMIYA
1b8d40b201
Merge pull request #9717 from tk0miya/9710_even_odd_rows
Fix #9710: html: Wrong styles for even/odd rows in nested tables
2021-10-10 19:45:45 +09:00
Takeshi KOMIYA
c6131066c8
Merge pull request #9722 from sphinx-doc/bot/pull-translations
Update message catalogs
2021-10-10 19:16:08 +09:00
tk0miya
d6be195e43 Update message catalogs 2021-10-10 09:52:50 +00:00
Takeshi KOMIYA
3b8456f74c
Merge pull request #9721 from tk0miya/docutils-0.18-traverse
refactor: Node.traverse() will returns generator since 0.18
2021-10-10 16:36:40 +09:00
Takeshi KOMIYA
179e0bf8a2 refactor: Node.traverse() will returns generator since 0.18 2021-10-10 15:50:39 +09:00
Takeshi KOMIYA
2adc41cb86 Fix #9718: intersphinx: Failed to invoke sphinx.ext.intersphinx module
A circular import was happened since #9701 merged.  This goes
lazy-import to avoid the error.
2021-10-09 19:06:27 +09:00
Takeshi KOMIYA
dd2ff3e911 Fix #9710: html: Wrong styles for even/odd rows in nested tables 2021-10-09 16:35:31 +09:00
Takeshi KOMIYA
3aabcd2f80 Update CHANGES for PR #9688 2021-10-09 16:29:19 +09:00
Takeshi KOMIYA
be36cf471b
Merge pull request #9679 from latosha-maltba/doc/directive-indent
Document indent behaviour for directives
2021-10-09 16:26:52 +09:00
Takeshi KOMIYA
15df18392a
Merge pull request #9688 from latosha-maltba/class-option-for-code-directive
Fix bug of Sphinx's .. code:: directive not recognizing :class: option
2021-10-09 16:26:29 +09:00
Takeshi KOMIYA
d412acd291
Merge branch '4.x' into class-option-for-code-directive 2021-10-09 16:10:04 +09:00
Takeshi KOMIYA
c09f28e74f
Merge pull request #9711 from tk0miya/9708_needs_extension_logic
Fix #9708: needs_extension failed to check double-digit version correctly
2021-10-09 15:34:03 +09:00
Takeshi KOMIYA
bbccb49680 Fix #9688: ImportError for set_classes() 2021-10-09 15:27:44 +09:00
Takeshi KOMIYA
23bb8bee85
Merge branch '4.x' into class-option-for-code-directive 2021-10-09 15:18:17 +09:00
Takeshi KOMIYA
2e36027474
Merge branch '4.x' into 9708_needs_extension_logic 2021-10-09 15:17:23 +09:00
Takeshi KOMIYA
81a4fd973d
Merge pull request #9699 from tk0miya/9683_add_css_file
Close #9683: Revert the removal of ``add_stylesheet()`` API
2021-10-09 15:12:43 +09:00
Takeshi KOMIYA
7da94ee7bb
Merge pull request #9698 from tk0miya/9697_property_with_parens
Fix #9697: An index entry with parens was registered for py:method
2021-10-09 15:12:31 +09:00