uv: uv ignore proxy exceptions on Windows
Summary
On Windows, in a corporate device the proxy exceptions defined in the proxy settings are ignored by uv.
Steps to reproduce
- With proxy enabled on OS settings
Proxy config
ip: 10.0.10.250
port: 8080
exceptions: *.myorg.local
uv config file %APPDATA%\uv\uv.toml to use custom index url:
[[index]]
url = "https://artifactory.myorg.local/simple"
default = true
Run uv command
> uv add flask
⠇ test-python==0.1.0 error: Failed to fetch: `https://artifactory.myorg.local/simple/flask/`
Caused by: Request failed after 3 retries
Caused by: error sending request for url (https://artifactory.myorg.local/simple/flask/)
Caused by: client error (Connect)
Caused by: proxy authentication required
>
Same command with verbose
> $env:RUST_LOG="uv=trace"
> uv add flask
DEBUG uv 0.6.2 (6d3614eec 2025-02-19)
DEBUG Found project root: `X:\Temp\test_python`
DEBUG No workspace root found, using project root
TRACE Checking lock for `X:\Temp\test_python` at `C:\Users\johndoe\AppData\Local\Temp\uv-b254de633360c559.lock`
DEBUG Acquired lock for `X:\Temp\test_python`
DEBUG Reading Python requests from version file at `X:\Temp\test_python\.python-version`
DEBUG Using Python request `3.11` from version file at `.python-version`
DEBUG Checking for Python environment at `.venv`
TRACE Cached interpreter info for Python 3.11.4, skipping probing: .venv\Scripts\python.exe
DEBUG The virtual environment's Python version satisfies `3.11`
DEBUG Released lock at `C:\Users\johndoe\AppData\Local\Temp\uv-b254de633360c559.lock`
DEBUG Using request timeout of 30s
DEBUG Found static `pyproject.toml` for: test-python @ file:///X:/Temp/test_python
DEBUG No workspace root found, using project root
TRACE Performing lookahead for test-python @ file:///X:/Temp/test_python
DEBUG Solving with installed Python version: 3.11.4
DEBUG Solving with target Python version: >=3.11
TRACE Assigned packages:
TRACE Chose package for decision: root. remaining choices:
DEBUG Adding direct dependency: test-python*
TRACE Assigned packages: root==0a0.dev0
TRACE Chose package for decision: test-python. remaining choices:
DEBUG Searching for a compatible version of test-python @ file:///X:/Temp/test_python (*)
DEBUG Adding direct dependency: flask*
TRACE Fetching metadata for flask from https://artifactory.myorg.local/simple/flask/
TRACE Assigned packages: root==0a0.dev0, test-python==0.1.0
TRACE Chose package for decision: flask. remaining choices:
TRACE Checking lock for `C:\Users\johndoe\AppData\Local\uv\cache\simple-v15\index\e03af8d8960669e8\flask.lock` at `C:\Users\johndoe\AppData\Local\uv\cache\simple-v15\index\e03af8d8960669e8\flask.lock`
DEBUG Acquired lock for `C:\Users\johndoe\AppData\Local\uv\cache\simple-v15\index\e03af8d8960669e8\flask.lock`
TRACE No cache entry exists for C:\Users\johndoe\AppData\Local\uv\cache\simple-v15\index\e03af8d8960669e8\flask.rkyv
DEBUG No cache entry for: https://artifactory.myorg.local/simple/flask/
TRACE Sending fresh GET request for https://artifactory.myorg.local/simple/flask/
TRACE Handling request for https://artifactory.myorg.local/simple/flask/
TRACE Request for https://artifactory.myorg.local/simple/flask/ is unauthenticated, checking cache
TRACE No credentials in cache for URL https://artifactory.myorg.local/simple/flask/
TRACE Attempting unauthenticated request for https://artifactory.myorg.local/simple/flask/
DEBUG Transient request failure for https://artifactory.myorg.local/simple/flask/, retrying: error sending request for url (https://artifactory.myorg.local/simple/flask/)
Caused by: client error (Connect)
Caused by: proxy authentication required
TRACE Handling request for https://artifactory.myorg.local/simple/flask/
TRACE Request for https://artifactory.myorg.local/simple/flask/ is unauthenticated, checking cache
TRACE No credentials in cache for URL https://artifactory.myorg.local/simple/flask/
TRACE Attempting unauthenticated request for https://artifactory.myorg.local/simple/flask/
DEBUG Transient request failure for https://artifactory.myorg.local/simple/flask/, retrying: error sending request for url (https://artifactory.myorg.local/simple/flask/)
Caused by: client error (Connect)
Caused by: proxy authentication required
TRACE Handling request for https://artifactory.myorg.local/simple/flask/
TRACE Request for https://artifactory.myorg.local/simple/flask/ is unauthenticated, checking cache
TRACE No credentials in cache for URL https://artifactory.myorg.local/simple/flask/
TRACE Attempting unauthenticated request for https://artifactory.myorg.local/simple/flask/
DEBUG Transient request failure for https://artifactory.myorg.local/simple/flask/, retrying: error sending request for url (https://artifactory.myorg.local/simple/flask/)
Caused by: client error (Connect)
Caused by: proxy authentication required
TRACE Handling request for https://artifactory.myorg.local/simple/flask/
TRACE Request for https://artifactory.myorg.local/simple/flask/ is unauthenticated, checking cache
TRACE No credentials in cache for URL https://artifactory.myorg.local/simple/flask/
TRACE Attempting unauthenticated request for https://artifactory.myorg.local/simple/flask/
DEBUG Transient request failure for https://artifactory.myorg.local/simple/flask/, retrying: error sending request for url (https://artifactory.myorg.local/simple/flask/)
Caused by: client error (Connect)
Caused by: proxy authentication required
TRACE Considering retry of error: Error { kind: WrappedReqwestError(Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("artifactory.myorg.local")), port: None, path: "/simple/flask/", query: None, fragment: None }, WrappedReqwestError(Middleware(Request failed after 3 retries
Caused by:
0: error sending request for url (https://artifactory.myorg.local/simple/flask/)
1: client error (Connect)
2: proxy authentication required))) }
TRACE Cannot retry error: not an IO error
DEBUG Released lock at `C:\Users\johndoe\AppData\Local\uv\cache\simple-v15\index\e03af8d8960669e8\flask.lock`
DEBUG Reverting changes to `pyproject.toml`
DEBUG Removing `uv.lock`
error: Failed to fetch: `https://artifactory.myorg.local/simple/flask/`
Caused by: Request failed after 3 retries
Caused by: error sending request for url (https://artifactory.myorg.local/simple/flask/)
Caused by: client error (Connect)
Caused by: proxy authentication required
- With proxy disabled on OS settings
> uv add flask
Resolved 9 packages in 213ms
Prepared 8 packages in 342ms
░░░░░░░░░░░░░░░░░░░░ [0/8] Installing wheels... warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
If the cache and target directories are on different filesystems, hardlinking may not be supported.
If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 8 packages in 52ms
+ blinker==1.9.0
+ click==8.1.8
+ colorama==0.4.6
+ flask==3.1.0
+ itsdangerous==2.2.0
+ jinja2==3.1.5
+ markupsafe==3.0.2
+ werkzeug==3.1.3
Platform
Windows 10 & 11
Version
uv 0.6.2
Python version
python 3.11
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (7 by maintainers)
Thanks! I’ll follow-up there and see if we can get this fixed.
Yeah, we’ll probably release today or tomorrow.