-
-
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
linkcheck builder: begin using session-based HTTP requests #11340
Closed
jayaddison
wants to merge
26
commits into
sphinx-doc:master
from
jayaddison:issue-11324/linkcheck-sessioned-requests
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
f538440
linkcheck builder: close streamed HTTP response objects when no respo…
jayaddison 524368f
Add test coverage for anchor-in-document linkchecking
jayaddison 9ec505f
refactor: use requests.Response objects as context managers during li…
jayaddison c708cc9
cleanup: remove unused HTML test data file
jayaddison 4eb7896
Merge branch 'master' into issue-11317/linkcheck-close-streamed-http-…
jayaddison 95dd08a
Nitpick: remove duplicated HTML tag-closing character
jayaddison 2aceccc
Merge branch 'master' into issue-11317/linkcheck-close-streamed-http-…
jayaddison a3a340b
continuous integration: unit test workflow: simplify default PYTHONWA…
jayaddison 692fdef
Revert "refactor: use requests.Response objects as context managers d…
jayaddison 6fd82b3
Fixup: do not close the response before anchor-checking has been perf…
jayaddison 98df982
Fixup: close the response after an HTTP HEAD response is received
jayaddison ec415ea
Revert "Fixup: close the response after an HTTP HEAD response is rece…
jayaddison 5769478
Revert "Fixup: do not close the response before anchor-checking has b…
jayaddison 8269c6d
Revert "Revert "refactor: use requests.Response objects as context ma…
jayaddison 89442fc
Merge branch 'master' into issue-11317/linkcheck-close-streamed-http-…
jayaddison a6d7a77
Merge branch 'master' into issue-11317/linkcheck-close-streamed-http-…
jayaddison b6d8006
Merge branch 'master' into issue-11317/linkcheck-close-streamed-http-…
jayaddison 69a6828
Merge branch 'master' into issue-11317/linkcheck-close-streamed-http-…
jayaddison 5fafefa
linkcheck builder: begin using session-based HTTP requests
jayaddison c6191a1
tests: linkcheck builder: update test webserver handlers from HTTP/1.…
jayaddison 616c55b
tests: use threaded Python basic HTTP server implementation during un…
jayaddison 2615fe4
tests: linkcheck: ConnectionResetHandler: close the connection by set…
jayaddison 982f862
tests: linkcheck: make_redirect_handler: send zero-valued content-len…
jayaddison a6863bb
tests: linkcheck: add connection-count measurement
jayaddison 01c250e
tests: linkcheck: reduce worker count to one for 'test_TooManyRedirec…
jayaddison bd2ed0b
tests: linkcheck: capture_headers_handler: relocate the (client) head…
jayaddison File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
tests/roots/test-linkcheck-localserver-too-many-redirects/conf.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
exclude_patterns = ['_build'] | ||
linkcheck_timeout = 0.075 | ||
linkcheck_workers = 1 |
1 change: 1 addition & 0 deletions
1
tests/roots/test-linkcheck-localserver-too-many-redirects/index.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
`local server <http://localhost:7777/>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
exclude_patterns = ['_build'] | ||
linkcheck_anchors = True | ||
linkcheck_timeout = 0.075 | ||
linkcheck_workers = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why do we close here?
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.
I wanted to ensure that the
requests
session's resources are cleaned up when the linkchecker completes -- some warnings appeared during testing to indicate that they weren't -- and this seemed to be a good place for it (theNone
hyperlink is used as a marker (sentinel?) to indicate that the worker should shutdown).