{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/pipenv/issues/2159","repository_url":"https://api.github.com/repos/pypa/pipenv","labels_url":"https://api.github.com/repos/pypa/pipenv/issues/2159/labels{/name}","comments_url":"https://api.github.com/repos/pypa/pipenv/issues/2159/comments","events_url":"https://api.github.com/repos/pypa/pipenv/issues/2159/events","html_url":"https://github.com/pypa/pipenv/issues/2159","id":321211974,"node_id":"MDU6SXNzdWUzMjEyMTE5NzQ=","number":2159,"title":"Package in private repo with same name as one from Pypi","user":{"login":"prcastro","id":1280742,"node_id":"MDQ6VXNlcjEyODA3NDI=","avatar_url":"https://avatars2.githubusercontent.com/u/1280742?v=4","gravatar_id":"","url":"https://api.github.com/users/prcastro","html_url":"https://github.com/prcastro","followers_url":"https://api.github.com/users/prcastro/followers","following_url":"https://api.github.com/users/prcastro/following{/other_user}","gists_url":"https://api.github.com/users/prcastro/gists{/gist_id}","starred_url":"https://api.github.com/users/prcastro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prcastro/subscriptions","organizations_url":"https://api.github.com/users/prcastro/orgs","repos_url":"https://api.github.com/users/prcastro/repos","events_url":"https://api.github.com/users/prcastro/events{/privacy}","received_events_url":"https://api.github.com/users/prcastro/received_events","type":"User","site_admin":false},"labels":[{"id":917288782,"node_id":"MDU6TGFiZWw5MTcyODg3ODI=","url":"https://api.github.com/repos/pypa/pipenv/labels/behavior%20change","name":"behavior change","color":"f77e3d","default":false},{"id":743795404,"node_id":"MDU6TGFiZWw3NDM3OTU0MDQ=","url":"https://api.github.com/repos/pypa/pipenv/labels/dependency%20resolution","name":"dependency resolution","color":"5319e7","default":false},{"id":729134113,"node_id":"MDU6TGFiZWw3MjkxMzQxMTM=","url":"https://api.github.com/repos/pypa/pipenv/labels/discussion","name":"discussion","color":"9992e8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-05-08T14:31:15Z","updated_at":"2018-10-07T06:58:34Z","closed_at":null,"author_association":"NONE","body":"I have a package in a private repository with the same name as one from PyPi. The PyPi one, having a higher version number, always get installed.\r\n\r\n\r\n```\r\n[[source]]\r\nurl = \"https://pypi.myrepo.com.br/pypi\"\r\nverify_ssl = true\r\nname = \"myrepo\"\r\n\r\n[[source]]\r\nurl = \"https://pypi.python.org/simple\"\r\nverify_ssl = true\r\nname = \"pypi\"\r\n\r\n[packages]\r\nmypkg = \">=0.0.1\"\r\n\r\n[requires]\r\npython_version = \"3.6\"\r\n```\r\n\r\nIs there a way to define that a package comes from a certain private repo?"},"comment":{"url":"https://api.github.com/repos/pypa/pipenv/issues/comments/427630782","html_url":"https://github.com/pypa/pipenv/issues/2159#issuecomment-427630782","issue_url":"https://api.github.com/repos/pypa/pipenv/issues/2159","id":427630782,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzYzMDc4Mg==","user":{"login":"techalchemy","id":954310,"node_id":"MDQ6VXNlcjk1NDMxMA==","avatar_url":"https://avatars0.githubusercontent.com/u/954310?v=4","gravatar_id":"","url":"https://api.github.com/users/techalchemy","html_url":"https://github.com/techalchemy","followers_url":"https://api.github.com/users/techalchemy/followers","following_url":"https://api.github.com/users/techalchemy/following{/other_user}","gists_url":"https://api.github.com/users/techalchemy/gists{/gist_id}","starred_url":"https://api.github.com/users/techalchemy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techalchemy/subscriptions","organizations_url":"https://api.github.com/users/techalchemy/orgs","repos_url":"https://api.github.com/users/techalchemy/repos","events_url":"https://api.github.com/users/techalchemy/events{/privacy}","received_events_url":"https://api.github.com/users/techalchemy/received_events","type":"User","site_admin":false},"created_at":"2018-10-07T06:58:34Z","updated_at":"2018-10-07T06:58:34Z","author_association":"MEMBER","body":"@fridex you can also just specifically say `--pypi-mirror` or set `PIPENV_PYPI_MIRROR` for our purposes.  But otherwise you are articulating a pretty thorough depiction of the problem, because even if we find the package in the specified index, it's a toss-up whether we find its dependencies there.\r\n\r\n@prcastro \r\nWith regard to having your  indexes ignored, it has more to do with how packages are accumulated and sorted.  If a package comes from the secondary search index (in this case, normal PyPI) but still has the 'best match' version, it gets preferentially sorted.  If there are two equivalent candidates, the primary index takes priority.\r\n\r\nBasically if you specify indexes pip is still going with the best candidate no matter what, and simply leaving other indexes out isn't that straightforward.  If you don't want the best candidate, you can pin something specific (this is how things are currently)\r\n\r\nMyself and @uranusjr would be willing to consider alternatives (@fridex may have the best understanding of how this might be implemented) but it would have to take these into account, and honestly I'd prefer to see it [written as an enhancement proposal](https://github.com/pypa/pipenv/blob/master/peeps/PEEP-001.md) so we can start fleshing out what the logic looks like. That would help us keep it clear going forward.\r\n\r\nI'll keep this open for now but that seems like the right way forward besides checking out the referenced project"}}
{"actor":{"display_login":"techalchemy"}}