Commit Graph

3801 Commits

Author SHA1 Message Date
Takeshi KOMIYA
b742bde8e6
Merge pull request #8684 from tk0miya/2030_automatic_dedent
Fix #2030: automatic dedent support in code-block directive
2021-01-14 01:11:02 +09:00
Takeshi KOMIYA
fddc42847f Fix #2030: automatic dedent support in code-block directive 2021-01-13 01:10:28 +09:00
Takeshi KOMIYA
233e359330
Merge pull request #8679 from tk0miya/8651_xref_for_rubric
Fix #8651: cross-reference for a rubric having inline item is broken
2021-01-13 01:01:36 +09:00
Takeshi KOMIYA
8ff8b5532c Fix #8683: html_last_updated_fmt generates wrong time zone for %Z
sphinx.util.i18n:format_date() converts '%Z' to full name of time zone
unexpectedly.  It should be converted to short name.
2021-01-13 00:50:01 +09:00
Takeshi KOMIYA
d5559e1ba2 Fix #8683: html_last_updated_fmt does not support UTC offset (%z)
sphinx.util.i18n:format_date() does not support %z so far.  This
adds a mapping for %z to the babel form 'ZZZ'.
2021-01-13 00:49:59 +09:00
Jakob Lykke Andersen
f7a1d66359 C++, fix object types for xrefs
Make them all work with intersphinx.
Strengthen templateParam a bit.
2021-01-11 20:51:36 +01:00
Jakob Lykke Andersen
750e6ec431 C, fix object types for xrefs
Add 'identifer' to all and 'type' to types.

Fixes sphinx-doc/sphinx#8341
2021-01-11 20:51:36 +01:00
Takeshi KOMIYA
12ec8f0cae Fix #8651: cross-reference for a rubric having inline item is broken
The implementation of the standard domain so far has considered the
first child of the rubric node is the title of the rubric.  But it can
may multiple nodes when the rubric title is marked up.

This extracts the title of the rubric from the whole of the children
of it.
2021-01-11 22:50:45 +09:00
Takeshi KOMIYA
b372a99c01
Merge pull request #8674 from tk0miya/207_multiple_highlight_options
Close #207: Now highlight_language supports multiple languages
2021-01-11 21:49:29 +09:00
Takeshi KOMIYA
32ac5f2e57 Close #207: Now highlight_language supports multiple languages
This changes the structure of `highlight_options` to a dictionary that
maps language names to option dictionary.  It allows to setting pygments
options for multiple languages at once.
2021-01-11 21:40:09 +09:00
Takeshi KOMIYA
a3df1d00c7 test: Add testcase for relative/short xref for py domain 2021-01-11 03:12:39 +09:00
Jakob Lykke Andersen
8a11f909a7 C, fix namespace lookup for expr role 2021-01-10 12:35:28 +01:00
Takeshi KOMIYA
5460ea103b Merge branch '3.x' 2021-01-08 01:23:17 +09:00
Takeshi KOMIYA
af4e615a8a Close #6241: html: Allow to add JS/CSS files to the specific page
Allow to add JS/CSS files to the specific page when an extension calls
`app.add_js_file()` or `app.add_css_file()` on `html-page-context`
event.
2021-01-07 02:12:07 +09:00
Takeshi KOMIYA
5ba5602d71
Merge pull request #8638 from tk0miya/5977_dont_link_var_field
Close #5977: :var: field do not create a cross-reference …
2021-01-06 01:00:12 +09:00
Takeshi KOMIYA
5b392e3951 refactor: Move CSS tags in basic/layout.html to `css_files` variable
To make CSS customizable, all CSS files in basic/layout.html has their
priority: 200.  Therefore, extensions and users can insert their own
custom CSS files before or just after them.

As a side effect, the CSS tags in basic/layout.html are removed.  These
CSS files will be rendered via `css_files` template variable.

refs: #8634, c5f0398010
2021-01-03 02:41:17 +09:00
Takeshi KOMIYA
a9c7dd7037 Merge branch '3.x' 2021-01-03 00:20:27 +09:00
Takeshi KOMIYA
e9a4ebf70d doc: Add explanation for the priority attribute of html_*_files 2021-01-03 00:16:10 +09:00
Takeshi KOMIYA
c5f0398010 Close #8634: html: Allow to change the order of JS/CSS
`Sphinx.add_js_file()` and `Sphinx.add_css_file()` take `priority`
argument to change the order of JS/CSS files.
2021-01-02 02:06:34 +09:00
Takeshi KOMIYA
918086b559 Close #5977: :var: field do not create a cross-reference
Since its beginning, `:var:` field has created a cross-reference to the
attribute having the same name.  It is meaningful only if the attribute
is documented by `py:attribute` directive.  It means the `:var:` field
and `:attr:` role are almost the same and conflicted.  Additionally,
the cross-reference points incorrect variable if the target is not
documented.

