You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like many of us, I work in a corporate environment which does not allow direct access to pypi.org, and instead offers internal artifactory repositories for both internal publication of code, as well as proxied for pypi.
We can trivially configure pip to use ONLY the internal repositories, and we can do so for poetry but this only seems to work if the configuration is managed in pyproject.toml [tool.poetry.source] stanzas, and not when configured via config.toml.
If I add all three repositories to my pyproject.toml files, everything works as documented. One of them is defined as priority="primary", and no attempt is made to reach pypi.org.
However, we have a LOT of code repositories, and I really do not want to have to maintain the entries in pyproject.toml. I would prefer to factor that configuration out into a per-develop config file, so I attempted to make this work with ~/AppData/Roaming/pypoetry/config.toml file. Everyone needs one of these anyway, since we have some common configuration everyone is required to use.
Nothing we have tried results in pypi.org NOT being contacted. The same names, the same URLS, and the same one is defined as primary, yet the attempt to reach pypi.org means this configuration simply can not be used.
Is there an extra configuration required to suppress the use of pypi.org when using a config.toml file, or is this perhaps a bug?
I can reproduce this trivially, and would be more than happy to provide additional diagnostics, if this is in fact a bug.
Workarounds
The current workaround is to maintain the poetry config in each and every pyproject.toml file.
With all due respect, this is related, but not an exact duplicate.
I guess it boils down to 'priority = "primary"' is only supported when configured via pyproject.toml? I expected like for like between the two configuration mechanisms, which I now see isn't true.
If config.toml only supports a small subset of what can be configured via pyproject.toml, I suppose that's understandable. We'll just have to live with copying the config into pyproject.toml everywhere, since that works fine.
we can tell you that this is working as designed, and then you can say that in that case you have a feature request, and then we can tell you it's a duplicate if that makes you happier...
Description
Like many of us, I work in a corporate environment which does not allow direct access to pypi.org, and instead offers internal artifactory repositories for both internal publication of code, as well as proxied for pypi.
We can trivially configure pip to use ONLY the internal repositories, and we can do so for poetry but this only seems to work if the configuration is managed in pyproject.toml [tool.poetry.source] stanzas, and not when configured via config.toml.
If I add all three repositories to my pyproject.toml files, everything works as documented. One of them is defined as priority="primary", and no attempt is made to reach pypi.org.
However, we have a LOT of code repositories, and I really do not want to have to maintain the entries in pyproject.toml. I would prefer to factor that configuration out into a per-develop config file, so I attempted to make this work with ~/AppData/Roaming/pypoetry/config.toml file. Everyone needs one of these anyway, since we have some common configuration everyone is required to use.
Nothing we have tried results in pypi.org NOT being contacted. The same names, the same URLS, and the same one is defined as primary, yet the attempt to reach pypi.org means this configuration simply can not be used.
Is there an extra configuration required to suppress the use of pypi.org when using a config.toml file, or is this perhaps a bug?
I can reproduce this trivially, and would be more than happy to provide additional diagnostics, if this is in fact a bug.
Workarounds
The current workaround is to maintain the poetry config in each and every pyproject.toml file.
Poetry Installation Method
pip
Operating System
Windows 10
Poetry Version
Poetry (version 1.8.5)
Poetry Configuration
Python Sysconfig
sysconfig.log
Example pyproject.toml
Poetry Runtime Logs
poetry-runtime.log
The text was updated successfully, but these errors were encountered: