Skip to content
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

add progress to download_file if in Indicator context #5451

Merged

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
src/poetry/puzzle/provider.py Outdated Show resolved Hide resolved
src/poetry/utils/helpers.py Outdated Show resolved Hide resolved
@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
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