-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Always reinstall local distributions provided by the user #9147
Always reinstall local distributions provided by the user #9147
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm inclined to think that we should explicitly not reinstall wheels even if they are local files. I'd like to see some justification for that.
I'm fine with the change as it applies to installs from source.
c6a9490
to
cdbb2ba
Compare
Addressed these concerns, I think. :)
@@ -147,6 +152,29 @@ def resolve(self, root_reqs, check_supported_wheels): | |||
ireq.should_reinstall = True | |||
elif dist_is_editable(installed_dist) != candidate.is_editable: | |||
ireq.should_reinstall = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related, but is this a bug? I thought editables are always reinstalled. (i.e. this should be true if dist_is_editable(installed_dist) == candidate.is_editable == True
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No one's complained yet. And, we'd only hit this if someone tries to install an editable-over-already-installed-editable.
I'm fine with deferring this until someone complains.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd hate to be the one seen as complaining but reinstalling an already installed editable is a very common workflow, to make sure entrypoints are up-to-date. The fix looks easy enough. I'll look at writing a test for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#9116 seems to be along the same lines as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One comment in the code that needs correcting as it's the opposite of what's meant, and a couple of notes for clarification, but nothing that's a showstopper.
Signed-off-by: Pradyun Gedam <[email protected]>
Signed-off-by: Pradyun Gedam <[email protected]>
Also, adds a test for source distributions being reinstalled. Signed-off-by: Pradyun Gedam <[email protected]>
Signed-off-by: Pradyun Gedam <[email protected]>
Signed-off-by: Pradyun Gedam <[email protected]>
Signed-off-by: Pradyun Gedam <[email protected]>
Signed-off-by: Pradyun Gedam <[email protected]>
This was a copy-paste error that I didn't catch earlier. Signed-off-by: Pradyun Gedam <[email protected]>
b8c1752
to
b2785d8
Compare
Turns out... Our tests are not robust to us-east-1 going down. ;) |
I'll make a separate PR for editables, with a test. Merging this! :) |
Toward #8711