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

Move operations.prepare.Downloader (and friends) to network.download.Downloader #7431

Merged
merged 9 commits into from
Dec 5, 2019

Conversation

chrahunt
Copy link
Member

@chrahunt chrahunt commented Dec 4, 2019

This will let us move the construction of the Downloader out of RequirementPreparer without creating a dependency on operations.prepare.

Progresses #7049.

@chrahunt chrahunt added type: refactor Refactoring code skip news Does not need a NEWS file entry (eg: trivial changes) labels Dec 4, 2019
@chrahunt chrahunt changed the title Refactor/operations prepare 2 Move operations.prepare.Downloader (and friends) to network.download.Downloader Dec 4, 2019
When we factor out tests these will be needed in both sets, and it's
easier to refactor tests later if we avoid creating a dependency between
test files.
This will be home to Dowloader, Download, and associated helper
functions. Since this is an abstraction over PipSession, it makes
sense to keep these functions in a separate module.

Also move a helper function here from operations.prepare.
@chrahunt chrahunt force-pushed the refactor/operations-prepare-2 branch from b8668da to c276b0e Compare December 4, 2019 23:30
Since we're moving functions to a file with stricter typing, this
prevents mypy from complaining that our string is possibly None.
This will help us move Downloader construction out of
RequirementPreparer, reducing its concerns and making it easier to test
in isolation.
@chrahunt chrahunt force-pushed the refactor/operations-prepare-2 branch from c276b0e to 78a221c Compare December 4, 2019 23:32
@chrahunt chrahunt closed this Dec 5, 2019
@chrahunt chrahunt reopened this Dec 5, 2019
@chrahunt chrahunt marked this pull request as ready for review December 5, 2019 02:54
@pradyunsg pradyunsg merged commit 7ed66b2 into pypa:master Dec 5, 2019
@chrahunt chrahunt deleted the refactor/operations-prepare-2 branch December 5, 2019 13:33
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jan 4, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation skip news Does not need a NEWS file entry (eg: trivial changes) type: refactor Refactoring code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants