-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Cannot resolve packages that are split among multiple sources, on 2022.4.8 #5054
Comments
@ericPrince Please see also: #5053 (comment) |
Basically the reason that this worked in |
Sorry for missing that other issue! Gotcha, so this is intended behavior that is newly implemented with 2022.4.8. Thanks for the quick response, and for sharing the relevant pipenv documentation link in your linked comment (https://pipenv.pypa.io/en/latest/advanced/#specifying-package-indexes) |
@ericPrince Yes somewhat intentional, but I can see where maybe future improvements around how to specify the indexes of sub-dependencies might be helpful rather than the current behavior of getting the default index. Say for example you had two private package servers, each with transitive dependencies on the same server -- there is no good way for the non default server to get the transitive dependencies from the secondary index without specifying every requirement and that it should come from that secondary index. I've thought about this exotic use case, but the problem is how to implement the ability to say transitive dependencies should get the same index as the parent is non-trivial to solve for and may cross into the pipenv-pip boundary for which we want to minimize as much patching of pip as possible. |
It is interesting to note that It would even be nice if, when you specify a source in the Pipfile, you could specify if it's allowed to be used to find any packages, or if it can only be used for packages that list it as the source. I think that would maintain security of the lock, but allow a user to turn on this convenient but potentially unsafe behavior for sources they trust. |
Issue description
If I make a Pipfile with multiple sources, pipenv 2022.4.8 fails for any package that doesn't exist in the first source. Older versions of pipenv including 2022.3.28 worked. This seems like it could be related to #5042.
pipenv lock
fails)This was not an issue with pipenv 2022.3.28 (tested it).
I will add that specifying which index to use for the packages that come from the 2nd listed source works. However, this gets complex when I have a package from the 2nd listed source (ie an index of corporate packages), and that package has dependencies on both standard python libraries from the first source and on private packages from the 2nd source. I'd really like to not have to re-list every transitive dependency in the Pipfile with the right source to pull it from.
Expected result
Pipenv resolves packages from both pypi and the private source.
Actual result
Pipenv fails to resolve any package that doesn't exist in the first source.
Steps to replicate
(above)
The text was updated successfully, but these errors were encountered: