Commit Graph

4936 Commits

Author SHA1 Message Date
Takeshi KOMIYA
c941b9cb14 Merge pull request #8481 from tk0miya/8480_slots_attributes
Fix #8480: autoattribute could not create document for __slots__ attributes
2020-11-24 21:53:48 +09:00
Takeshi KOMIYA
ab844c3f27 Deprecate SlotsAttributeDocumenter 2020-11-24 19:36:14 +09:00
Takeshi KOMIYA
bbc1ce368c Update CHANGES for PR #8478 2020-11-23 17:24:28 +09:00
Takeshi KOMIYA
0131f776fb Merge pull request #8475 from tk0miya/8131_too_many_redirects
Extend linkchecker GET fallback logic to handle Too Many Redirects
2020-11-23 17:16:51 +09:00
Takeshi KOMIYA
bffa44670e CHANGES: Fix line length 2020-11-23 17:00:48 +09:00
Takeshi KOMIYA
7a0605ade1 Update CHANGES
Co-authored-by: François Freitag <mail@franek.fr>
2020-11-23 16:57:45 +09:00
Takeshi KOMIYA
50dad211ed Fix #8480: autoattribute could not create document for __slots__ attributes 2020-11-23 15:28:53 +09:00
Takeshi KOMIYA
5ebacaec89 Merge branch '3.x' into 8460_TypeVar 2020-11-23 13:58:41 +09:00
Takeshi KOMIYA
64498ad0db Merge pull request #8464 from tk0miya/deprecate_Documenter.get_object_members
Deprecate Documenter.get_object_members()
2020-11-23 13:24:20 +09:00
Takeshi KOMIYA
37f06cfba9 Fix #8131: linkcheck: Too Many Redirects on HEAD request is treated as broken 2020-11-23 01:45:43 +09:00
Takeshi KOMIYA
96fe4c110c Fix #8446: html: consecutive spaces are displayed as single space
In HTML, consecutive spaces are considered as single space by HTML
browsers.  To represent them as is, we have to escape them on rendering
them into HTML.  This starts to escape the whole of desc_signature node.
2020-11-22 23:12:04 +09:00
Takeshi KOMIYA
a57ce4047c refactor: Move _getannotations() to sphinx.util.inspect 2020-11-22 15:38:01 +09:00
Takeshi KOMIYA
9eb96d5c79 Fix #8460: autodata directive does not display the detail of TypeVars
The details are only shown when automodule directive is used.  This
allows to document them via other auto* directives.
2020-11-22 13:57:48 +09:00
Takeshi KOMIYA
24a329eebe Merge pull request #8465 from tk0miya/8460_NewType
Fix #8460: autodoc: Support custom types defined by typing.NewType
2020-11-22 13:47:39 +09:00
Takeshi KOMIYA
a356d8611e Merge pull request #8468 from tk0miya/refactor_pycode
Rename ModuleAnalyzer.parse() to analyze()
2020-11-22 11:46:37 +09:00
Takeshi KOMIYA
8e29d57395 Rename ModuleAnalyzer.parse() to analyze()
The word "analyze" is much appropriate for "ModuleAnalyzer" instead
of "parse".
2020-11-22 02:59:29 +09:00
Takeshi KOMIYA
ad804647b5 Merge pull request #8459 from tk0miya/8452_autodoc_type_aliases_with_autodoc_typehints
Fix #8452: autodoc_type_aliases doesn't work with autodoc_typehints
2020-11-22 01:34:31 +09:00
Takeshi KOMIYA
333e7a447e Fix #8452: autodoc_type_aliases doesn't work with autodoc_typehints 2020-11-22 01:26:32 +09:00
Takeshi KOMIYA
93d6c212f7 Fix #8460: autodoc: Support custom types defined by typing.NewType
A custom type defined by typing.NewType was rendered as a function
because the generated type is a function having special attributes.
This renders it as a variable.

Note: The module name where the NewType object defined is lost on
generating it.  So it is hard to make cross-reference for these custom
types.
2020-11-21 23:04:42 +09:00
Takeshi KOMIYA
7e3ba5ddf6 Deprecate Documenter.get_object_members()
At present, the implementation of Documenter.get_object_members() is
only for class objects.  In fact, no subclasses use it (all of them are
overriding the method).

This deprecates Documenter.get_object_members() and copies it to
ClassDocumenter.get_object_members().
2020-11-21 15:42:46 +09:00
Takeshi KOMIYA
6620bd91d8 Merge branch '3.x' into 8437_safety_make_clean 2020-11-21 01:56:07 +09:00
Takeshi KOMIYA
e8b7fd2fce Merge branch '3.x' into 8454_graphviz_layout_option 2020-11-21 00:58:19 +09:00
Takeshi KOMIYA
dcd8ff544a Fix #8443: autoattribute does not support uninitialized ivars 2020-11-20 22:39:21 +09:00
Takeshi KOMIYA
f344fff55e Fix #8443: autodata directive does not support PEP-526 ivars 2020-11-20 22:38:58 +09:00
Takeshi KOMIYA
0071409fe0 Fix #8454: graphviz: The layout option for graph and digraph don't work 2020-11-20 22:34:22 +09:00
Takeshi KOMIYA
ae3a26fd71 Fix #8437: Do make clean in more safe way
When users gives empty BUILDDIR to the `make clean` command on non-make
mode, our Makefile will remove all of files of systems via `rm -rf /*`.
To prevent the catastrophic operation, this makes the `make clean`
command safety.
2020-11-20 01:08:52 +09:00
Takeshi KOMIYA
d0389dce07 Fix #8419: html search: Do not load language_data.js in non-search pages
The ``language_data.js`` is only used on search page.  But it is always
loaded meaninglessly.  This fixes not to load it on all non-search pages.
2020-11-19 02:14:56 +09:00
Takeshi KOMIYA
3becd56e0e Merge branch '3.x' into 8222_novalue 2020-11-17 23:56:42 +09:00
Takeshi KOMIYA
44fbe9da7b Fix #8434: autodoc_type_aliases does not effect to variables 2020-11-16 02:11:15 +09:00
Takeshi KOMIYA
a4ccca76ec Update CHANGES for PR #8222 2020-11-15 14:23:38 +09:00
Takeshi KOMIYA
78d407cf83 Update CHANGES for PR #8404 2020-11-14 18:55:25 +09:00
François Freitag
683635f5b4 linkcheck: Remove call to is_ssl_error()
This method always returns False, it is dead code. The exception
checking stopped working because Requests library wraps SSL errors in a
`requests.exceptions.SSLError` and no longer throws an
`urllib3.exceptions.SSLError`. The first argument to that exception is
an `urllib3.exceptions.MaxRetryError`.
2020-11-12 19:58:04 +01:00
Takeshi KOMIYA
a3af1e860b Merge branch '3.3.x' into 3.x 2020-11-12 23:40:41 +09:00
Takeshi KOMIYA
97c5f63b62 Bump version 2020-11-12 23:23:20 +09:00
Takeshi KOMIYA
c09795c194 Bump to 3.3.1 final 2020-11-12 23:21:14 +09:00
Takeshi KOMIYA
953a5ec898 Fix #8350: autosummary_mock_imports causes slow down builds
The mock objects set up via `autosummary_mock_imports` causes slow down
of autosummary stub generation because AttributeDocumenter falls into
infinite recursion call to unwrap decorators of mocked objects.

To avoid the trouble, this blocks unwrapping decorators of mocked
objects.
2020-11-12 01:55:42 +09:00
Takeshi KOMIYA
4664814ed2 Merge pull request #8397 from tk0miya/apply_get_type_hints
autodoc: Add Optional[t] to annotation of function and method
2020-11-10 22:31:38 +09:00
Takeshi KOMIYA
de2d2cc6ac Update CHANGES for PR #8399 2020-11-10 22:20:52 +09:00
Takeshi KOMIYA
9154bc5456 Merge branch '3.3.x' into 3.x 2020-11-10 20:40:55 +09:00
Takeshi KOMIYA
e2836c4361 Update CHANGES for PR #8231 2020-11-10 20:40:44 +09:00
Takeshi KOMIYA
6d1cafe7bd autodoc: Add Optional[t] to annotation of function and method
As typing.get_type_hints() doing, this adds Optional[t] to type
annotations if a default value equal to None is set.

Note: this is default behavior of inspect.signature() since Python 3.10.
2020-11-10 02:41:58 +09:00
Takeshi KOMIYA
51da043791 refactor: Add `Documenter.config` as a shortcut to access the config object 2020-11-10 00:43:23 +09:00
Takeshi KOMIYA
ed5af2461f Merge branch '3.3.x' into 7727_autosummary_PycodeError 2020-11-10 00:31:44 +09:00
Takeshi KOMIYA
e2bf9166da Fix #8219: autodoc: Parameters for generic base class are not shown 2020-11-09 02:34:49 +09:00
Takeshi KOMIYA
787444ff18 Fix #7727: autosummary raises PycodeError for namespace python package 2020-11-09 02:06:14 +09:00
Takeshi KOMIYA
e3eec9f0e1 Fix #8372: autodoc: autoclass directive became slower than Sphinx-3.2
* The result of ModuleAnalyzer.parse() is not cached
* autodoc tries to search overloaded constructor methods to the root
  class even if a definition found
2020-11-08 23:23:32 +09:00
Takeshi KOMIYA
896ecc34d7 Merge branch '3.x' into 8119_control_appearance_of_member_not_in_module.__all__ 2020-11-08 17:40:13 +09:00
Takeshi KOMIYA
1955a08378 Merge branch '3.x' into 8105_incorrect_class_constructor 2020-11-08 12:34:09 +09:00
Jakob Lykke Andersen
1193d83166 Update CHANGES 2020-11-07 10:40:30 +01:00
Takeshi KOMIYA
6d05b1aeb3 Fix #8105: autodoc: the signature of decorated class is incorrect
In #7651, autodoc stops to undecorate the functions on getting the
signature from the callables.  But some kinds of decorators conceals
the correct signature because they pass through their arguments via
`(*args, **kwargs)`.

This restarts to undecorate the functions again as before #7651.
2020-11-05 01:57:40 +09:00