-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Downloader support resume from connection reset #9422
base: main
Are you sure you want to change the base?
Conversation
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.
download_file()
is used in some more places (HTTPRepository
, DirectOrigin
), which might not be relevant for installing but only for locking. Maybe, connection resets are not that relevant for locking. On the other side, it feels more consistent to also retry in this case. What do you think?
HTTPRepository
already has the config available, so it is easy to use the setting. For DirectOrigin
, we had to add another parameter.
src/poetry/config/config.py
Outdated
@@ -131,6 +131,7 @@ class Config: | |||
"modern-installation": True, | |||
"parallel": True, | |||
"max-workers": None, | |||
"max-retries": 0, |
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.
You have to add this setting in two more places:
- Some lines below in
_get_normalizer
- In
ConfigCommand.unique_config_values
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.
Done.
|
||
**Environment Variable**: `POETRY_INSTALLER_MAX_RETRIES` | ||
|
||
*Introduced in 1.9.0* |
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.
Reminder to myself: The next version might be 2.0.0
.
Sure. I can add parameter to them, It's my first time working in this repo, I agree that even they are not much needed for retry it's better to make it all consistent. But for the config, should we still use |
Co-authored-by: Randy Döring <30527984+radoering@users.noreply.github.com>
Good question. Thinking about it, |
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.
Change config to "requests.max-retries"
src/poetry/config/config.py
Outdated
@@ -131,6 +131,7 @@ class Config: | |||
"modern-installation": True, | |||
"parallel": True, | |||
"max-workers": None, | |||
"max-retries": 0, |
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.
Done.
Pull Request Check List
Resolves: #3219