-
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
BUG?: extra in extra not working #3516
Comments
Thanks for the fast response, After searching through the duplicates I found that #3105 is already merged... but #2716 not yet. Maybe this may help? If this issue is indeed meant to be completely fixed, here my
Maybe someone can reproduce the weird behaviour I experience EDIT: I know recognize a maybe crucial difference: I install all these with |
to workaround following issue: <pypa/pip#3516>
Closing this, it is either already fixed or if it isn't it is fundamentally a duplicate of #988. |
This is not a duplicate issue, I am currently experiencing this on version 9.0.1. The difference is that #3147 is talking about extras appearing in setup(
install_requires=['some-package'],
extras_require=[
'a-different-package[an-extra]'
]
) The issue I am having that is described here is when the extra requirement matches the package in setup(
install_requires=['the-same-package'],
extras_require=[
'the-same-package[an-extra]'
]
) Because |
I am also still having this problem in Pip 9.0.3 and 10.0.1. I'll provide a specific example. PySOA provides a PyTest plugin, and that plugin has a set of requirements, represented in the extra
In our CI environment, when we run This really seems like a fundamental problem to me, and doesn't seem like a duplicate of any other issue that has been reported except for maybe #3147, which was marked as a duplicate of #3189, which is not at all what the problem here is. Multiple pull requests (#2716, #3105, et. al) have purported to fix this, but it's clearly not fixed. Is there a non-closed issue somewhere that describes this problem that hasn't been marked as a duplicate of some other issue that doesn't, actually, describe this problem? (Addendum: I just found #4957 ... that might fit the notion of a non-closed issue that describes this problem ... ?) |
I'm having the same problem. And it included the case where the extras define an existing package with version-constraints. setup(name='foo',
install_requires=['bar'],
extras_require={'pinbar': 'bar==1.2.3']}) Please reopen. |
By debugging i think that the comparison between the main and the extra requirement for the same distribution at pip/src/pip/_internal/req/req_set.py Line 123 in 2b3609a
misses the cases where they have different pinned-versions or extras. Could this be the source for the problems described here? |
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. |
Dear team,
I just stumbled upon a bug, and also tried to figure out what is going on, however it is too complicated for me unfortunately... I hope you can help:
In principle I have a
setup.py
forparentpackage
with essentially the following code:This however does not work as expected. When installing the
parentpackage[extra]
,otherpackage
gets installed, however onlypackage
and NOTpackage[extra]
(i.e. nothing of the extra requirements listed underpackage[extra]
is installed).I felt like the reason lies here https://github.com/pypa/pip/blob/develop/pip/req/req_set.py#L261
in that if the second requirement is added (
"package[extra]"
), than bothinstall_req.constraint == False
andexisting_req.constraint == False
, which prevent the crucial code part from being executed.I just changed this that it gets executed for testing (i.e. made it
if not install_req.constraint and not existing_req.constraint
). Surprisingly for me, the nested extra packages are STILL NOT installed.Any help would be great
The text was updated successfully, but these errors were encountered: