-
-
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
Public dependencies are not resolved properly on private packages #1539
Comments
I have faced a similar problem (#1291) and am facing that problem again at this very moment.
Maybe one of the issues should be closed, but i will leave that to the actual contributors to decide. |
I ran into this as well. Version information is:
|
@festinuz Thanks, I edited my description to include my environment. |
I think the default behavior was supposed to be to try each index and fail silently before moving on. Not sure but this seems like a regression |
@kennethreitz I don't see a commit that references this ticket, so I'm wondering if something changed to close this? |
cleaning house, it'll come back up if it's an issue. |
It certainly was still an issue for me 2 days ago. |
Cannot reproduce with this Pipfile: [[source]]
url = "https://testpypi.python.org/pypi"
verify_ssl = true
name = "pypi"
[packages]
requests = "*"
[dev-packages]
[requires]
python_version = "3.6" |
@kennethreitz this was incorrectly closed. Your test is inadequate because the dependencies of requests exist in testpypi. The issue, as is stated in the description, is "When a public package is listed as a dependency in a private package, the package will fail to install because it doesn't exist in the private index." |
@kennethreitz The problems happens when you have multiple sources in the Pipfile, and you are installing a mix of packages each of which only exists in one of those sources. Most commonly you have a private source, which has packages that depend on packages on a public source (generally pypi). |
@kennethreitz Will you reopen this ticket, or should we file a new one? |
good first step to resolution is a failing test case :) |
@jratner I described how to reproduce this in the description, but if it helps, I've broken it down for you:
|
gotcha - thanks for the instructions. what I was suggesting was posting a gist that sets all of this up correctly and reproduces the problem (i.e., a script that sets up a pypi index, uploads a file to it (or just stores the file in the folder as you said) and then attempts to pipenv install from it, reproducing the issue you've shown above). |
I think we understand the issue. Here is my proposed solution, if there are any concerns raise them here and we can discuss: Our current implementation iterates over the indexes and attempts to install each top level package using each index. It used to fail silently, obviously that doesn't work anymore. This is problematic for a couple of reasons
My proposal is this:
Thoughts? |
+1 |
We use |
ah only for locking |
reproduced. fixing. |
I actually can't get this to reproduce locally. I note a line here:
I see what's going on here. |
So you're providing a package from one index that depends on packages from another index. |
I believe d5b9b36 should fix this right up :) |
Hey @kennethreitz, I don't think d5b9b36 has quite solved this issue. I've attempted to reproduce by publishing a package to Test PyPI that references a package on regular PyPI. Expected behaviourInstalls Works when running pip directly:
Actual behaviourFails with the following error message
Steps to reproduceUsing
For simplicity's sake, I've hosted the contents of the private and public packages at the following gists:
My Pipenv version: Pipenv location: Python location: Other Python installations in
PEP 508 Information:
System environment variables:
|
@kennethreitz again, I think this has been incorrectly closed. Not installing deps, as in d5b9b36, is not a proper solution. We obviously still want dependencies installed. What @techalchemy said makes sense, pipenv should use |
- Fixes #1539 - Currently writes the wrong index name to the lockfile - Currently fails one round before succeeding
Thanks! Confirmed it's working. |
When a public package is listed as a dependency in a private package, the package will fail to install because it doesn't exist in the private index.
For example, if you specify an additional source in your
Pipfile
:This is the following output from running
pipenv install --verbose local_package
It seems that the issue is with pipenv using
-i
instead of--extra-index-url
If I run
pip install --extra-index-url http://localhost:8080 local_package
everything is installed correctly.Specifying the
index
forlocal_package
under[packages]
doesn't help.Describe your environment
Expected result
I would expect for the public package (in the case above,
boto3
), to be fetched from the public source by default.Actual result
The public package is fetched from the private source.
Steps to replicate
Set up a private pypi index, add source to Pipfile, and run install command from above.
The text was updated successfully, but these errors were encountered: