Skip to content

linkcheck builder: begin using session-based HTTP requests#11503

Merged
AA-Turner merged 10 commits intosphinx-doc:masterfrom
jayaddison:issue-11324/linkcheck-sessioned-requests
Jul 23, 2023
Merged

linkcheck builder: begin using session-based HTTP requests#11503
AA-Turner merged 10 commits intosphinx-doc:masterfrom
jayaddison:issue-11324/linkcheck-sessioned-requests

Conversation

@jayaddison
Copy link
Copy Markdown
Contributor

Feature or Bugfix

  • Bugfix
  • Refactoring

Purpose

  • Reduce the number of HTTP connections used during linkchecking, reducing network resource usage.

Detail

Relates

@AA-Turner
Copy link
Copy Markdown
Member

Should we rewrite the existing get and head in terms of a session? This is how requests implements its module-level request methods, might make sense to take inspiration from that.

A

@jayaddison
Copy link
Copy Markdown
Contributor Author

It's probably a good idea to re-use the same code paths for both methods.. my rationale when duplicating the implementations was to avoid modifying any non-linkcheck-builder code.

I'll take another look into consolidating them into shared implementations.

@jayaddison
Copy link
Copy Markdown
Contributor Author

What do you think of the approach in b7d7fcf ?

@AA-Turner
Copy link
Copy Markdown
Member

I've pushed a commit to only implement the lower-level Session.request, to avoid duplication -- hopefully all looks good!

A

@jayaddison
Copy link
Copy Markdown
Contributor Author

I've pushed a commit to only implement the lower-level Session.request, to avoid duplication -- hopefully all looks good!

Nice - yep, that looks much better to me 👍

@AA-Turner AA-Turner merged commit 450ad63 into sphinx-doc:master Jul 23, 2023
@AA-Turner
Copy link
Copy Markdown
Member

Thanks @jayaddison -- this is the culmination of quite a bit of preparatory work, thank you for driving this all through!

A

@jayaddison
Copy link
Copy Markdown
Contributor Author

Thank you very much @AA-Turner :)

You're welcome. I'll follow along with the next release to listen for user feedback.

@jayaddison jayaddison deleted the issue-11324/linkcheck-sessioned-requests branch July 23, 2023 21:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linkcheck builder: begin using requests.Session functionality during linkchecking

2 participants