astral-sh/uv
View on GitHubMove environment variable parsing to `EnvironmentOptions`
Open
#14,720 opened on Jul 18, 2025
good first issuehelp wantedinternal
Repository metrics
- Stars
- (84,934 stars)
- PR merge metrics
- (Avg merge 6d 16h) (222 merged PRs in 30d)
Description
In https://github.com/astral-sh/uv/pull/14662 I added a new EnvironmentOptions abstraction which allows us to express semantics that Clap cannot and perform up-front parsing of non-CLI environment variables, e.g., https://github.com/astral-sh/uv/pull/14544 and https://github.com/astral-sh/uv/pull/14369.
We should move other extraneous environment variables to be parsed there and provided through our usual settings structs.
These changes should be relatively easy. We should probably do it one variable at a time.
-
UV_HTTP_RETRIES -
UV_COMPILE_BYTECODE_TIMEOUT -
UV_HTTP_TIMEOUT -
UV_REQUEST_TIMEOUT -
HTTP_TIMEOUT -
UV_RUN_RECURSION_DEPTH -
UV_RUN_MAX_RECURSION_DEPTH -
UV_CONCURRENT_DOWNLOADS -
UV_CONCURRENT_BUILDS -
UV_CONCURRENT_INSTALLS -
UV_PYTHON_INSTALL_MIRROR -
UV_PYPY_INSTALL_MIRROR -
UV_PYTHON_DOWNLOADS_JSON_URL -
UV_NO_GITHUB_FAST_PATH -
UV_GITHUB_FAST_PATH_URL -
UV_GIT_LFS -
UV_CUDA_DRIVER_VERSION -
UV_AMD_GPU_ARCHITECTURE -
UV_STACK_SIZE -
UV_LOG_CONTEXT -
TRACING_DURATIONS_FILE -
UV_LOCK_TIMEOUT(https://github.com/astral-sh/uv/pull/16342#discussion_r2448547512)