Skip to content

Comments

add progress to download_file if in Indicator context#5451

Merged
neersighted merged 4 commits intopython-poetry:masterfrom
tgolsson:ts/progress-bar-download-file
May 18, 2022
Merged

add progress to download_file if in Indicator context#5451
neersighted merged 4 commits intopython-poetry:masterfrom
tgolsson:ts/progress-bar-download-file

Conversation

@tgolsson
Copy link
Contributor

Pull Request Check List

No meaningful documentation to add and hard to test a progress-bar.


Resolves: #999

This code adds a context field for the Indicator that can be used for download_file.
image

This has to be integrated with the Indicator to synchronize the output, otherwise it leads to corruption/racey output since ProgressIndicator.auto writes from a second thread.

Based on that requirement I opted to use a class field to store this context, as otherwise almost every function involved in dependency resolution got an indicator argument to feed it to download_file. This felt extremely noisy, and also hit some circular imports.

@tgolsson tgolsson force-pushed the ts/progress-bar-download-file branch from 16bbee0 to 9a02849 Compare April 14, 2022 20:56
@tgolsson tgolsson force-pushed the ts/progress-bar-download-file branch from 7f730ae to 8b636a6 Compare April 28, 2022 18:40
@tgolsson tgolsson mentioned this pull request May 2, 2022
@abn abn mentioned this pull request May 10, 2022
neersighted
neersighted previously approved these changes May 18, 2022
@neersighted neersighted merged commit a614b9b into python-poetry:master May 18, 2022
@kasteph kasteph mentioned this pull request May 30, 2022
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
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.

Display progress bar when downloading larger wheels

4 participants