Commit 0ea82c5d by Bartosz Sokorski Committed by GitHub

Add experimental POETRY_REQUESTS_TIMEOUT option (#7081)

Co-authored-by: Bjorn Neergaard <bjorn@neersighted.com>
parent ede3eca4
......@@ -223,3 +223,10 @@ RUN poetry install --no-dev
The two key options we are using here are `--no-root` (skips installing the project source) and `--no-directory` (skips installing any local directory path dependencies, you can omit this if you don't have any).
[More information on the options available for `poetry install`]({{< relref "cli#install" >}}).
### My requests are timing out!
Poetry's default HTTP request timeout is 15 seconds, the same as `pip`.
Similar to `PIP_REQUESTS_TIMEOUT`, the **experimental** environment variable `POETRY_REQUESTS_TIMEOUT`
can be set to alter this value.
from __future__ import annotations
import os
# Timeout for HTTP requests using the requests library.
REQUESTS_TIMEOUT = 15
REQUESTS_TIMEOUT = int(os.getenv("POETRY_REQUESTS_TIMEOUT", 15))
RETRY_AFTER_HEADER = "retry-after"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment