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

pip install upgrade will not upgrade package if extras_require specified. #10173

Closed
1 task done
wangchao1230 opened this issue Jul 19, 2021 · 4 comments
Closed
1 task done
Labels
type: bug A confirmed bug or unintended behavior

Comments

@wangchao1230
Copy link

Description

# suppose we have installed a old package version like below
pip install azureml-dataprep[pandas]==2.15.1

# NOT EXPECTED: this command will not upgrade if the [pandas] extras_require specified
pip install azureml-dataprep[pandas] --upgrade

# this command will upgrade the package version
pip install azureml-dataprep --upgrade

Expected behavior

# this command will upgrade if the [pandas] extras_require specified
pip install azureml-dataprep[pandas] --upgrade

pip version

21.1.3

Python version

Python 3.7.6

OS

Windows

How to Reproduce

See description part.

Output

No response

Code of Conduct

@wangchao1230 wangchao1230 added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Jul 19, 2021
@domdfcoding
Copy link
Contributor

I can reproduce with pip 21.1.x but not with 21.0.1 and not with main.

I have tracked the issue down to 778778c; prior to that it works as expected.
It seems to be working correctly again after 73edd74

I don't know whether a 21.1.4 release is planned, but 21.2 should be out soon (follow #10106 for updates). In the interim downgrading to 21.0.1 should work around this.

@wangchao1230
Copy link
Author

Thanks Dominic for the info!

@uranusjr
Copy link
Member

uranusjr commented Jul 21, 2021

I took a look at the changes (thanks @domdfcoding for the additional info, that saved me a ton of time!) and it seems the previous implementation “worked” accidentally because we were handling packages with extras incorrectly. 778778c fixed that handling but unfortunately broke the accidental code path that made this work. 73edd74 then implemented a proper code path (for something else about extras that never worked) and incidentally also correctly handled the issue.

Extras are the worst 🙄

@wangchao1230 Would you be interested in contributing a test case so we don’t accidentally break this in the future? A test function in tests/functional/test_new_resolver.py would be most appropriate, and you can find many examples how to write such a test in that file.

@uranusjr uranusjr added S: awaiting response Waiting for a response/more information and removed S: needs triage Issues/PRs that need to be triaged labels Jul 21, 2021
@no-response
Copy link

no-response bot commented Aug 5, 2021

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@no-response no-response bot closed this as completed Aug 5, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2021
@pradyunsg pradyunsg removed the S: awaiting response Waiting for a response/more information label Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

4 participants