-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[[tool.poetry.source]] setting is ignored #3474
Comments
Maybe you need to disable PyPI as a source?
|
Thanks! @sinoroc No luck either. Now I have to setup a proxy, and I see all the traffic goes to pypi: it works, but still too slow, compares to a local mirror pypi |
That seems strange to me.
|
I'm having the same issue with a twist- I have multiple poetry-based projects on a single machine with nearly identical pyproject.toml files, all but one work successfully using the private repo. After bisecting the pyproject.toml file, I realized that the addition of "[tool.poetry.scripts]" to the bad module is what triggers this issue, even if there are no console scripts defined in the block. I haven't had time to debug any further but figured I'd mention this here in case someone is able to get to before I do. |
after some debugging, I found that if "[[tool.poetry.source]]" precedes "[tool.poetry.scripts]" in pyproject.toml, then as early as PyProjectTOML.data(), self._data["tool"]["poetry"] will be absent a "source" key. However, if I move tool.poetry.source below tool.poetry.scripts in the file, this problem doesn't occur. I'm not sure if the issue is my ignorance of toml or an issue with tomlkit, but will do a little more debugging to see if I can spot the root cause. |
I ran into the same issue on Example of what I had:
|
As I'm using poetry more and more, I might found clue leading to my issues (I haven't been through this for months). At time when the issue reported, I think we're going though pip's upgrade; and there's sync issue between central repo (pypi) and its mirrors (for example, aliyun in my case). According to my observation, the sync may take several days. As more and more python libraries manage dependancy with poetry, I found now dep resolution time is decreased, so a second source is not required (it's worth some time to resolve deps use central repo, other than mirrors). If you still experiece slow resolution, maybe you could try resolve your project.toml on a machine located at us cloud service. I did that several times months ago. close this one since I didn't expierence issues anymore, and I think it's probably resolved |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
I'm in china mainland and speed to access pypi is very slow, so I have added tool.poetry.source to a local source:
However, this one works for my one project yesterday, it doesn't work for my another project, checked today.
When it works, I found poetry will check both pypi and this local source for index, but only download package from local source, this can enhance speed a lot. However, it seems not work today, it always check index and download package from pypi, the local source is totally ignored.
if poetry is downloading from local source(which is ali in the case), it'll show source's name before ':'. it's pypi here since it downloads from pypi.
I have recreated my virtual env and delete pypoetry's cache.
The text was updated successfully, but these errors were encountered: