Commit Graph

3470 Commits

Author SHA1 Message Date
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
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
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
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