Commit Graph

17256 Commits

Author SHA1 Message Date
Takeshi KOMIYA
a476559abf Update CHANGES for PR #8539 2021-04-03 23:33:35 +09:00
Takeshi KOMIYA
ddb6e9c61c
Merge pull request #8539 from godlygeek/description_typehints_for_classes
Make autodoc_typehints="description" work with autoclass_content="class"
2021-04-03 23:28:08 +09:00
Takeshi KOMIYA
2b1d745c1b
Merge pull request #9035 from tk0miya/refactor_vartypes_search
refactor: Use PEP-526 based variable annotation (sphinx.search)
2021-04-03 14:13:16 +09:00
Takeshi KOMIYA
604faf5341
Merge pull request #9034 from tk0miya/refactor_vartypes_pycode
refactor: Use PEP-526 based variable annotation (sphinx.pycode)
2021-04-03 14:12:56 +09:00
Takeshi KOMIYA
bdbabb14c2 Merge branch '3.x' 2021-04-03 13:22:21 +09:00
Takeshi KOMIYA
8dbacb1442 Merge branch '3.5.x' into 3.x 2021-04-03 13:22:06 +09:00
Takeshi KOMIYA
c6c970e322
Merge pull request #9048 from tk0miya/fix_enum_sig
Fix testcase: the signature of Enum class has been changed since HEAD of 3.10
2021-04-03 13:21:46 +09:00
Takeshi KOMIYA
ec4d410c48 Fix testcase: the signature of Enum class has been changed since HEAD of 3.10 2021-04-03 13:08:31 +09:00
Takeshi KOMIYA
55ed1ecb66
Merge pull request #9042 from brechtm/patch-1
Docs: fix typo in env-merge-info
2021-04-03 01:04:33 +09:00
Brecht Machiels
ac0dcddeb8
Docs: fix typo in env-merge-info 2021-03-30 16:44:50 +02:00
Matt Wozniski
4c72848b85 Test autodoc_typehint_undoc
Add new tests to exercise the new autodoc_typehint_undoc option. Where
an existing test would have a meaningful behavior change with the new
option set to False, that test is copied, the new option is set to False
in the copy, and the assertions reflect the new expected behavior.

The new test test_autodoc_typehints_description_with_documented_init
illustrates the problem reported in #7329, and the new test
test_autodoc_typehints_description_with_documented_init_no_undoc
illustrates that this issue no longer occurs when the new
autodoc_typehint_undoc option is set to False.
2021-03-27 14:54:38 -04:00
Matt Wozniski
be2cee53a1 Use __init__ type hints in "description" mode
Previously, `__init__` type hints were not used when documenting a class
using `autodoc_typehints="description"`. This was done to prevent
documentation for parameters from showing up twice, both for the class
and the `__init__` special method. As the new ``autodoc_typehint_undoc``
option provides a better way to prevent this bad behavior by placing the
user in control of where the type hints are added, it is now safe to add
type hints for documented `__init__` parameters.

Closes #8178
2021-03-27 14:54:38 -04:00
Matt Wozniski
4785f32ddf Add autodoc_typehint_undoc option
Previously, if autodoc_typehints="description", a :type: field would be
added for every parameter and return type appearing in the annotation,
including **kwargs and underscore-prefixed parameters that are meant to
be private, as well as None return types.

This commit introduces a new option, "autodoc_typehint_undoc".  By
default this option is True, requesting the old behavior. By setting
this option to False, :type: and :rtype: fields will only be added for
annotated parameters or return types if there is already a corresponding
:param: or :return: field, to put users in control over whether a given
parameter is documented or not.
2021-03-27 14:54:37 -04:00
Takeshi KOMIYA
e888a44249
Merge pull request #9026 from tk0miya/5603_autodoc_canonical
Close #5603: autodoc: Allow to refer to a python object using canonical name
2021-03-27 17:45:38 +09:00
Takeshi KOMIYA
acf66bc4d5 Close #5603: autodoc: Allow to refer to a python object using canonical name
This generates `:canonical:` option for `:py:class:` directive if the
target class is imported from other module.  It allows users to refer it
using both the new name (imported name) and the original name (canonical
name).

