Commit Graph

4757 Commits

Author SHA1 Message Date
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
Takeshi KOMIYA
f7431b927c Fix #8084: autodoc: KeyError is raised on documenting a broken attribute
``typing.get_type_hints()`` raises KeyError when a class having invalid
__module__ was given.  This handles the exception not to crash on build
documents.
2020-08-09 23:43:01 +09:00
Takeshi KOMIYA
51332c7b08 Fix #8074: napoleon: Crashes during processing C-ext module
inspect.getfile() raises TypeError if given object is a C-extension.
This handles the exception not to be crashed.
2020-08-09 00:46:30 +09:00
Takeshi KOMIYA
40bdeb2c16 Bump version 2020-08-08 18:13:51 +09:00
Takeshi KOMIYA
0ff74155df Bump version 2020-08-08 18:13:03 +09:00
Takeshi KOMIYA
e91f8a7d05 Bump to 3.2.0 final 2020-08-08 18:09:52 +09:00
Takeshi KOMIYA
b4efb8cd0e Merge CHANGES of 3.1.3 (unreleased) to 3.2.0 2020-08-08 18:09:08 +09:00
Takeshi KOMIYA
5fd89964c5 Update CHANGES for PR #8071 2020-08-08 17:15:09 +09: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
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
e188d56ed1 Update CHANGES for PR #8049 2020-08-07 23:40:11 +09:00
Takeshi KOMIYA
e4e9a0f4be Update CHANGES for PR #7799 2020-08-06 11:01:52 +09:00
Takeshi KOMIYA
9c55630018 Update CHANGES for PR #8048 2020-08-06 10:57:43 +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
Takeshi KOMIYA
46f0b3063d refactor: autodoc: Add EMPTY that matches to no members
Add a special class `_Empty` to make the comparison of
:exclude-members: option simply.  It never matches to any members.
2020-08-03 01:59:53 +09:00
Takeshi KOMIYA
57af828882 Merge pull request #8035 from tk0miya/8034_argument_for_private-members
Close #8034: autodoc: :private-member: can take an list of member names
2020-08-03 01:57:13 +09:00
Takeshi KOMIYA
5d301b44b9 Fix #8032: autodoc: A typehint for inherited ivars is not shown
This tries to import the parent object for the instance attribute
to get type annotations for the variable.
2020-08-02 18:27:03 +09:00
Takeshi KOMIYA
cc25bac264 Merge pull request #8031 from tk0miya/8030_annotated_ivar_isnt_shown_with_inherited_members
Fix #8030: autodoc: An annotated instance variable is not documented
2020-08-02 18:25:22 +09:00
Takeshi KOMIYA
03a6028663 Merge pull request #8028 from tk0miya/8011_ivar_for_autosummary
Close #8011: autosummary: Support instance attributes
2020-08-02 18:24:32 +09:00
Jakob Lykke Andersen
89df9a18d2 Merge pull request #8037 from jakobandersen/cpp_template_nontype
C++, fix non-type template parameter parsing
2020-08-02 11:22:45 +02:00
Jakob Lykke Andersen
a99039b13b C++, fix non-type template parameter parsing
Fixes sphinx-doc/sphinx#7944
2020-08-02 10:34:51 +02:00
Takeshi KOMIYA
af15593c0c Close #7768: i18n: figure_language_filename supports {docpath} token
To build structured i18n imaging directory, figure_language_filename
now supports `{docpath}` token that is a dirname of the current
document.
2020-08-02 16:28:54 +09:00
Matthias Geier
416438366d Update CHANGES for PR #7986 2020-08-01 20:17:42 +02:00
Takeshi KOMIYA
d7a84e83cc Close #8034: autodoc: :private-member: can take an list of member names
Now :private-member: option can take an explicit list of member names to
be documented as its arguments (like :special-members: does).
2020-08-02 01:27:14 +09:00
Takeshi KOMIYA
6225ffd238 Fix #8030: autodoc: An annotated instance variable is not documented
Documenter.filter_members() have wrongly considered that an instance
variable not having a docstring should be skipped when
`:inherited-members:` option given.

This fixes the behavior when the instance variable has annotated.

Note: This doest not still detect well for not annotated instance
variables.
2020-08-01 22:05:12 +09:00
Takeshi KOMIYA
92e863fb24 Close #8011: autosummary: Support instance attributes
This allows the autosummary directive to take instance attributes to
build documents for them.
2020-08-01 19:19:18 +09:00
Takeshi KOMIYA
f71b26ac56 Merge branch '3.x' into 7993_texinfo_for_nested_desc 2020-08-01 15:50:55 +09:00