Thus, the cross-reference feature of `:var:` field is disabled.
2021-01-01 22:53:23 +09:00
Takeshi KOMIYA
9cac2001f7 test: py domain: Add a testcase for :var: field 2021-01-01 18:15:42 +09:00
Takeshi KOMIYA
4b452338f9 Merge branch '3.x' 2021-01-01 13:57:19 +09:00
Takeshi KOMIYA
7ecf6b88aa Merge branch '3.4.x' into 3.x 2021-01-01 13:56:19 +09:00
Takeshi KOMIYA
1544097af5 Merge branch '3.x' 2021-01-01 13:55:12 +09:00
Takeshi KOMIYA
f996859420 A happy new year!
.. note::

   $ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \;
   $ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
2021-01-01 13:40:48 +09:00
Takeshi KOMIYA
b2c9297bd2
Merge pull request #8627 from tk0miya/8315_struct.Struct
Fix #8315: autodoc: Failed to resolve struct.Struct type annotation
2021-01-01 13:13:11 +09:00
Takeshi KOMIYA
663074e3ce
Merge pull request #8626 from tk0miya/refactor_test_autosummary
refactor: test: Use rollback_sysmodules fixture in test_ext_autosummary
2021-01-01 13:12:35 +09:00
Takeshi KOMIYA
05b67f2a3e
Merge pull request #8633 from tk0miya/merge_3.4.x
Merge 3.4.x to 3.x
2021-01-01 13:11:56 +09:00
Takeshi KOMIYA
9ec65ff039 Merge branch '3.4.x' into merge_3.4.x 2020-12-31 21:33:43 +09:00
Takeshi KOMIYA
2eb8927b89 Fix test: missing compound class for kbd tag 2020-12-31 21:20:38 +09:00
Takeshi KOMIYA
b31b8df9bf
Merge pull request #8620 from tk0miya/8619_compound_kbd
Close #8619: html: kbd role generates customizable HTML tags for compound keys
2020-12-31 21:11:42 +09:00
Takeshi KOMIYA
62a0ee3fef Merge branch '3.x' 2020-12-31 14:33:09 +09:00
Takeshi KOMIYA
f1a051fdfc Fix #8315: autodoc: Failed to resolve struct.Struct type annotation
The builtin module, ``struct.Struct`` does not have correct module
name since Python 3.8.  This allows to refer it automatically.
2020-12-31 14:25:05 +09:00
Takeshi KOMIYA
54e8b8d9bc refactor: test: Use rollback_sysmodules fixture in test_ext_autosummary 2020-12-31 10:55:45 +09:00
Takeshi KOMIYA
e3b1fdeeeb
Merge branch '3.4.x' into 8602_process-docstring_for_nondatadescriptors 2020-12-31 10:13:03 +09:00
Takeshi KOMIYA
6a53c53d53 Fix #8618: html: incorrect HTML for single compound-kdb separators 2020-12-30 21:12:00 +09:00
Takeshi KOMIYA
8e5f4e5616 Close #8619: html: kbd role generates customizable HTML tags for compound keys 2020-12-30 20:36:09 +09:00
Takeshi KOMIYA
a122397b4b Merge branch '3.x' 2020-12-29 18:37:45 +09:00
Takeshi KOMIYA
3f7bf48715 Merge branch '3.4.x' into 3.x 2020-12-29 18:33:36 +09:00
Takeshi KOMIYA
97f36a2d02 Fix #8602: autodoc: The `autodoc-process-docstring` event is emitted to the non-datadescriptors unexpectedly 2020-12-29 18:04:24 +09:00
Takeshi KOMIYA
85567748d9 Fix #8164: autodoc: Classes that inherit mocked class are not documented
Use ismock() to check a module member is a mocked or not. It allows not
to skip subclasses of mocked class.
2020-12-29 00:26:23 +09:00
Takeshi KOMIYA
476169284d autodoc: Add a helper that checks the object is mocked; ismock() 2020-12-28 21:50:36 +09:00
Takeshi KOMIYA
05518851d3
Merge branch '3.x' into 8306_autosummary_mocks_are_documented 2020-12-28 17:25:09 +09:00
Takeshi KOMIYA
0d84818739 Fix #8594: autodoc: empty __all__ attribute is ignored
An empty `__all__` should be represented as "there is no public items".
But autodoc considers all items on the module are public.  This changes
the behavior to correct one.
2020-12-28 13:53:56 +09:00
Takeshi KOMIYA
b19bce971e
Merge pull request #8593 from tk0miya/8592_meta_public_doesnt_affect_to_variables
Fix #8592: autodoc: `:meta public:` does not effect to variables
2020-12-28 13:51:50 +09:00
Takeshi KOMIYA
556b9743fe
Merge pull request #8596 from tk0miya/8022_meta_hide_value
Close #8022: autodoc: Allow to hide the value of the variables via metadata
2020-12-28 12:15:56 +09:00
Takeshi KOMIYA
ce52a90d92 Fix #8592: autodoc: :meta public: does not effect to variables
To control the visibility of variables, ModuleDocumenter have to load
docstring of them on `get_object_members()` phase.  This reimplements
it and `get_module_members()` helper to fetch docstring on earlier
phase (as ClassDocumenter does).
2020-12-27 22:21:34 +09:00
Takeshi KOMIYA
c86e92cb95 Fix #8306: autosummary: mocked modules are documented as empty page
The :recursive: option for autosummary directive creates an empty page
for mocked modules unexpectedly.  This make them ignored.
2020-12-27 21:45:15 +09:00
Takeshi KOMIYA
9e9e486e65 Close #8022: autodoc: Allow to hide the value of the variables via metadata
autodata and autoattribute directives does not show right-hand value of
the variable if its docstring contains ``:meta hide-value:`` in
info-field-list.
2020-12-27 12:46:03 +09:00
Takeshi KOMIYA
6c645e41f8 refactor: Deprecate no_docstring argument for Documenter.add_content()
Deprecate `no_docstring` argument for `Documenter.add_content()` again.

