Make index publisher HTTP timeout configurable#2244
Open
Jatin-Shihora wants to merge 1 commit intopypa:masterfrom
Open
Make index publisher HTTP timeout configurable#2244Jatin-Shihora wants to merge 1 commit intopypa:masterfrom
Jatin-Shihora wants to merge 1 commit intopypa:masterfrom
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #2158 and #761
Adds a configurable HTTP timeout for the index publisher. This allows users on slow networks, such as those behind a VPN, to override the hardcoded 10 second default without needing to patch the source.
Configuration (in order of precedence)
--timeoutCLI flag onhatch publishHATCH_INDEX_TIMEOUTenvironment variabletimeoutkey in:[publish.index][publish.index.repos.*]inconfig.tomlIf unset, the behavior falls back to the existing default of DEFAULT_TIMEOUT = 10
I have made this PR only affect the publish path, that is the
download_file()helper inutils/network.py, which is used byhatch python install, also relies onDEFAULT_TIMEOUT. That can be addressed separately in a follow-up if needed.