Skip to content

Add --cert support to uv pip - #20367

Merged
charliermarsh merged 4 commits into
mainfrom
charlie/cert-cli-option
Jul 15, 2026
Merged

charliermarsh merged 4 commits into
mainfrom
charlie/cert-cli-option

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Add pip-compatible --cert <path> support to all uv pip commands. The option is scoped to the uv pip namespace, so other uv commands continue to reject it.

An explicit certificate bundle replaces uv's default, system, and SSL_CERT_FILE / SSL_CERT_DIR trust sources for that invocation, matching pip's behavior without modifying the environment inherited by child processes.

@charliermarsh charliermarsh added the compatibility Compatibility with a specification or another tool label Jul 14, 2026
@charliermarsh
charliermarsh marked this pull request as ready for review July 14, 2026 03:06
@charliermarsh
charliermarsh requested a review from zanieb July 14, 2026 03:06
@charliermarsh charliermarsh changed the title Add --cert support to uv pip Add --cert support to uv pip Jul 14, 2026
Comment thread crates/uv-client/src/base_client.rs
Comment thread crates/uv-client/src/base_client.rs Outdated
Comment thread crates/uv-client/src/tls.rs Outdated
@charliermarsh
charliermarsh force-pushed the charlie/cert-cli-option branch from 1b44ce2 to 4699263 Compare July 14, 2026 13:25
@charliermarsh
charliermarsh requested a review from zanieb July 14, 2026 13:28
Comment thread crates/uv/src/lib.rs Outdated
Comment thread crates/uv-client/src/tls.rs
@astral-sh-bot

astral-sh-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

uv test inventory changes

This PR changes the tests when compared with the latest main baseline.

  • Added tests: 5
  • Removed tests: 2
  • Changed suites: 4
uv-client::it: +2 / -0

Added:

  • uv-client::it::ssl_certs::test_cli_cert_overrides_environment
  • uv-client::it::ssl_certs::test_cli_cert_valid

Removed: none

uv::it: +1 / -0

Added:

  • uv::it::help::cert_is_limited_to_pip

Removed: none

uv::pip: +1 / -1

Added:

  • uv::pip::pip_sync::cert

Removed:

  • uv::pip::pip_sync::cert_unsupported
uv::pip_compile: +1 / -1

Added:

  • uv::pip_compile::pip_compile::cert

Removed:

  • uv::pip_compile::pip_compile::cert_unsupported

@charliermarsh

Copy link
Copy Markdown
Member Author

Thanks!

@charliermarsh
charliermarsh merged commit a2af4cb into main Jul 15, 2026
57 checks passed
@charliermarsh
charliermarsh deleted the charlie/cert-cli-option branch July 15, 2026 00:01
@charliermarsh

Copy link
Copy Markdown
Member Author

Ugh, forgot -- reverting, then will merge into the v0.12 branch.

charliermarsh added a commit that referenced this pull request Jul 15, 2026
Revert #20367. Supporting `--cert` changes certificate-trust behavior
for existing `uv pip` invocations, so it is breaking and should not land
in a non-breaking release.

Move the change to the 0.12 release line in #20418.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility Compatibility with a specification or another tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants