-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Always merge extras from existing and incoming requirements #6242
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
Conversation
pradyunsg
left a comment
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.
This would merge extras from constraints too, IIUC.
Could you fix that (by moving it under the conditional) and add a unit test to ensure that doesn't happen in the future?
That’s exactly the old code 😛 I think the conditional needs to be split to make this work. |
|
I’ve updated the code to not merge extras from an incoming constraint, and add cases to cover variants. Please help me make sure the new comments about early returns make sense. |
pradyunsg
left a comment
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.
Logic change and comments look good to me; though I haven't actually rigorously tested this.
Ah well. Sorry, I reviewed this on the web UI which is pretty bad for showing such things. Does this fix the test in yaml/install/extras[3]? I think it would but again, haven't taken a good look yet. |
7eccdd2 to
0e11822
Compare
|
Let’s give it a shot. |
0e11822 to
f5e781a
Compare
|
OK I get the test still fails… but why does it pass sometimes? |
|
I only glanced at this, but could it be because |
|
Not likely since |
f5e781a to
f174037
Compare
|
Hmmm getting the same failure, but from different environments. Interesting. |
4af4dcc to
7c1151b
Compare
7c1151b to
51fef40
Compare
I have confirmed this finding independently. 😉 |
|
See also #3878. |
|
More specifically: #3878 (comment)
Which is a good point. ;) |
|
@uranusjr Did you find the time to take a look at this? |
|
Sorry, I’ve been caught up at work recently, and not found much energy to work on this. The problem this PR faces is that merging extras is messy without a proper resolver. It is mot difficult to solve the original issue (#6239), but merging in general (say merging |
|
Closing this, since well, none of us have the bandwidth to tackle this right now AFAICT. |
|
Let's reopen this now since we do have bandwidth now. :-) |
|
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 |
|
@brainwane This is a PR for pip's current "legacy" resolver. This specific behavior that this PR is for, has been fixed with the new resolver. I don't think this should be revisited since we don't want to be trying to fix such bugs in the old resolver (it's painfully difficult, and that's why we're writing a new one!). I really think that we should leave this bug alone for now, letting it die along with the old resolver code. |
|
@pypa/pip-team Please make sure to unlock old issues/PRs when you re-open them, since we have @lock[bot] that automatically locks old+closed issues. |
|
Maybe we should have the bot do that for us automatically. Where should I contribute to the bot? |
|
Sorry for misunderstanding, and thanks for the clarification and moving it to the right place, Pradyun! |
Re-closing based on this rationale. :) |
Fix #6239. I added a unit test based on the issue to reflect the situation, so this can be caught if we fail to implement this in the new resolver.