Commit Graph

3568 Commits

Author SHA1 Message Date
Takeshi KOMIYA
178c05b059 Close #7996: manpage: Add man_make_section_directory
Add a new config variable; man_make_section_directory to make a
section directory on build man page.  During 3.x, it defaults to
False and will be changed to True on 4.0 release.
2020-10-03 22:30:20 +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
Takeshi KOMIYA
1eaa06844e Merge pull request #8269 from francoisfreitag/raise-anchor
Fix #8268: make linkcheck report HTTP errors
2020-10-03 21:42:29 +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
f2c0dfe7c4 Close #6518: autodoc: Add autodoc_type_aliases
autodoc_type_aliases allows to keep user defined type alises not
evaluated in the generated document.
2020-10-03 16:03:35 +09: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
ec06f5571e Merge pull request #8142 from jcarrano/typing-generic-signatures
autodoc: fix constructor signatures for classes derived from typing.Generic
2020-10-03 01:23:36 +09:00
Robert Cohn
3d81abef9c respond to review comments 2020-10-01 11:12:39 -04:00
Robert Cohn
c08214fe92 add parallel to SphinxTestApp 2020-09-30 20:47:56 -04:00
Takeshi KOMIYA
b454d4e4b0 Merge branch '3.x' into 8190_autodoc-process-docstring-without_ending_blankline 2020-09-21 00:49:23 +09:00
Jakob Lykke Andersen
49e7400123 C, fix names in get_objects()
Fixes sphinx-doc/sphinx#8160
2020-09-14 21:16:15 +02:00
Takeshi KOMIYA
dfbe687db6 Merge branch '3.x' into 8103_cached_property 2020-09-13 11:07:33 +09:00
Takeshi KOMIYA
0b44e68d4f Merge branch '3.2.x' into 3.x 2020-09-13 10:51:15 +09:00
Takeshi KOMIYA
85b24a2e88 Fix our test failed with pygments-2.7.0
Since pygments-2.7.0, it has changed the style of output HTML.
That makes our test broken.  This fixes it to pass with new pygments.
2020-09-13 10:42:07 +09: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
Juan Carrano
740be7f2a5 autodoc: blacklist typing.Generic.__new__
When documenting classes derived from typing.Generic (essentially all classes in the
typing module) the constructor signature would show an unhelpful (*args, **kwds).

typing.Generic has a __new__ method which was picked up by sphinx. With this patch it
is skipped and constructor signatures for generic classes are shown as they should.
2020-08-21 18:47:50 +02:00
Juan Carrano
642686159f autodoc: Test the signature of typing.Generic subclasses.
This test is currently failing because typing.Generic.__new__ clobbers the
real signature.
2020-08-21 18:47:14 +02:00
Daniel Hofmann
3e479d772b Closes #8123: Fix plus-handling (+) in search terms for basic html theme search
Note, that the default splitter will not index +, so this isn't of much of much use, unless
the splitter of the search-language is reconfigured.
2020-08-19 18:01:27 +02:00
Keewis
439f75afd2 enable preprocessing in the tests 2020-08-18 16:01:52 +02:00
Keewis
3c24021972 Merge branch '3.x' into preprocess-other-sections 2020-08-18 15:47:53 +02:00
Takeshi KOMIYA
d3af1cde2b Merge tag 'v3.2.1' into 3.x 2020-08-14 19:57:09 +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
dab15e2857 Merge pull request #8058 from nijel/single-domain
i18n: Add support for having single text domain
2020-08-14 14:21:43 +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
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
Keewis
1c388241b4 default to False and update the tests 2020-08-12 19:48:07 +02:00
Keewis
27c252ccba only preprocess if the preprocessor is enabled 2020-08-10 13:04:21 +02:00
Michal Čihař
1bf7fe424e i18n: Add support for having single text domain
The gettext_compact can now be a string which is then a single domain
for all documents.

Fixes #784
2020-08-07 20:22:30 +02:00
Takeshi KOMIYA
88b2ec6c34 Fix #8041: autodoc: An ivar on super class is not shown unexpectedly
An annotated instance variable on super class is not documented when
derived class has also other annotated instance variables because
`obj.__annotations__` is overrided by derived class's type hints.

To get annotations of the target class correctly, this scans MRO to
get all of annotated instance variables.
2020-08-08 00:21:29 +09:00
Keewis
b69c5119b5 Merge branch '3.x' into preprocess-other-sections 2020-08-07 16:56:00 +02:00
Takeshi KOMIYA
a4996f9054 Fix #7780: napoleon: multiple params declaration was wrongly recognized
So far, napoleon converts multiple paramaters declrarations to single
paramaeter fields (`:param:` and `:type:`) unexpectedly.  As a result,
the output seems broken.

This converts it to multiple parameter fields (a pair of field for each
parameter declration) to build parameter successfully.

Note: The conversion rule is available only when napoleon_use_params=True.
2020-08-07 23:46:55 +09:00
Takeshi KOMIYA
99e65a59be napoleon: Fix a broken test (refs: #8049)
Fix a testcase that added just before #8049 merged.
2020-08-07 23:44:32 +09:00
Takeshi KOMIYA
62a6df8f3c Merge pull request #8049 from keewis/type-preprocessing-without-use_param
enable type preprocessing without use_param
2020-08-07 23:37:22 +09:00
Keewis
95c861facb always use :obj: instead of searching the inventory 2020-08-07 12:44:22 +02:00
Keewis
75602f290a make sure the roles are stripped from invalid names, too 2020-08-06 16:38:49 +02:00
Keewis
4428393403 translate the functions before attempting to find a matching role 2020-08-06 14:08:34 +02:00
Takeshi KOMIYA
64a26ff4de Merge pull request #7799 from keewis/escape-combined-args-kwargs
Escape combined args kwargs
2020-08-06 10:59:21 +09:00
Keewis
849d3c18a7 remove the syntax checks from the escape method and update the tests 2020-08-05 19:22:43 +02:00
Takeshi KOMIYA
784e7636d9 Merge pull request #8025 from tk0miya/6698_no-trim-flags
Close #6698: doctest: Add :trim-flags: and :no-trim-flags: options
2020-08-06 00:29:36 +09:00
Takeshi KOMIYA
059dc108ba Close #6698: doctest: Add :no-trim-doctest-flags: options
To control trimming doctest flags manually, this adds new options
:trim-doctest-flags: and :no-trim-doctest-flags: to doctest
directives.  It helps to describes doctest module itself in python
doc (see #6698).
2020-08-05 23:39:05 +09:00
Keewis
e697242451 fix the tests by falling back to a empty dict on AttributeError 2020-08-04 20:50:02 +02:00
Keewis
e9f9da5326 Merge branch '3.x' into preprocess-other-sections 2020-08-04 19:33:28 +02:00
Keewis
478ab44d7e Merge branch '3.x' into escape-combined-args-kwargs 2020-08-04 18:38:03 +02:00
Takeshi KOMIYA
fcf63a20cd Merge pull request #8021 from keewis/fix-type-preprocessor
Fix type preprocessor
2020-08-05 00:19:29 +09:00
Keewis
c812370427 expect the normal raises and yields to be preprocessed, too 2020-08-04 14:59:54 +02:00
Keewis
47da37e1d9 make sure strings are not split using other delimiters 2020-08-04 12:28:30 +02:00