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

Extract downloaded file copying from operations.prepare #7570

Open
chrahunt opened this issue Jan 7, 2020 · 1 comment
Open

Extract downloaded file copying from operations.prepare #7570

chrahunt opened this issue Jan 7, 2020 · 1 comment
Labels
type: refactor Refactoring code

Comments

@chrahunt
Copy link
Member

chrahunt commented Jan 7, 2020

What's the problem this feature will solve?

For pip download and pip wheel, pip copies downloaded files to the output directory while it is doing preparation of requirements here.

Pulling this logic out of operations.prepare will allow us more flexibility to implement the new resolver without breaking pip download or pip wheel, because:

  1. we will not be obligated to re-use RequirementPreparer in order to have files downloaded
  2. we will not have to implement the same functionality in new objects collaborating to do the new dependency resolution

Describe the solution you'd like

Do what the code here is doing, except in pip._internal.commands.DownloadCommand and pip._internal.commands.WheelCommand.

Alternative Solutions

  1. Keep the logic for downloads in RequirementPreparer - since RequirementPreparer is so tightly coupled to Resolver we are unlikely to use it for the new resolver, so we would need to worry about reimplementing this logic

Additional context

@chrahunt chrahunt added the type: refactor Refactoring code label Jan 7, 2020
@pradyunsg
Copy link
Member

pradyunsg commented Jan 8, 2020

I don't think this would be a build logic task -- more around how pip handles downloads vs building distributions from those downloads.

(@chrahunt if you're around, we can probably chat on IRC right now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactor Refactoring code
Projects
None yet
Development

No branches or pull requests

2 participants