-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #6629: linkcheck: Handle rate-limiting #8467
Conversation
The Windows checks are failing on tests I can increase the margin on Windows to accommodate for the seemingly longer time needed to start a thread, or skip the test on Windows. I would prefer not to remove these tests. I ended up implementing a version with the Requests library, because of #8391 (comment). I prefer to avoid forcing the use of async when not absolutely mandatory. That way, the project can move on without async, until we decide the time is ripe. I am happy to pursue the async way, I am convinced it will yield better performance and possibly simplify the implementation, but at the expense of:
|
138f34e
to
4d3c93b
Compare
Thanks for the review! I believe I addressed all feedback and the patch is ready for another look. |
093ed11
to
7489c5c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits.
Follow the Retry-After header if present, otherwise use an exponential back-off.
7489c5c
to
6b90a63
Compare
Rebased, applied suggestions (removed duplicate mention of linkcheck in the CHANGES) and squashed the commits. |
Merged! Thank you for your great work! |
To separate hyperlink itself and checking (intermediate) state, this removes `next_check` attribute from Hyperlink object and add a new named-tuple `CheckRequest`. It was rejected idea on implementing rate-limiting first (see sphinx-doc#8467). But it's better way to separate large builder module into small components and make whole of linkcheck builder simple. After this change, `Hyperlink` object represents a hyperlink on the document. It has a URI and location info (docname and lineno).
To separate hyperlink itself and checking (intermediate) state, this removes `next_check` attribute from Hyperlink object and add a new named-tuple `CheckRequest`. It was rejected idea on implementing rate-limiting first (see sphinx-doc#8467). But it's better way to separate large builder module into small components and make whole of linkcheck builder simple. After this change, `Hyperlink` object represents a hyperlink on the document. It has a URI and location info (docname and lineno).
To separate hyperlink itself and checking (intermediate) state, this removes `next_check` attribute from Hyperlink object and add a new named-tuple `CheckRequest`. It was rejected idea on implementing rate-limiting first (see sphinx-doc#8467). But it's better way to separate large builder module into small components and make whole of linkcheck builder simple. After this change, `Hyperlink` object represents a hyperlink on the document. It has a URI and location info (docname and lineno).
To separate hyperlink itself and checking (intermediate) state, this removes `next_check` attribute from Hyperlink object and add a new named-tuple `CheckRequest`. It was rejected idea on implementing rate-limiting first (see sphinx-doc#8467). But it's better way to separate large builder module into small components and make whole of linkcheck builder simple. After this change, `Hyperlink` object represents a hyperlink on the document. It has a URI and location info (docname and lineno).
To separate hyperlink itself and checking (intermediate) state, this removes `next_check` attribute from Hyperlink object and add a new named-tuple `CheckRequest`. It was rejected idea on implementing rate-limiting first (see sphinx-doc#8467). But it's better way to separate large builder module into small components and make whole of linkcheck builder simple. After this change, `Hyperlink` object represents a hyperlink on the document. It has a URI and location info (docname and lineno).
To separate hyperlink itself and checking (intermediate) state, this removes `next_check` attribute from Hyperlink object and add a new named-tuple `CheckRequest`. It was rejected idea on implementing rate-limiting first (see sphinx-doc#8467). But it's better way to separate large builder module into small components and make whole of linkcheck builder simple. After this change, `Hyperlink` object represents a hyperlink on the document. It has a URI and location info (docname and lineno).
Feature or Bugfix
Purpose
Follow the Retry-After header if present, otherwise use an exponential
back-off.
Relates
Issue #6629
Issue #7388