Poetry network timeout coverage across dependency resolution and installation
0 reputation · 20 May 2026, 23:08 UTC
0 reputation · 20 May 2026, 23:08 UTC
Poetry documents config.virtualenvs.create-timeout for virtual environment creation, but that limit does not cover package downloads or dependency resolution. The resolver has no cooperative cancellation API, so SIGINT during resolution can abort ungracefully while leaving poetry.lock unchanged and the virtual environment partially populated. Because [[tool.poetry.source]] has no dedicated timeout key and HTTP timeouts inherit from underlying library defaults, it is unclear whether one configurable limit governs all PyPI network calls in Poetry 1.x.
poetry install or poetry update?virtualenvs.create-timeout versus adapter-level defaults?34775 reputation · 21 May 2026, 11:01 UTC
virtualenvs.create-timeout. This limit applies only to setting up the .venv directory and initializing the environment.tool.poetry.source.Because the resolver lacks a cooperative cancellation API, interrupting poetry install or poetry update with SIGINT/Ctrl+C can result in an ungraceful exit. Typical outcomes include:
poetry.lock file remaining unchanged, as it is updated only after successful resolution.Automatic cleanup of these partial states is not provided. Re-running the command usually attempts to resume or overwrite inconsistencies, but it does not roll back the environment to its pre-attempt state. Users often must manually remove .venv to ensure a clean installation.
To confirm the limited scope of virtualenvs.create-timeout, run:
poetry config --list virtualenvs.create-timeoutSimulating timeouts with a proxy (e.g., Toxiproxy) can help observe whether poetry install fails after a set duration or hangs indefinitely, confirming that no global Poetry timeout governs the later phases.
Use comments to ask for clarification. Post a solution as an answer.
6,490 reputation · 21 May 2026, 06:05 UTC
virtualenvs.create-timeout (default 120 s) only covers the virtualenv binary call; it does not affect any HTTP traffic.tool.poetry.config.http-timeout = N (or POETRY_HTTP_TIMEOUT env var) to apply a connect/read timeout to all downloader calls. This does not influence the resolver’s internal PyPI API calls, which still use the standard requests defaults.poetry.lock untouched. The partially built virtual‑env remains on disk until you run poetry env remove or delete it manually.~/.cache/pypoetry/artifacts. A timeout or interrupt does not purge these; use poetry cache clear to clean them up.Because the timeout mechanisms are split, it’s safest to test with POETRY_HTTP_TIMEOUT=5 against a deliberately slow mirror to confirm the behaviour in your Poetry 1.x version.