-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
What's the problem this feature will solve?
Currently, --extra-index-url will always operate after the pypi url, no matter what.
This has already been debated at length in #3454 and #5045, where it is hinted that not even by specifying --index-url takes over the order.
In these issues, the accepted solution is to use devpi, or just to use a non-taken name on pypi. However, both these solutions are workarounds:
- not all of us can use devpi. I am personally relying on artifactory with pypi support, and in large corporate environments you can't just install whatever you want.
- If I were to use a name that is not used on pypi, my service would break as soon as someone registers that name on pypi and puts versions that are above mine, basically taking over my installation. This is not only annoying, but also a security problem.
- if I were to register the name on pypi (which is not possible, unless you can push something to it, possibly fake), I could leak internal information about my company's process through the naming of the entities I reserve.
Describe the solution you'd like
Pip should have an additional option to specify exactly the order in which to honor the lookup for pypi services. This will allow to preserve backward compatibility, while solving the above issues.
Alternative Solutions
Workarounds are suboptimal, fragile, potentially a security issue, and rely on solutions that might not be implementable in a large corporate environment.
Additional context
See above posted issues.