Skip to content
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

Poetry requesting information from a secondary PyPi source, even when it is not necessary, forces the solution to take a lot more time to execute #7204

Closed
3 of 4 tasks
vmgustavo opened this issue Dec 15, 2022 · 2 comments
Labels
status/duplicate Duplicate issues

Comments

@vmgustavo
Copy link

  • Poetry version: 1.1.15
  • Python version: 3.10.6
  • OS version and name: XUbuntu / Ubuntu 22.04.1 LTS

Issue

If I execute poetry lock for a pyproject file, it executes in:

1: Version solving took 15.224 seconds.
1: Tried 1 solutions.

If I maintain the exact same pyproject file but now I add a secondary PyPi source using this:

[[tool.poetry.source]]
name = "<private-pypi-name>"
url = "<private-pypi-url>"
default = false
secondary = true

The solution for poetry lock takes:

1: Version solving took 177.351 seconds.
1: Tried 1 solutions.

Which is quite a large increase in time for the same file. From what I can see using -vvv the problem seems to be this:

<private-pypi-name>: Response URL https://pypi.org/simple/ipykernel/ differs from request URL <private-pypi-url>/ipykernel/

For some reason, even though the source is configured as a not default secondary source poetry is still trying to read from it for every single dependency and taking a long time to get to the end result.

Since in the pyproject it is possible to add dependencies specifying the source:

<private-package> = {version = "^x.y.z", source = "<private-pypi-name>"}

Poetry should only request anything from the secondary source if the source is specified in the dependency name.

@vmgustavo vmgustavo added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Dec 15, 2022
@neersighted
Copy link
Member

Not a bug, by design, see/duplicate-ish of #6713. Also 1.1.15 is no longer supported in the upstream project; please update to 1.3 as soon as you are able.

@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2022
@neersighted neersighted added status/duplicate Duplicate issues and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Dec 15, 2022
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

2 participants