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
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
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
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
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
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
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
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
François Freitag
640cc40b7e
linkcheck: Set allow_redirects in requests.head() call
...
Following redirects is the default for other methods.
https://requests.readthedocs.io/en/latest/api/#requests.request
Define the option closer to its use.
2020-11-11 18:32:54 +01: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
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
François Freitag
22a4ed531c
Run tests with Python Development mode
...
Helps catching more issues with the test suite.
https://docs.python.org/3/library/devmode.html#devmode
2020-11-11 14:20:18 +01: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
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
Dmitry Shachnev
f92989ca6f
Put system locale path after the paths specified by configuration
...
In Debian, we ship the translation data for Sphinx in the default search
path, /usr/share/locale/. When a .mo file is present there, it takes
priority over the translation files specified by the configuration, so
overriding does not work. This makes test_customize_system_message fail.
2020-11-09 21:37:01 +03: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
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
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