linkcheck: Fix race condition that could lead to checking the availability of the same URL twice

So far, linkcheck scans all of references and images from documents, and
checks them parallel.  As a result, some URL would be checked twice (or
more) by race condition.

This collects the URL via post-transforms, and removes duplicated URLs
before checking availability.

refs: #4303
This commit is contained in:
Takeshi KOMIYA
2021-01-19 00:23:25 +09:00
parent a7b6b6bb7f
commit cead0f6ddf
6 changed files with 64 additions and 74 deletions

View File

@@ -26,6 +26,11 @@ The following is a list of deprecated interfaces.
- (will be) Removed
- Alternatives
* - ``sphinx.builders.linkcheck.node_line_or_0()``
- 3.5
- 5.0
- ``sphinx.util.nodes.get_node_line()``
* - ``sphinx.ext.autodoc.AttributeDocumenter.isinstanceattribute()``
- 3.5
- 5.0