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
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
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
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
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
Marlon James
6082ce67a4
autodoc: document :novalue: option
2020-11-15 14:19:33 +09:00
Marlon James
04b374a8a7
autodoc: add :novalue: option
...
When the :annotation: option is not used, the :novalue: option may be used to remove the value.
This is useful when you want to display the type hint but not the value, and you don't want to specify the annotation manually.
2020-11-15 14:19:33 +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
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
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