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

Refactor operations.prepare.prepare_linked_requirement #8411

Merged
merged 4 commits into from
Jun 30, 2020

Conversation

McSinyx
Copy link
Contributor

@McSinyx McSinyx commented Jun 7, 2020

Break operations.prepare.prepare_linked_requirement
into smaller (not small enough IMHO) methods.

This not meant to solve GH-7815 completely. I agree with #7815 (comment) that we should somehow put the populate_link in the same place for the logic to be easier to parse.

Rather, this is purely to make the method easier for me to read to proceed with more experiments on the downloading process.

As for the stylistic changes with the placement of the closing parentheses, I don't really have a strong opinion on them; although I'd be happier if they're not used for single-line argument list.

Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just talked with @McSinyx on a different communication channel.

This PR contains 2 changes currently -- the behavior change mentioned in the title and a refactoring change to address a "TODO: break this up" comment. He'll be breaking this PR into smaller PRs, for each of the separate changes.

src/pip/_internal/operations/prepare.py Outdated Show resolved Hide resolved
@McSinyx McSinyx force-pushed the refactor-prepare-linked-req branch from 0da0591 to 152a04b Compare June 9, 2020 14:08
@McSinyx McSinyx changed the title Avoid printing full path to cached wheels Refactor operations.prepare.prepare_linked_requirement Jun 9, 2020
@McSinyx McSinyx force-pushed the refactor-prepare-linked-req branch from 152a04b to a1159d7 Compare June 9, 2020 14:12
@sbidoul
Copy link
Member

sbidoul commented Jun 9, 2020

@McSinyx to facilitate (and speed-up) review do not hesitate to split your PR in small commits, each one doing a small thing (such as factoring out a function, reformatting code, etc).

@McSinyx McSinyx force-pushed the refactor-prepare-linked-req branch 2 times, most recently from 2bfa03f to 02c2815 Compare June 10, 2020 05:16
@McSinyx
Copy link
Contributor Author

McSinyx commented Jun 10, 2020

@pradyunsg, @sbidoul, I've just split the patch into multiple commits and hopefully it's nicer for review now.

@McSinyx McSinyx force-pushed the refactor-prepare-linked-req branch from 02c2815 to 90615fe Compare June 10, 2020 05:19
@McSinyx McSinyx closed this Jun 10, 2020
@McSinyx McSinyx reopened this Jun 10, 2020
@McSinyx McSinyx force-pushed the refactor-prepare-linked-req branch from 90615fe to 93ad5d2 Compare June 11, 2020 14:55
@McSinyx McSinyx requested a review from pradyunsg June 11, 2020 17:13
src/pip/_internal/operations/prepare.py Show resolved Hide resolved
src/pip/_internal/operations/prepare.py Outdated Show resolved Hide resolved
src/pip/_internal/operations/prepare.py Outdated Show resolved Hide resolved
src/pip/_internal/operations/prepare.py Show resolved Hide resolved
src/pip/_internal/operations/prepare.py Outdated Show resolved Hide resolved
src/pip/_internal/operations/prepare.py Show resolved Hide resolved
@McSinyx McSinyx force-pushed the refactor-prepare-linked-req branch from 93ad5d2 to 8064e62 Compare June 12, 2020 04:33
@McSinyx
Copy link
Contributor Author

McSinyx commented Jun 12, 2020

Oh no I messed up rebasing stuff 😄

@McSinyx McSinyx force-pushed the refactor-prepare-linked-req branch from 8064e62 to 110d374 Compare June 12, 2020 04:53
src/pip/_internal/operations/prepare.py Outdated Show resolved Hide resolved
src/pip/_internal/operations/prepare.py Outdated Show resolved Hide resolved
src/pip/_internal/operations/prepare.py Outdated Show resolved Hide resolved
src/pip/_internal/operations/prepare.py Outdated Show resolved Hide resolved
src/pip/_internal/operations/prepare.py Outdated Show resolved Hide resolved
src/pip/_internal/operations/prepare.py Outdated Show resolved Hide resolved
@McSinyx McSinyx force-pushed the refactor-prepare-linked-req branch from 110d374 to 8b5ff72 Compare June 17, 2020 16:12
src/pip/_internal/operations/prepare.py Outdated Show resolved Hide resolved
src/pip/_internal/operations/prepare.py Outdated Show resolved Hide resolved
@pradyunsg pradyunsg added the type: refactor Refactoring code label Jun 17, 2020
@McSinyx McSinyx closed this Jun 21, 2020
@McSinyx McSinyx reopened this Jun 21, 2020
@pradyunsg
Copy link
Member

I'd appreciate another pair of 👀 on this PR. ^>^

@McSinyx
Copy link
Contributor Author

McSinyx commented Jun 28, 2020

@sbidoul, I am sorry to ask for this on Sunday, but may I have your review on this PR?

@pradyunsg
Copy link
Member

I'll go ahead and merge this, since this looks good to me. :)

@pradyunsg pradyunsg merged commit 0b23b77 into pypa:master Jun 30, 2020
@McSinyx McSinyx deleted the refactor-prepare-linked-req branch June 30, 2020 13:41
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: refactor Refactoring code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants