Commit Graph

4633 Commits

Author SHA1 Message Date
Takeshi KOMIYA
0f6522e5d1 Merge pull request #8076 from tk0miya/6914_wrong_numfig
Fix #6914: figure numbers are unexpectedly assigned to uncaptioned items
2020-10-04 15:52:13 +09:00
Takeshi KOMIYA
66dda1fc50 Fix #6914: figure numbers are unexpectedly assigned to uncaptioned items
The figure numbers should be assigned to items only having captions or
titles.  This uses `get_numfig_title()` to ensures it on assign numbers.
2020-10-04 14:32:56 +09:00
Takeshi KOMIYA
2d37ba4419 autodoc: deprecate SingledispatchFunctionDocumenter
In #7487, SingledispatchFunctionDocumenter is merged into
FunctionDocumenter.  SingledispatchMethodDocumenter is also.  As a result,
They are no longer needed.  So this deprecates them.
2020-10-04 13:50:10 +09:00
Takeshi KOMIYA
d8cb7aa4f6 Merge pull request #8120 from tk0miya/6640_allow_to_override_system_message
Fix #6640: i18n: Failed to override system message translation
2020-10-04 13:48:04 +09:00
Takeshi KOMIYA
37235c71e0 Fix #6640: i18n: Failed to override system message translation
Our document describes that users can override system messages via
their own message catalog named `sphinx.mo` under the locale_dirs.
But it has not been used since its beginning of i18n mechanism because
the priority of users' message catalog is lower than system's.

This makes the priority of users' message catalog higher than system's.
2020-10-04 13:31:37 +09:00
Takeshi KOMIYA
3096b71c1c Merge branch '3.x' into 7964_tuple_in_signature 2020-10-04 11:53:41 +09:00
Takeshi KOMIYA
9a0a0f9ae1 Fix #8157: autodoc: TypeError is raised when annotation has invalid __args__
Typically, the __args__ attribute of type annotations is a tuple
containing arguments for the types (ex. The __args__ of `List[int]` is
`(int,)`).  But some kind of types has non tuple __args__ attribute.
For example, `nptyping.NDArray` is one of them.

This fixes the TypeError when the invalid __args__ attribute found.
2020-10-04 11:43:57 +09:00
Takeshi KOMIYA
d1f8dddeff Update CHANGES for PR #8277 2020-10-04 10:15:38 +09:00
Takeshi KOMIYA
88b81a06eb Merge pull request #8272 from francoisfreitag/strip_whitespaces
Strip trailing whitespaces and normalize line endings
2020-10-03 21:42:53 +09:00
François Freitag
5ea8ee133d Fix #8268: make linkcheck report HTTP errors 2020-10-03 14:33:29 +02:00
François Freitag
5166dd194c Strip trailing whitespaces and normalize line endings
Trailing whitespace do not have impact on the result, they are just
unused bytes. Most text editors are configured to strip trailing
whitespaces. Remove them all in one go.

