astral-uv:charlie/ssl

Last commit made on 2024-03-11
Get this branch:
git clone -b charlie/ssl https://git.launchpad.net/astral-uv

Branch merges

Branch information

Name:
charlie/ssl
Repository:
lp:astral-uv

Recent commits

425bcb9... by Charlie Marsh <email address hidden>

Use rustls-tls with manual SSL_CERT_FILE implementation

b9b4109... by Charlie Marsh <email address hidden>

Initialize client lazily for remote requirements files (#2350)

## Summary

We now initialize an HTTP client in advance for remote requirements
files. It turns out this adds a significant overhead, even for
operations like auditing the environment (at least on macOS).

This PR makes initialization lazy. After a lot of evaluation, I took the
easiest route, which is: we just pass in `Connectivity`, and then use
the default HTTP client. So we won't respect netrc files and anything
else that we get from our registry client. If we want to keep using the
registry client, we _can_, it's just way more ceremony to pass down a
closure.

See: https://github.com/astral-sh/uv/issues/2346.

## Test Plan

- Verified that `cargo run pip compile
https://raw.githubusercontent.com/ansible/ansible/f1ded0f41759235eb15a7d13dbc3c95dce5d5acd/requirements.txt`
completed without error.
- Verified that `cargo run pip compile
https://raw.githubusercontent.com/ansible/ansible/f1ded0f41759235eb15a7d13dbc3c95dce5d5acd/requirements.txt
--offline` failed with an error.
- Verified that `./target/release/uv pip install requests` completed in
0-2ms, rather than hundreds.

d2d12c3... by Charlie Marsh <email address hidden>

Remove `wheel` from default PEP 517 backend (#2341)

## Summary

This matches the latest `pip` and `build` releases. See:
https://github.com/astral-sh/uv/issues/2313.

Closes https://github.com/astral-sh/uv/issues/2313.

9566ac9... by Charlie Marsh <email address hidden>

Write relative paths for scripts in data directory (#2348)

## Summary

In #2000, I shipped a regression whereby we stopped writing relative
paths for scripts within `data` directories. The net effect here is that
we aren't _uninstalling_ binaries in all cases. (This does _not_ apply
to entrypoints, only scripts in `data` directories.)

Closes https://github.com/astral-sh/uv/issues/2330.

## Test Plan

Most Python packages ship entrypoints, not binaries, so I don't know how
to test this cheaply. But I did test it locally by verifying that `uv`
is now removed from the `bin` directory after an uninstall.

ec83151... by Charlie Marsh <email address hidden>

Remove unnnecesary Windows stack size changes (#2345)

This is already set by `command`.

bb2d06c... by Charlie Marsh <email address hidden>

Bump version to v0.1.17 (#2344)

7825a53... by konstin

install_extra_index_url_has_priority without exclude newer (#2340)

Manual synthesis of #2337 and #2339, i think one accidentally reverted
the other?

No rush in merging, CI is green.

a267a50... by Charlie Marsh <email address hidden>

Add `Seek` fallback for zip files (#2320)

## Summary

Some zip files can't be streamed; in particular, `rs-async-zip` doesn't
support data descriptors right now (though it may in the future). This
PR adds a fallback path for such zips that downloads the entire zip file
to disk, then unzips it from disk (which gives us `Seek`).

Closes https://github.com/astral-sh/uv/issues/2216.

## Test Plan

`cargo run pip install --extra-index-url https://buf.build/gen/python
hashb_foxglove_protocolbuffers_python==25.3.0.1.20240226043130+465630478360
--force-reinstall -n`

67fb023... by Charlie Marsh <email address hidden>

Avoid duplicating authorization header with netrc (#2325)

## Summary

The netrc middleware we added in
https://github.com/astral-sh/uv/pull/2241 has a slight problem. If you
include credentials in your index URL, _and_ in the netrc file, the
crate blindly adds the netrc credentials as a header. And given the
`ReqwestBuilder` API, this means you end up with _two_ `Authorization`
headers, which always leads to an invalid request, though the exact
failure can take different forms.

This PR removes the middleware crate in favor of our own middleware.
Instead of using the `RequestInitialiser` API, we have to use the
`Middleware` API, so that we can remove the header on the request
itself.

Closes https://github.com/astral-sh/uv/issues/2323.

## Test Plan

- Verified that running against a private index with credentials in the
URL (but no netrc file) worked without error.
- Verified that running against a private index with credentials in the
netrc file (but not the URL) worked without error.
- Verified that running against a private index with a mix of
credentials in both _also_ worked without error.

7fc8087... by Charlie Marsh <email address hidden>

Use helpers in all editable tests (#2339)

## Summary

Improves consistency and helps with the kinds of failures seen in
https://github.com/astral-sh/uv/pull/2320.