Commit Graph
100 Commits
Author SHA1 Message Date
Takeshi KOMIYA 67846b1e93 Merge branch '3.x' into 8131_too_many_redirects 2020-11-23 01:42:10 +09:00
Takeshi KOMIYA 3ea1ec84cc Merge pull request #8463 from tk0miya/refactor_getannotations
refactor: Move _getannotations() to sphinx.util.inspect
2020-11-22 16:02:11 +09:00
Takeshi KOMIYA a57ce4047c refactor: Move _getannotations() to sphinx.util.inspect 2020-11-22 15:38:01 +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 3840667758 apidoc: Load NewTypeAttributeDocumenter on booting 2020-11-22 13:18:19 +09:00
Takeshi KOMIYA f9077d238d Merge pull request #8462 from tk0miya/handle_AttributeError_from_getall
Handle AttributeError from getall() and getslots()
2020-11-22 11:49:00 +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 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 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 6973888294 Support NewType as a class attribute 2020-11-21 23:56:16 +09:00
Takeshi KOMIYA be42edea76 refactor: autodoc: Add NewTypeMixin
Separate NewType feature from DataDocumenter to mixin class to share it
with another Documenter.
2020-11-21 23:04:42 +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
Takeshi KOMIYA 68aa4fb29e Merge pull request #8466 from tk0miya/refactor_autodoc
refactor: autodoc: Update typehints for "more_content" argument
2020-11-21 20:14:21 +09:00
Takeshi KOMIYA 869825744f refactor: autodoc: Update typehints for "more_content" argument 2020-11-21 20:02:23 +09:00
Takeshi KOMIYA a44027059c Merge pull request #8461 from francoisfreitag/flake8-linkcheck
Make tests/ a Python package
2020-11-21 13:31:23 +09:00
Takeshi KOMIYA 444813a4f3 Handle AttributeError from getall() and getslots() 2020-11-21 13:15:40 +09:00
Takeshi KOMIYA 13a986b299 Merge pull request #8450 from tk0miya/8437_safety_make_clean
Fix #8437: Do `make clean` in more safe way
2020-11-21 02:12:35 +09:00
Takeshi KOMIYA 6620bd91d8 Merge branch '3.x' into 8437_safety_make_clean 2020-11-21 01:56:07 +09:00
Takeshi KOMIYA 8a622ba7ea Merge pull request #8457 from tk0miya/update_deadsnake/action_to_2.0.1
CI: Update deadsnake/action to 2.0.1
2020-11-21 01:17:06 +09:00
Takeshi KOMIYA 296e764198 Merge pull request #8455 from tk0miya/8454_graphviz_layout_option
Fix #8454: graphviz: The layout option for graph and digraph don't work
2020-11-21 01:07:55 +09:00
Takeshi KOMIYA 82382efe9d CI: Update deadsnake/action to 2.0.1
The "add-path" problem is fixed at 2.0.1.
refs: https://github.com/deadsnakes/issues/issues/135
2020-11-21 01:04:45 +09:00
Takeshi KOMIYA e8b7fd2fce Merge branch '3.x' into 8454_graphviz_layout_option 2020-11-21 00:58:19 +09:00
Takeshi KOMIYA 18b2707b2a Merge pull request #8444 from tk0miya/8443_autodata_for_pep526
Fix #8443: autodata directive does not support PEP-526 ivars
2020-11-21 00:57:25 +09:00
Takeshi KOMIYA 90dad94452 Merge pull request #8447 from tk0miya/refactor_getall
refactor autodoc: Add sphinx.util.inspect.getall()
2020-11-20 22:40:24 +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 f5289bb699 Merge pull request #8445 from tk0miya/8419_load_language_data.js_only_search_page
Fix #8419: html search: Do not load language_data.js in non-search pages
2020-11-20 22:35:28 +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 ad7be2f224 refactor autodoc: Add sphinx.util.inspect.getall()
Move a function that obtains __all__ attribute from a module to
sphinx.util.inspect module as getall().
2020-11-20 01:18:03 +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 68c91b1920 Merge pull request #8424 from tk0miya/8222_novalue
autodoc: Add :no-value: option to autoattribute and autodata to suppress the default value of the variable
2020-11-18 22:09:21 +09:00
Takeshi KOMIYA bf3dd8491b Merge pull request #8441 from tk0miya/sphinx.util.typing.get_type_hints
refactor: Add sphinx.util.typing.get_type_hints()
2020-11-18 02:20:11 +09:00
Takeshi KOMIYA 6076bff662 refactor: Add sphinx.util.typing.get_type_hints()
Add a simple wrapper of `typing.get_type_hints()` that does not raise
an error on runtime.
2020-11-18 02:01:10 +09:00
Takeshi KOMIYA 3becd56e0e Merge branch '3.x' into 8222_novalue 2020-11-17 23:56:42 +09:00
Takeshi KOMIYA cfc96fcb22 Merge pull request #8440 from sphinx-doc/deadsnake_ACTIONS_ALLOW_UNSECURE_COMMANDS
test: Pass ACTIONS_ALLOW_UNSECURE_COMMANDS to deadsnake/action
2020-11-17 23:56:17 +09:00
Takeshi KOMIYA e09b234f7f test: Pass ACTIONS_ALLOW_UNSECURE_COMMANDS to deadsnake/action
The `add-path` command that deadsnake/action internally uses is
disabled by default now [*1].  But the action is still does not
support new style environment files commands [*2].  So this enables
the deprecated command via `ACTIONS_ALLOW_UNSECURE_COMMANDS` envvar.

[*1]: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
[*2]: https://github.com/deadsnakes/issues/issues/135
2020-11-17 23:39:54 +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 aab9ba7641 Merge pull request #8428 from tk0miya/apply_flake8_to_tests_directory
[WIP] test: Apply flake8 to tests/ directory
2020-11-17 22:32:23 +09:00
Takeshi KOMIYA be008a049e test: Apply flake8 to tests/ directory 2020-11-16 20:31:50 +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
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 fc47dcee9a Merge pull request #8433 from tk0miya/fix-duplicated-testnames
test: Fix duplicated testcases
2020-11-16 00:39: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
Takeshi KOMIYA f9512f49fa Merge pull request #8430 from tk0miya/refactor_test_indentation
test: Fix flake8 violations
2020-11-15 18:04:34 +09:00
Takeshi KOMIYA e99e2aef15 test: Fix flake8 violations 2020-11-15 17:46:37 +09:00
Takeshi KOMIYA 8a985773b3 Merge pull request #8427 from tk0miya/refactor_testcases
refactor: Fix flake8 violations under tests/ directory
2020-11-15 17:24:47 +09:00
Takeshi KOMIYA 21a3bd4127 refactor: Fix flake8 violations under tests/ directory 2020-11-15 17:15:40 +09:00
Takeshi KOMIYA a4ccca76ec Update CHANGES for PR #8222 2020-11-15 14:23:38 +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
Takeshi KOMIYA 5a42348fd7 Merge pull request #8425 from francoisfreitag/leak-env
linkcheck: Prevent REQUESTS_CA_BUNDLE leak in tests
2020-11-15 13:54:32 +09:00
Takeshi KOMIYA 11d0a7b75b autodoc: refactor __slots__ operations using getslots() 2020-11-15 02:30:25 +09:00
Takeshi KOMIYA bbb0ea5f12 Add sphinx.util.inspect:getslots() to get __slots__ attribute 2020-11-15 02:30:25 +09:00
Takeshi KOMIYA 4c582b3d66 Merge pull request #8416 from tk0miya/8398_type_annotation_of_confdir
Fix #8398: Fix type annotation for "confdir" of Sphinx.__init__()
2020-11-15 02:00:20 +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
Takeshi KOMIYA 9a8314edcf Merge pull request #8420 from francoisfreitag/unused-args
linkcheck: Remove unused arguments from test_invalid_ssl
2020-11-14 21:08:25 +09:00
Takeshi KOMIYA 78d407cf83 Update CHANGES for PR #8404 2020-11-14 18:55:25 +09:00
Takeshi KOMIYA 614250fec4 Merge pull request #8404 from francoisfreitag/test-ssl-broken
linkchecker: Remove dead code is_ssl_error()
2020-11-14 18:54:16 +09:00
Takeshi KOMIYA 88cb385289 Merge pull request #8414 from francoisfreitag/rm-linkcheck-mock
linkcheck: Remove requests mocks from tests
2020-11-13 02:28:21 +09:00
Takeshi KOMIYA ce53ccefba Fix #8398: Fix type annotation for "confdir" of Sphinx.__init__()
None is allowed to the argument. So it should be "Optional[str]" instead
of "str".
2020-11-13 02:22:15 +09:00
Takeshi KOMIYA 249778e7d0 Fix git merging error 2020-11-13 01:08:46 +09: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 5cabdecb9e Merge pull request #8412 from tk0miya/8164_autosummary_mock_imports_causes_slowdown
Fix #8350: autosummary_mock_imports causes slow down builds
2020-11-12 23:09:44 +09:00
Takeshi KOMIYA 3b0f0f22d4 Merge pull request #8407 from francoisfreitag/allow-redirects
linkcheck: set allow_redirects in requests.head() call
2020-11-12 03:04:22 +09:00
Takeshi KOMIYA 64fb1e5624 Merge pull request #8411 from francoisfreitag/devmode
Run tests with Python Development mode
2020-11-12 02:20:43 +09: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
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 229e11c488 Merge pull request #8376 from tk0miya/test_with_py310
Test with py310
2020-11-10 23:20:08 +09:00
Takeshi KOMIYA 1b9099f339 test: Adjust type annotataions in python 3.10 2020-11-10 22:33:03 +09:00
Takeshi KOMIYA a3c8768afd Do test with py310-dev again 2020-11-10 22:33:03 +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 52432c7e3e Merge pull request #8399 from mitya57/fix-system-translation-override
Put system locale path after the paths specified by configuration
2020-11-10 22:19:15 +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 e2c969c495 Merge pull request #8392 from tk0miya/add_Documenter.config
refactor: Add `Documenter.config` as a shortcut to access the config object
2020-11-10 00:51:56 +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 90f6fd90e0 Merge pull request #8390 from sphinx-doc/7727_autosummary_PycodeError
Fix #7727: autosummary raises PycodeError for namespace python package
2020-11-10 00:42:18 +09:00
Takeshi KOMIYA b4fcd6b9a5 Merge pull request #8394 from francoisfreitag/real-inv
Rewrite test_inspect_main_url to avoid mocking
2020-11-10 00:41:55 +09:00
Takeshi KOMIYA ed5af2461f Merge branch '3.3.x' into 7727_autosummary_PycodeError 2020-11-10 00:31:44 +09:00
Takeshi KOMIYA 0be0cd606c Merge pull request #8387 from tk0miya/8372_slow_autoclass
Fix #8372: autodoc: autoclass directive became slower than Sphinx-3.2
2020-11-10 00:30:09 +09:00
Takeshi KOMIYA 7db3633778 Merge pull request #8231 from tk0miya/8219_params_for_base_generic_class_is_not_shown
Fix #8219: autodoc: Parameters for generic base class are not shown
2020-11-09 02:48:55 +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 5337e3848c Merge pull request #8125 from tk0miya/8119_control_appearance_of_member_not_in_module.__all__
Close #8119: autodoc: Control visibility of module member not in __all__
2020-11-09 02:14:34 +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