Update a handful of files to use the UNIX line ending.
2020-10-03 13:47:01 +02:00
Takeshi KOMIYA
785f4d695c Fix #7964: autodoc: Tuple in default value is wrongly rendered
This implements tuple literal support to sphinx.pycode.ast.unparse().
2020-10-03 12:01:20 +09:00
Takeshi KOMIYA
1ff1f3cf5b Update CHANGES for PR #8142 2020-10-03 01:25:50 +09:00
Takeshi KOMIYA
bbf0754db1 Update CHANGES for PR #8257 2020-10-02 01:17:43 +09:00
Takeshi KOMIYA
d8c006f1c0 Merge pull request #8225 from tk0miya/8175_intersphinx_redos
Fix #8175: intersphinx: Potential of regex denial of service by inventory
2020-09-29 01:58:07 +09:00
Takeshi KOMIYA
3f584155a5 Update CHANGES for PR #8239 2020-09-28 01:41:49 +09:00
Takeshi KOMIYA
f7b872e673 Fix #8175: intersphinx: Potential of regex denial of service by inventory 2020-09-28 01:35:09 +09:00
Takeshi KOMIYA
f6ae4dd4ed Merge branch '3.x' into 8172_napoleon_redos 2020-09-28 01:15:40 +09:00
Takeshi KOMIYA
17ef17b1ef Merge pull request #8086 from tk0miya/8081_support_adding_latex_package_in_latter_phase
Close #8081: latex: Allow to add LaTeX package until writing tex file
2020-09-21 01:40:07 +09:00
Takeshi KOMIYA
5ef4825b57 Close #8081: latex: Allow to add LaTeX package until writing tex file
This postpones the evaluation of LaTeX packages via
``app.add_latex_package()`` to just before writing .tex file.  That
allows extensions to add LaTeX packages during reading and resolving
phase.
2020-09-21 01:01:49 +09:00
Takeshi KOMIYA
b454d4e4b0 Merge branch '3.x' into 8190_autodoc-process-docstring-without_ending_blankline 2020-09-21 00:49:23 +09:00
Takeshi KOMIYA
3c017dcdee Merge pull request #8206 from tk0miya/6169_pxjahyper_is_loaded_for_non_platex
Fix #8169: LaTeX: pxjahyper loaded even when latex_engine is not platex
2020-09-21 00:43:38 +09:00
Takeshi KOMIYA
f00e75278c Fix #8172: napoleon: Potential of regex denial of service in google style docs 2020-09-20 17:34:49 +09:00
Jakob Lykke Andersen
008d0201e1 Merge pull request #8207 from jakobandersen/c_alias_recursive
C, recursive alias declarations
2020-09-15 19:51:16 +02:00
Jakob Lykke Andersen
500f45fd4c C, recursive alias declarations
Fixes sphinx-doc/sphinx#8141
2020-09-13 16:37:53 +02:00
Takeshi KOMIYA
564a577a4a Fix #8169: LaTeX: pxjahyper loaded even when latex_engine is not platex 2020-09-13 11:10:33 +09:00
Takeshi KOMIYA
dfbe687db6 Merge branch '3.x' into 8103_cached_property 2020-09-13 11:07:33 +09:00
Takeshi KOMIYA
1d0b424898 Merge pull request #8112 from tk0miya/8100_better_error_for_html_static_files
Close #8100: html: Show a better error message for html_static_files
2020-09-13 11:06:41 +09:00
Takeshi KOMIYA
0b44e68d4f Merge branch '3.2.x' into 3.x 2020-09-13 10:51:15 +09:00
Jakob Lykke Andersen
59766c2351 Update CHANGES after PR 2020-09-12 14:33:57 +02:00
Takeshi KOMIYA
fd3d654c17 Fix #8190: autodoc: parse error for docstring w/o ending blank lines
autodoc raises a parsing error if some extension generates a docstring
not having blank lines at the tail.  This appends a blank line if
generated one does not contain it.
2020-09-12 16:04:41 +09:00
Takeshi KOMIYA
42bfed2cb3 Fix #8192: napoleon: description is disappeared by inline literals
The napoloen wrongly parses a parameter definition because regexp
matches literal string by longest match unexpectedly.
2020-09-10 22:34:38 +09:00
Takeshi KOMIYA
e0b2162a77 Fix #8143: AttributeError if autodoc_default_options contains False
autodoc crahses when autodoc_default_options contains False value
unexpectedly.  After this change, it also accepts False.
2020-08-22 00:50:29 +09:00
Takeshi KOMIYA
f861b4cd1a Merge branch '3.2.x' into 3.x 2020-08-14 19:58:25 +09:00
Takeshi KOMIYA
d3af1cde2b Merge tag 'v3.2.1' into 3.x 2020-08-14 19:57:09 +09:00
Takeshi KOMIYA
fabe685638 Bump version 2020-08-14 19:55:41 +09:00
Takeshi KOMIYA
3597942810 Bump to 3.2.1 final 2020-08-14 19:53:48 +09:00
Takeshi KOMIYA
d391212101 Merge branch '3.2.x' into 8099_NameError_for_TYPE_CHECKING 2020-08-14 14:37:19 +09:00
Takeshi KOMIYA
b2d524d2b2 Merge branch '3.2.x' into 3.x 2020-08-14 14:24:11 +09:00
Takeshi KOMIYA
ec7e8aa5eb Update CHANGES for PR #8058 2020-08-14 14:23:03 +09:00
Jakob Lykke Andersen
52140be6b8 C and C++, parsing function attributes
Fixes sphinx-doc/sphinx#8114
2020-08-13 18:39:28 +02:00
Jakob Lykke Andersen
d72fedb69d C++, fix template template parameter parsing
https://github.com/sphinx-doc/sphinx/pull/8037#issuecomment-673511490
2020-08-13 17:08:39 +02:00
Takeshi KOMIYA
1bca9f9587 Close #8100: html: Show a better error message for html_static_files
The HTML Builder crashes if error raised on copying html_static_files.
This handles the exception and show a better error message to let users
the reason of errors (ex. failed on extracting Jinja templates).
2020-08-14 00:07:01 +09:00
Takeshi KOMIYA
088b049170 Fix #8103: autodoc: cached_property is not considered as a property
sphinx.util.inspect:isproperty() does not considers that
cached_property decorator that has been added since Python 3.8 is
a kind of properties.  This fixes it.
2020-08-13 23:16:59 +09:00
Takeshi KOMIYA
611fff975e Fix #8099: autodoc: NameError is raised when script uses TYPE_CHECKING
`typing.get_type_hints()` raises NameError when the target object
contains unresolavable type annotation (ex. TYPE_CHECKING).  This
handles the exception and use unresolved annotations for type hints.
2020-08-13 22:57:12 +09:00
Takeshi KOMIYA
99e36398fc Update CHANGES for PR #8095 2020-08-13 22:38:57 +09:00
Takeshi KOMIYA
4baa7ce99b Update CHANGES for PR #8102 2020-08-13 01:53:30 +09:00
Takeshi KOMIYA
bb09f92154 Fix #8091: autodoc: AttributeError is raised on documenting an attribute
Until Python 3.5.2, typing.get_type_hints() raises AttributeError if
given object does not have `__code__` attribute.  This handles the
exception not to crash building documents.

Note: The AttributeError was fixed at 3.5.3
refs: 991d14fee1
2020-08-10 16:24:13 +09:00
Takeshi KOMIYA
bf26080042 Merge branch '8084_KeyError_for_broken_class' into 3.2.x 2020-08-10 16:06:28 +09:00
Takeshi KOMIYA
24f690c9e5 Merge branch '3.x' into 8084_KeyError_for_broken_class 2020-08-10 14:23:49 +09:00