At the first trial (#8533), it changes the behavior of
`autodoc-process-docstring` event; it is emitted unexpectedly for an
alias of class.  But it brings an incompatible change to extensions.
Hence it was partially reverted at #8581.

This keeps not calling the event for an alias of class.  To do that,
now `Documenter.get_doc()` can return None value.
2020-12-26 21:14:26 +09:00
Takeshi KOMIYA
a18fee24f2
Merge pull request #8572 from mitya57/fix-hebrew-in-test
Fix name of the Hebrew language in test_create_single_index
2020-12-23 23:18:54 +09:00
François Freitag
a1b8b1febb
Ensure linkcheck items are comparable
Linkcheck organizes the URLs to checks in a PriorityQueue. The items are
tuples (priority, url, docname, lineno).

Tuples where the lineno is `None` are not comparable with tuples that
have an integer lineno, and PriorityQueue items must be comparable (see
https://bugs.python.org/issue31145).

Fixes an issue when a document contains two links to the same URL, one
with an int line number and the other without line number metadata (such
as an image :target: attribute).

Using 0 instead of None to represent no line number should not lead to
observable changes, the result logger only logs the line number when it
is truthy.

Close #8565
2020-12-22 21:18:31 +01:00
Takeshi KOMIYA
70bb2262d6 Fix #8567: autodoc: Instance attributes are incorrectly added to Parent class
The instance attributes on subclasses are shown on the document of
parent class unexpectedly because of autodoc modifies `__annotations__`
in place.  This fix creates a copy of `__annotations__` attribute and
attach it to the subclass.
2020-12-22 02:38:31 +09:00
Dmitry Shachnev
5b779b4201 Fix name of the Hebrew language in test_create_single_index 2020-12-21 20:12:34 +03:00
Takeshi KOMIYA
423e7ab2ca Fix #8559: AttributeError is raised when using ForwardRef
The restify() helper crashes when ForwardRef is passed.
2020-12-22 00:37:02 +09:00
Takeshi KOMIYA
a7a77d154b Merge branch '3.x' 2020-12-20 21:33:57 +09:00
Takeshi KOMIYA
6e8ea8572f
Merge pull request #8552 from tk0miya/8236_napoleon_receives_section
Close #8236: napoleon: Support numpydoc's "Receives" section
2020-12-20 13:54:01 +09:00
Takeshi KOMIYA
7f1284f2e7
Merge pull request #8555 from tk0miya/8512_test_comment
test: Add comment for UnicodeEncodeError handler (refs: #8512)
2020-12-20 13:53:24 +09:00
Takeshi KOMIYA
2fa15e9396
Merge pull request #8551 from tk0miya/8365_pydomain_xref_missing_context
Fix #8365: py domain: :type: and :rtype: gives false ambiguous warnings
2020-12-20 13:49:53 +09:00
Takeshi KOMIYA
9a9d7f3f00 test: Add comment for UnicodeEncodeError handler (refs: #8512) 2020-12-20 01:01:59 +09:00
Takeshi KOMIYA
aae2f19911
Merge pull request #8512 from jbms/fix-nonascii_srcdir
Fix nonascii_srcdir to work when non-ascii directories aren't supported
2020-12-20 00:58:08 +09:00
Takeshi KOMIYA
f50b999911 Close #8236: napoleon: Support numpydoc's "Receives" section 2020-12-19 20:29:00 +09:00
Takeshi KOMIYA
30c594fbc5 Fix #8365: py domain: :type: and :rtype: gives false ambiguous warnings
The searching context like py:module and py:class are missing in the
pending_xref nodes generated from info-field-lists.  This sets these
searching context info to them.
2020-12-19 18:42:01 +09:00
Takeshi KOMIYA
c0678a4a50 Fix #741: autodoc: inherited-members doesn't support instance attributes on super class
To support instance attributes on super class, get_class_members() scans
the instance attributes defined at super classes using ModuleAnalyzer.
It allows to generate document for them when users gives :
inherited-members: option.
2020-12-18 23:24:59 +09:00
Takeshi KOMIYA
dd1615c59d
Merge pull request #8543 from tk0miya/8534_autoattribute_alias_derived
Fix #8534: autoattribute failed to document a commented attribute in alias dervied class
2020-12-17 22:35:35 +09:00
Takeshi KOMIYA
9721327989 Fix #8545: autodoc: a __slots__ attribute is not documented even having docstring
To avoid filtering __slots__ attributes having docstring at
filter_members(), this passes docstring captured at get_class_members()
to the filter_members() via ObjectMember.
2020-12-17 22:19:28 +09:00
Takeshi KOMIYA
0dbbf1dd54 Fix #8534: autoattribute failed to document a commented attribute in alias dervied class 2020-12-17 22:13:20 +09:00
Takeshi KOMIYA
55c110f609 Fix #8541: autodoc_type_aliases doesn't work for the instance attrs
So far, autodoc obtains type annotations of instance attributes by
ModuleAnalyzer directly.  As a result, autodoc_type_aliases are ignored
for these variables.

This goes to merge type annotations from the class itself and
ModuleAnalyzer's, and get type annotations using `typing.get_type_hints()`
to apply autodoc_type_aliases.
2020-12-17 01:07:54 +09:00
Takeshi KOMIYA
caa1d1f3c2 Fix #8534: autoattribute failed to document a commented attribute in alias class
So far, autoattribute uses "given class name" to fetch comments of
uninitialized instance attributes.  But pycode expects to use "real"
class name on searching attribute comments.

This adds UninitializedInstanceAttributeMixin to handle it simply.
2020-12-16 02:43:31 +09:00
Takeshi KOMIYA
2c98e909bf Merge branch '3.x' 2020-12-14 02:02:29 +09:00
Takeshi KOMIYA
0b074c9e48 Merge commit 'a82b06f2abb1226d82b18e3f85bdf19be7b9eb3f' 2020-12-14 01:58:23 +09:00
Jon Dufresne
850512090a Remove duplicate test in test_ext_autodoc.py
Duplicate since c6bd84a614.
2020-12-12 06:28:23 -08:00
Jeremy Maitin-Shepard
d737ecd063 Fix nonascii_srcdir to work when non-ascii directories aren't supported
Previously, the nonascii_srcdir in tests/test_build.py contained some
logic to attempt to handle the case where non-ascii directories aren't
supported, but it did not actually work because it fails to copy the
test sources to the temporary directory.

With this commit, the following test invocation, which previously
failed, now pases:

LANG=en_US.iso8859-1 python -m pytest test_build.py
2020-11-30 13:13:01 -08:00
Takeshi KOMIYA
9cf2826491
Merge pull request #8506 from tk0miya/8352_option_startswith_bracket
Fix #8352: std domain: Failed to parse an option that starts with bracket
2020-11-29 23:58:18 +09:00
Takeshi KOMIYA
1d9eeedde3 Fix #8508: LaTeX: uplatex becomes a default setting of latex_engine for Japanese
Since v2.3, Sphinx supports uplatex as an alternative of latex_engine for Japanese
docs (refs: #4186, #6841). uplatex is able to build a document without conversion
character encoding internally. It allows using unicode characters in documents.
Additionally, uplatex is compatible with platex (current default latex_engine for
Japanese docs).

This changes the default latex_engine for Japanese document to uplatex.
2020-11-29 15:09:49 +09:00
Takeshi KOMIYA
bb63f03034 Fix #8503: autoattribute could not create document for a GenericAlias 2020-11-29 12:24:10 +09:00
Takeshi KOMIYA
c15c61ed64
Merge pull request #8505 from tk0miya/8501_extract_summary_el_at
Fix #8501: autosummary: summary extraction splits text after "el at."
2020-11-29 11:48:55 +09:00
Takeshi KOMIYA
6d24579f40 Fix #8352: std domain: Failed to parse an option that starts with bracket 2020-11-29 02:22:40 +09:00
Takeshi KOMIYA
3f3358b38f
Merge pull request #8494 from timoludwig/alias-of-builtin
Use restify() to reference alias attributes in autodoc
2020-11-28 22:55:27 +09:00
Timo Ludwig
ccfd98dc07
Fix #8493: Use restify() in autodoc to reference alias attributes 2020-11-28 12:12:02 +01:00
Takeshi KOMIYA
da4c69c624
Merge pull request #8291 from QuentinSoubeyran/8285_napoleon_google_style_use_annotations
Fix #8285: napoleon can use PEP526 annotations
2020-11-28 18:11:30 +09:00
Takeshi KOMIYA
65ca7aa0c9 Fix #8501: autosummary: summary extraction splits text after "el at."
Add "el at." to the list of abbreviations.
2020-11-28 11:41:06 +09:00
Jon Dufresne
c1437d5f79 Replace modify_env() with pytest monkeypatch.setenv()
The same test utility function is built into pytest. Can avoid the
duplication.

https://docs.pytest.org/en/latest/monkeypatch.html#monkeypatching-environment-variables
2020-11-27 14:10:36 -08:00
François Freitag
236afac7fd
Unset env variables in tests by del os.environ
The `unsetenv()` operation does not update `os.environ`.
https://docs.python.org/3/library/os.html#os.unsetenv
2020-11-26 21:12:28 +01:00
François Freitag
6b90a63f08 Fix #6629: linkcheck: Handle rate-limiting
Follow the Retry-After header if present, otherwise use an exponential
back-off.
2020-11-25 17:34:55 +01:00
Quentin Soubeyran
c37ef640a7 rebased on upstream/3.x; fixed CI 2020-11-25 08:49:57 +01:00
Quentin Soubeyran
ec62bf86fa implemented feature in numpy style, factored common code 2020-11-25 08:45:25 +01:00
Quentin Soubeyran
ec30f77712 refactored code and tests, prepared for numpy feature 2020-11-25 08:45:25 +01:00
Quentin Soubeyran
a60e1c10b7 sorted imports 2020-11-25 08:45:25 +01:00
Quentin Soubeyran
8995f15710 moved python 3.6+ syntax test data to standalone file 2020-11-25 08:45:25 +01:00
Quentin Soubeyran
f268665292 added napoleon_google_attr_annotations option to use PEP 526 on google style 2020-11-25 08:45:25 +01:00
Takeshi KOMIYA
c941406415 refactor with pyupgrade
Run `pyupgrade --py3-only --keep-percent-format` to refine our code.

Note:  --keep-percent-format is required to keep translations available.
2020-11-25 01:55:30 +09:00
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
3e9200dab4
Merge pull request #8474 from tk0miya/8360_update_warning_for_numref
Fix #8360: Update warning message for numref
2020-11-24 21:38:04 +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
50dad211ed Fix #8480: autoattribute could not create document for __slots__ attributes 2020-11-23 15:28:53 +09:00
Takeshi KOMIYA
046c289f76 linkcheck: Add a testcase for infinite redirect loop on HEAD request 2020-11-23 01:52:44 +09:00
Takeshi KOMIYA
478a1567b6 Fix #8360: Update warning message for numref 2020-11-23 01:36:35 +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
a00d62c445 Merge branch '3.x' 2020-11-22 16:04:07 +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
8bb31c7e3a
Merge pull request #8469 from tk0miya/refactor_test_ext_autodoc_slots
refactor: Rename example class
2020-11-22 11:42:13 +09:00
Takeshi KOMIYA
b4d4d4e808 refactor: Rename example class 2020-11-22 03:06:03 +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
6973888294 Support NewType as a class attribute 2020-11-21 23:56:16 +09:00
Takeshi KOMIYA
46a7ea7ada Add NewType support to typing.stringify() and restify() 2020-11-21 23:04:42 +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
François Freitag
419e145e36
Make tests/ a Python package
Allows relative imports.
2020-11-20 19:43:02 +01:00
Takeshi KOMIYA
a8881cae5f Fix flake8 violations 2020-11-21 01:07:27 +09:00
Takeshi KOMIYA
3a4ae2092a Merge branch '3.x' 2020-11-21 01:01:36 +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
3becd56e0e Merge branch '3.x' into 8222_novalue 2020-11-17 23:56:42 +09:00
Takeshi KOMIYA
5df381e8e0
Merge pull request #8435 from tk0miya/8434_autodoc_type_aliases_for_variables
Fix #8434: autodoc_type_aliases does not effect to variables
2020-11-17 22:42:38 +09:00
Takeshi KOMIYA
f203a15141 autodoc: Fix :no-value: option for autoattribute does not work 2020-11-17 22:40:40 +09:00
Takeshi KOMIYA
af04b64906
Merge pull request #8429 from tk0miya/refactor_test_intl
test: Merge testcases having the same name
2020-11-16 02:44:58 +09:00
Takeshi KOMIYA
b615fcca85
Merge pull request #8436 from francoisfreitag/better-certs
linkcheck: Specify subjectAltName in test self-signed certificate
2020-11-16 02:42:34 +09:00
François Freitag
3c4e1c30b1
linkcheck: Specify subjectAltName in test self-signed certificate
Clears warning:

tests/test_build_linkcheck.py::test_connect_to_selfsigned_with_tls_cacerts
tests/test_build_linkcheck.py::test_connect_to_selfsigned_with_requests_env_var
  …/venv/lib/python3.8/site-packages/urllib3/connection.py:455: SubjectAltNameWarning: Certificate for localhost has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.)
    warnings.warn(
2020-11-15 18:25:39 +01:00
Takeshi KOMIYA
44fbe9da7b Fix #8434: autodoc_type_aliases does not effect to variables 2020-11-16 02:11:15 +09:00
Takeshi KOMIYA
5d8d6275a5
Merge pull request #8423 from tk0miya/getslots
Add sphinx.util.inspect:getslots() to get __slots__ attribute
2020-11-16 02:04:42 +09:00
Takeshi KOMIYA
017698a2c6 test: Fix duplicated testcases 2020-11-16 00:07:36 +09:00
Takeshi KOMIYA
f86366a2df test: Merge testcases having the same name 2020-11-16 00:03:20 +09:00
Takeshi KOMIYA
ba496f4d92
Merge pull request #8431 from francoisfreitag/never-leak-env
tests: Always cleanup when exiting modify_env context manager
2020-11-15 20:42:24 +09:00
François Freitag
5eb74d5c8e
tests: Always cleanup when exiting modify_env context manager
Previously, an exception would leave the environment changed.
2020-11-15 10:25:36 +01:00
Takeshi KOMIYA
e99e2aef15 test: Fix flake8 violations 2020-11-15 17:46:37 +09:00
Takeshi KOMIYA
21a3bd4127 refactor: Fix flake8 violations under tests/ directory 2020-11-15 17:15:40 +09:00
Takeshi KOMIYA
5676fdeb4e Rename :novalue: option to :no-value: option
According to the existing options of autodoc directives, `:novalue:`
option is now renamed to `:no-value:` option.
2020-11-15 14:20:30 +09:00
François Freitag
d453088b58
linkcheck: Prevent REQUESTS_CA_BUNDLE leak in tests
Test `test_connect_to_selfsigned_nonexistent_cert_file` serves two
purposes:
- verify the behavior when the CA bundle file path is incorrect
- flag a leak of REQUESTS_CA_BUNDLE

Assumes that test runs after
`test_connect_to_selfsigned_with_requests_env_var`. Not great, but
better than no testing.
2020-11-14 19:58:02 +01:00
Takeshi KOMIYA
bbb0ea5f12 Add sphinx.util.inspect:getslots() to get __slots__ attribute 2020-11-15 02:30:25 +09:00
Takeshi KOMIYA
a638658510
Merge pull request #8421 from francoisfreitag/test-self-signed
linkcheck: Verify behavior with self-signed certs
2020-11-14 21:15:13 +09:00
François Freitag
10e11f3133
linkcheck: Verify behavior with self-signed certs 2020-11-14 12:59:29 +01:00
François Freitag
99c8765822
linkcheck: Remove unused argument from test_invalid_ssl
Not updated after c90eef1f67.
2020-11-14 12:49:47 +01:00
François Freitag
040a1e7743 linkcheck: test invalid SSL is reported as broken
`linkcheck` logic suggests that SSL errors were originally expected to
be ignored.

Blaming the corresponding lines point to issue #3008: linkcheck to
website with self-signed certificates. That issue was fixed by commit
4c7bec6460, which ignored SSL errors.
Probably because back then, users could not specify a CA bundle.

A broken SSL certificate is a real issue, it should not be ignored.
Users wishing to ignore issues for a specific link can use the
`linkcheck_ignore` option.

The current behavior is to report the site as broken, keep it.
2020-11-12 19:58:04 +01:00
François Freitag
ce9d4c1e68
linkcheck: Rewrite headers tests without mocking
Makes the test more realistic by issuing an HTTP request.
Reduces coupling between test and the code under test.
2020-11-11 21:24:06 +01:00
François Freitag
341b98f794
linkcheck: Rewrite auth tests without mocking
Makes the test more realistic by issuing an HTTP request.
Reduces coupling between test and the code under test.
2020-11-11 21:22:59 +01:00
Takeshi KOMIYA
279e547860 Merge branch '3.x' 2020-11-12 02:50:43 +09:00
François Freitag
53ca608bc0
linkcheck: Test redirect following for HEAD and GET 2020-11-11 18:32:53 +01:00
François Freitag
6ea0a123c6
Rename test-linkcheck-localserver{,-anchor}
Precise the `linkcheck_anchors` option is enabled. Frees the name
`test-linkcheck-localserver` for future tests without that option.
2020-11-11 18:32:52 +01:00
Takeshi KOMIYA
386929ec0f
Merge pull request #8409 from francoisfreitag/linkcheck-tests
linkcheck: Remove unused arguments from tests
2020-11-12 02:17:52 +09:00
Takeshi KOMIYA
68cc0f7e94
Merge pull request #8408 from francoisfreitag/isort
Sort imports with isort
2020-11-12 02:05:13 +09:00
François Freitag
c90eef1f67
linkcheck: Remove unused arguments from tests 2020-11-11 13:48:45 +01:00
François Freitag
0949735210
Sort imports with isort
Keep imports alphabetically sorted and their order homogeneous across
Python source files.

The isort project has more feature and is more active than the
flake8-import-order plugin.

Most issues caught were simply import ordering from the same module.
Where imports were purposefully placed out of order, tag with
isort:skip.
2020-11-11 13:19:05 +01:00
Takeshi KOMIYA
1254b80113 Merge branch '3.x' 2020-11-10 23:21:51 +09:00
Takeshi KOMIYA
1b9099f339 test: Adjust type annotataions in python 3.10 2020-11-10 22:33:03 +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
François Freitag
0178437f3c
Rewrite test_inspect_main_url to avoid mocking
Makes the test more realistic by issuing an HTTP request.
Reduces coupling between test and the code under test.

The `http_server` helper was factored out into a new tests.utils module.
2020-11-08 22:30:49 +01:00
Takeshi KOMIYA
bbcd471557 Merge branch '3.x' 2020-11-09 02:50:08 +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
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
a163bbe870
Merge pull request #8385 from tk0miya/dont_use_object_to_annotation
test: do not use "object" for the type annotation
2020-11-08 13:15:40 +09:00
Takeshi KOMIYA
e31189d970 test: do not use "object" for the type annotation
Usually we use "Any" type for the type annotation which takes any kinds
of types, instead of "object" class.  So this replaces "object" to "Any"
in our example.
2020-11-08 12:57:54 +09:00
Takeshi KOMIYA
6d5e43a0ff Drop code for supporting py35 2020-11-06 01:36:04 +09:00
Takeshi KOMIYA
8bf84167a3 Merge branch '3.x' 2020-11-05 02:21:47 +09: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
Takeshi KOMIYA
f46c14bbca
Merge pull request #8355 from sphinx-doc/7613_class__signature__
Fix #7613: autodoc: autodoc does not respect __signature__ of the class
2020-11-05 01:51:17 +09:00
Takeshi KOMIYA
2be6aaa7a4 Merge branch '3.3.x' into 3.x 2020-11-05 01:20:33 +09:00
Takeshi KOMIYA
218de39462 Fix testcases for singledispatch are sometimes failed
They are sometimes failed with python3.5 because the order of singledispatch
functions is not stable on python 3.5.  This uses comparision via "in"
keyword to check the signature of singledispatch functions stably.
2020-11-04 23:19:27 +09:00
Takeshi KOMIYA
7065dc0157 Merge branch '3.x' into 7613_class__signature__ 2020-11-03 11:39:23 +09:00
Takeshi KOMIYA
9f0f34cbda Close #8119: autodoc: Control visibility of module member not in __all__
This allows `autodoc-skip-member` handlers to determine whether a member
not included in `__all__` attribute of the module should be documented or
not.
2020-11-03 02:28:32 +09:00
Takeshi KOMIYA
0e98e9b1a8 Fix #6914: Emit a detailed warning when failed to resolve :ref:
To be clear the ambiguous warning for missing-reference :ref:,
this separates the warning to missing-label and missing-caption.

To emit a warning dynamically, this also adds a new event:
`warn-missing-reference` to customize warning messages via event
handlers.
2020-11-03 02:27:43 +09:00
Takeshi KOMIYA
449a567732 Merge branch '3.x' 2020-11-02 22:25:10 +09:00
Takeshi KOMIYA
b415b25c09 Merge branch '3.2.x' into 3.x 2020-11-01 20:31:49 +09:00
Takeshi KOMIYA
9a44e45277 Fix #7613: autodoc: autodoc does not respect __signature__ of the class 2020-11-01 18:27:16 +09:00
Takeshi KOMIYA
68c89f471c
Merge pull request #8050 from keewis/preprocess-other-sections
Preprocess other sections
2020-10-30 01:54:34 +09:00
Takeshi KOMIYA
921f097906
Merge pull request #8051 from keewis/fix-see_also
use the obj role for all See Also items
2020-10-30 00:49:59 +09:00
Takeshi KOMIYA
7eabbfc5ec
Merge pull request #8284 from tk0miya/7996_man_make_section_directory_by_default
Close #7996: manpage: Make a section directory on build manpage by default
2020-10-28 11:03:13 +09:00
Takeshi KOMIYA
c40b4249cd Merge branch '3.x' into master 2020-10-28 02:23:36 +09:00
Takeshi KOMIYA
a843fd3db8 Close #7996: manpage: Make a section directory on build manpage by default 2020-10-28 02:15:36 +09:00
Takeshi KOMIYA
871f43f778
Merge branch '3.x' into 7785_autodoc_typehints_none_for_overloads 2020-10-28 02:13:49 +09:00
Matthias Geier
82c83ed478 autodoc: Add test for single-string __slots__ 2020-10-25 10:27:43 +01:00
Takeshi KOMIYA
cc97a07640 Fix #7785: autodoc_typehints=none does not effect to overloads 2020-10-24 20:54:56 +09:00
Takeshi KOMIYA
6e1c78f3b4
Merge pull request #8295 from tk0miya/refactor_root
refactor: Remove rst_epilog from test-root/conf.py
2020-10-24 20:27:30 +09:00
Jakob Lykke Andersen
37f1454ec1 C, C++, improve warnings on duplicates 2020-10-24 12:22:02 +02:00
Takeshi KOMIYA
445b9515c1 Merge branch '3.x' 2020-10-24 18:12:45 +09:00
Takeshi KOMIYA
071b14884c
Merge pull request #8303 from larsoner/tuple
TST: Add test
2020-10-24 17:52:22 +09:00
Takeshi KOMIYA
2a77eb07d0
Merge branch '3.x' into 3.2.x_to_3.x 2020-10-24 17:18:12 +09:00
Jakob Lykke Andersen
15251574a9 C, fix links to function parameters 2020-10-13 12:42:19 +02:00
Eric Larson
d10802fa6a TST: Add test 2020-10-07 14:25:24 -04:00
Takeshi KOMIYA
4f19f400bf refactor: Remove rst_epilog from test-root/conf.py
I found test-root defines rst_epilog in its conf.py.  It causes
side-effects to many test cases in Sphinx's testing because test-root
is widely used.  This removes the configuration from test-root not to
cause side-effects to our testings.

Note: We already have test cases for rst_epilog in test_util_rst.
2020-10-06 01:53:29 +09:00
Takeshi KOMIYA
0476e1cea9
Merge pull request #8283 from tk0miya/7786_overloads_in_other_file
Fix #7786: autodoc: can't detect overloaded methods defined in other file
2020-10-06 01:33:22 +09:00
Takeshi KOMIYA
6dbe28a632 Fix #7786: autodoc: can't detect overloaded methods defined in other file 2020-10-05 22:49:05 +09:00
Takeshi KOMIYA
cc941db40b Fix #8255: py domain: number in defarg is changed to decimal
Number literals in default argument value is converted to decimal form
unexpectedly by AST module.  This fixes the signature parsing code to
recosntruct it correctly.

Note: This is only available in Python 3.8+.
2020-10-05 01:08:14 +09:00
Takeshi KOMIYA
0b32e72635 pycode: ast.unparse() construct number literals using source code
Developers can write number literals in several ways. For example,
decimal (1234), hexadecimal (0x1234), octal decimal (0o1234) and so on.
But, AST module don't mind how the numbers written in the code. As a
result, ast.unparse() could not reproduce the original form of number
literals.

This allows to construct number literals as possible using original
source code.

Note: This is only available in Python 3.8+.
2020-10-05 01:08:14 +09:00
Takeshi KOMIYA
598b85da75 Merge branch '3.x' into master 2020-10-04 22:41:44 +09:00
Takeshi KOMIYA
38bb377464
Merge pull request #8273 from sphinx-doc/7996_man_make_section_directory
Close #7996: manpage: Add man_make_section_directory
2020-10-04 22:40:41 +09:00
Takeshi KOMIYA
59d5f62160
Merge pull request #8070 from uktrade/stemmer-len3
Stemmer len3
2020-10-04 14:26:33 +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
Jakob Lykke Andersen
777bcb43fa C++, properly reject functions as duplicates
Fixes sphinx-doc/sphinx#8270
2020-10-03 16:00:28 +02:00
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
26ea870267 Merge branch '3.x' into master 2020-10-03 13:43:21 +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
bec30596a8 Merge branch '3.x' into master 2020-09-13 10:54:21 +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
5ade6b7219 Merge branch '3.x' into master 2020-08-14 19:58:40 +09: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
8412347f5d Merge branch '3.x' 2020-08-14 14:28:58 +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
Takeshi KOMIYA
a8927bcd3e Merge branch '3.x' 2020-08-08 18:16:59 +09:00
Mateusz Lapsa-Malawski
2aa54e54f5 improve test_nosearch 2020-08-07 19:30:12 +01: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
Mateusz Lapsa-Malawski
7aa52e658c update tests 2020-08-07 19:22:17 +01: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