poetry not respecting index-url in pip.conf
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
OS version and name:OSX 10.15.1
-
Poetry version: 1.0.0b0
Issue
we have a pip.conf file like the following:
[global]
timeout = 20
index-url = https://pypi.fbn.org/simple
if you run pip install numpy, you’re restricted to the versions on our server as expected:
Looking in indexes: https://pypi.fbn.org/simple
Collecting numpy
Downloading https://repo-fbn-org.s3.amazonaws.com/pypi/2a3e/numpy/numpy-1.16.5....
running the same command from poetry:
poetry add numpy
Using version ^1.17.3 for numpy
so its going out to pypi.org instead of our repo.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Repositories | Documentation | Poetry - Python dependency ...
Repositories Poetry supports the use of PyPI and private repositories for discovery ... This is not the same configuration used when publishing a...
Read more >Poetry: changing to private pypi repository on the command line
This is not changed with poetry config repositories.private "$PIP_EXTRA_INDEX_URL" . How should we change this then? python-poetry.
Read more >Adding a global config to specify package indexes
I'd like to propose introducing a standardized config for users to specify package indexes. Right now, each tool must have its own config, ......
Read more >PyPI packages in the Package Registry - GitLab Docs
--index-url tells the client to check for the package at the provided URL only. If you're following the guide and want to install...
Read more >Why you should use Poetry instead of Pip or Conda for Python ...
This is something that Poetry can do but Pip cannot. In Poetry, we could specify the following configuration in the pyproject.toml file to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@thehesiod The fact that Poetry is using
pip
internally is an implementation detail and, as such, it only understands its own configuration files. So it’s unlikely that Poetry will ever use thepip.conf
file.@sdispater The problem is that in using
pip
,poetry
implicitly does make use of thepip
config (for example duringpoetry install
, IIRC), but duringpoetry add
, it does not. This on itself seems inconsistent to me… (this is all from memory, I checked it a few months ago)In order to get rid of that inconsistency, and you still want to (or have to) use
pip
, I think you should instructpip
to fully ignore whatever config is present and let it get its config provided by poetry (if that is possible at all).But then it becomes even more important that a user can configure poetry on per-user basis and/or system-wide for the nexus-like index url and trusted host setting, ref. https://github.com/python-poetry/poetry/issues/1632 and https://github.com/python-poetry/poetry/issues/1070.