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

Reduce action at distance #4978

Merged
merged 7 commits into from
Mar 30, 2018

Conversation

pradyunsg
Copy link
Member

@pradyunsg pradyunsg commented Jan 20, 2018

Removing lines 84-87 in req_set was the intent here, eliminating some not-so-nice action at a distance behaviour, which should make it bit easier to reason about in this part of the codebase.

Removed attributes from InstallRequirement and RequirementSet to make the actual locations of use of the value more clear and to reduce some "action at a distance" behaviour.

@pradyunsg pradyunsg added skip news Does not need a NEWS file entry (eg: trivial changes) type: maintenance Related to Development and Maintenance Processes type: refactor Refactoring code and removed type: maintenance Related to Development and Maintenance Processes labels Jan 20, 2018
@pradyunsg pradyunsg requested a review from a team January 20, 2018 12:50
@pradyunsg pradyunsg force-pushed the refactor/reduce-action-at-distance branch from 5a81ef5 to 146c390 Compare January 21, 2018 10:47
@pradyunsg
Copy link
Member Author

A nice clean history here now. =)

@pradyunsg
Copy link
Member Author

When merging this PR, please use plain merge instead of squash/rebase merges since I have another branch sitting on top of this one now.

@pradyunsg pradyunsg mentioned this pull request Mar 1, 2018
@pradyunsg pradyunsg added this to the 10.0 milestone Mar 1, 2018
@BrownTruck
Copy link
Contributor

Hello!

I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the master branch into this pull request or rebase this pull request against master then it will eligible for code review and hopefully merging!

@BrownTruck BrownTruck added the needs rebase or merge PR has conflicts with current master label Mar 1, 2018
@pypa-bot pypa-bot removed the needs rebase or merge PR has conflicts with current master label Mar 2, 2018
@pradyunsg
Copy link
Member Author

Ohkay... This is interesting:

screen shot 2018-03-03 at 8 18 10 pm

Py3.5 job timed out, not PyPy or PyPy3. :|

@pfmoore any ideas why? It seems to be a simple timeout.

@pfmoore
Copy link
Member

pfmoore commented Mar 26, 2018

@pradyunsg I'm not going to have time to do a proper review of this before the beta. On a superficial look, I'm not sure it improves clarity (the manual setting of is_direct everywhere seems clumsy to me, and I don't really understand how it enhances the code).

If you feel it's worth merging, I won't object, but maybe it can wait? There's no user-facing impact either way.

@@ -81,10 +76,11 @@ def add_requirement(self, install_req, parent_req_name=None,
wheel.filename
)

install_req.use_user_site = self.use_user_site
Copy link
Member Author

@pradyunsg pradyunsg Mar 26, 2018

Choose a reason for hiding this comment

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

@pfmoore the intention is to have requirementset.add do less. By moving this outside, I've tried to make it explicit which paths go which way.

This makes it easier to keep track of what's happening (because this bit of code is highly intertwined). I'm sort of trying to untangle this bit of code here.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think I need to see the whole file - github's review interface isn't that great for changes like this.

OTOH, if the tests pass, and you're happy that the code is easier to maintain, I don't really have a problem with it going in. Feel free to merge it without me going through it in detail, if you want.

@pradyunsg pradyunsg removed the request for review from a team March 27, 2018 05:14
self.require_hashes,
self.finder,
req, self.require_hashes, self.use_user_site, self.finder,

Copy link
Member Author

Choose a reason for hiding this comment

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

Remove this empty line.

@BrownTruck
Copy link
Contributor

Hello!

I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the master branch into this pull request or rebase this pull request against master then it will eligible for code review and hopefully merging!

@BrownTruck BrownTruck added the needs rebase or merge PR has conflicts with current master label Mar 30, 2018
@pypa-bot pypa-bot removed the needs rebase or merge PR has conflicts with current master label Mar 30, 2018
@pradyunsg pradyunsg merged commit a416e55 into pypa:master Mar 30, 2018
@pradyunsg pradyunsg deleted the refactor/reduce-action-at-distance branch May 27, 2018 10:08
@lock
Copy link

lock bot commented Jun 2, 2019

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

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
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.

4 participants