It helps a library that implements some class in private module (like
`_io.StringIO`), and publish it as public module (like `io.StringIO`).
2021-03-27 17:34:15 +09:00
Takeshi KOMIYA
cd75f8fea1 Merge branch '3.x' 2021-03-27 17:33:49 +09:00
Takeshi KOMIYA
b342300c5e Merge branch '3.5.x' into 3.x 2021-03-27 17:30:50 +09:00
Takeshi KOMIYA
6a873cae0b
Merge pull request #9038 from tk0miya/fix_linkcheck_ci
Fix the testcase for linkcheck refers removed URLs
2021-03-27 17:25:58 +09:00
Takeshi KOMIYA
26d9a8962e Fix the testcase for linkcheck refers removed URLs
Some public URLs are disabled now.
For more details, see https://github.com/sphinx-doc/sphinx/issues/8309
2021-03-27 17:10:09 +09:00
Takeshi KOMIYA
06c59d2723
Merge pull request #9033 from stratakis/typos
Fix some local parameter names
2021-03-27 00:47:43 +09:00
Takeshi KOMIYA
94dc1d78a4 refactor: Use PEP-526 based variable annotation (sphinx.search) 2021-03-27 00:46:55 +09:00
Takeshi KOMIYA
b9f0582f06 refactor: Use PEP-526 based variable annotation (sphinx.pycode) 2021-03-27 00:41:15 +09:00
Takeshi KOMIYA
d27bdce2d7
Merge pull request #9031 from tk0miya/refactor_vartypes_env
refactor: Use PEP-526 based variable annotation (sphinx.environment)
2021-03-27 00:36:24 +09:00
Takeshi KOMIYA
1b66532c0e
Merge branch 'master' into typos 2021-03-27 00:34:41 +09:00
Charalampos Stratakis
2a90b28d61 Fix some local parameter names 2021-03-25 18:17:45 +01:00
Takeshi KOMIYA
000ae2e500 refactor: Use PEP-526 based variable annotation (sphinx.environment) 2021-03-25 00:10:31 +09:00
Takeshi KOMIYA
6e4df0a419
Merge pull request #9029 from tk0miya/refactor_vartypes_transforms
refactor: Use PEP-526 based variable annotation (sphinx.transforms)
2021-03-25 00:08:29 +09:00
Takeshi KOMIYA
7e6ea15b68 refactor: Use PEP-526 based variable annotation (sphinx.transforms) 2021-03-24 23:35:19 +09:00
Takeshi KOMIYA
141735f90c
Merge pull request #9028 from tk0miya/refactor_vartypes_directives
refactor: Use PEP-526 based variable annotation (sphinx.directives)
2021-03-24 23:34:28 +09:00
Takeshi KOMIYA
555a52be82 refactor: Use PEP-526 based variable annotation (sphinx.directives) 2021-03-23 01:44:24 +09:00
Takeshi KOMIYA
09a037006c
Merge pull request #9017 from tk0miya/refactor_vartypes_domains
refactor: Use PEP-526 based variable annotation (sphinx.domains)
2021-03-23 01:43:15 +09:00
Takeshi KOMIYA
035019629a refactor: Use PEP-526 based variable annotation (sphinx.domains) 2021-03-23 01:33:32 +09:00
Takeshi KOMIYA
751622c1b9
Merge pull request #9022 from tk0miya/deprecate_DocumenterBridge.warn
Deprecate DocumenterBridge.warn()
2021-03-23 01:32:05 +09:00
Takeshi KOMIYA
6007bbf797 Deprecate DocumenterBridge.warn()
Since 1.6, sphinx.util.logging module became the default logging
interface of Sphinx. It allows sphinx-components to output log
without the app (or env) object.  According to the policy,
DocumenterBridge.warn() is no longer needed and should be replaced by
the logging module.
2021-03-22 23:51:54 +09:00
Takeshi KOMIYA
f60ee524ba
Merge pull request #9021 from tk0miya/deprecate_DocumenterBridge.filename_set
Rename DocumenterBridge.filename_set to record_dependencies
2021-03-22 23:50:03 +09:00
Takeshi KOMIYA
cb654d287b Rename DocumenterBridge.filename_set to record_dependencies
DocumenterBridge.filename_set has been used since its beginning.  On the
other hand, in docutils, record_dependencies attribute is well-used to
store the list of dependency files.  So this renames it to docutils'
standard attribute.
2021-03-21 00:52:53 +09:00
Takeshi KOMIYA
5e8f814e81 Merge branch '3.x' 2021-03-20 23:25:57 +09:00
Takeshi KOMIYA
82f495fed3 Merge branch '3.5.x' into 3.x 2021-03-20 23:07:44 +09:00
Takeshi KOMIYA
14ff1bcf72 Bump version 2021-03-20 23:07:26 +09:00
Takeshi KOMIYA
1aca32cfd1 Bump to 3.5.3 final 2021-03-20 23:03:15 +09:00
Takeshi KOMIYA
11144ea009
Merge pull request #8967 from tk0miya/8959_unix_pathsep_on_windows
Fix #8959: using UNIX path separator confuses Sphinx on Windows
2021-03-20 22:53:32 +09:00
Takeshi KOMIYA
a19250b46e Fix #8959: using UNIX path separator confuses Sphinx on Windows
The first element of env.relfn2path() should be a POSIX path, not a OS
dependent path.
2021-03-20 01:32:47 +09:00
Takeshi KOMIYA
560def9606
Merge pull request #9015 from tk0miya/8992_types.TracebackType
Fix #8992: autodoc: Failed to resolve types.TracebackType type annotation
2021-03-18 23:49:54 +09:00
Takeshi KOMIYA
8c7e779731 Fix #8992: autodoc: Failed to resolve types.TracebackType type annotation
The builtin module, ``types.TracebackType`` does not have correct module
name.  This allows to refer it automatically.
2021-03-17 23:37:43 +09:00
Takeshi KOMIYA
9f62b9cccb
Merge pull request #9011 from tk0miya/9009_unescaped_release_in_latex
Fix #9009: LaTeX: "release" value with underscore leads to invalid LaTeX
2021-03-17 01:46:06 +09:00
Takeshi KOMIYA
0c68b0866e
Merge pull request #9004 from tk0miya/refactor_vartypes_ext
refactor: Use PEP-526 based variable annotation (sphinx.ext)
2021-03-17 01:28:16 +09:00
Takeshi KOMIYA
659fdc63e5
Merge pull request #9010 from tk0miya/9008_fix_typo
Fix #9008: Fix typo
2021-03-17 01:25:24 +09:00
Takeshi KOMIYA
3937ea816f Fix #9009: LaTeX: "release" value with underscore leads to invalid LaTeX
The "release" variable is not escaped on the LaTeX output.
2021-03-17 01:24:03 +09:00
Takeshi KOMIYA
45f56dd7ac Fix #9008: Fix typo 2021-03-16 01:28:07 +09:00
Jean-François B
d79d041f4f
Merge pull request #9006 from jfbu/latex_pysigline_fix_stacked_labels
LaTeX: partially revert #8997 for \pysigline
2021-03-15 16:28:18 +01:00