astral-uv:zb/win-def

Last commit made on 2024-02-21
Get this branch:
git clone -b zb/win-def https://git.launchpad.net/astral-uv

Branch merges

Branch information

Name:
zb/win-def
Repository:
lp:astral-uv

Recent commits

985c215... by Zanie <email address hidden>

Empty commit

44459e5... by Zanie <email address hidden>

Disable Windows defender in CI

3a34918... by Charlie Marsh <email address hidden>

Add fixup for `prefect<1.0.0` (#1825)

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

71ec568... by Zanie Blue <email address hidden>

Use `git` command to fetch repositories instead of `libgit2` for robust SSH support (#1781)

Closes https://github.com/astral-sh/uv/issues/1775
Closes https://github.com/astral-sh/uv/issues/1452
Closes https://github.com/astral-sh/uv/issues/1514
Follows https://github.com/astral-sh/uv/pull/1717

libgit2 does not support host names with extra identifiers during SSH
lookup (e.g. [`github.com-some_identifier`](

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys#using-multiple-repositories-on-one-server))
so we use the `git` command instead for fetching. This is required for
`pip` parity.

See the [Cargo
documentation](https://doc.rust-lang.org/nightly/cargo/reference/config.html#netgit-fetch-with-cli)
for more details on using the `git` CLI instead of libgit2. We may want
to try to use libgit2 first in the future, as it is more performant
(#1786).

We now support authentication with:

```
git+ssh://git@<hostname>/...
git+ssh://git@<hostname>-<identifier>/...
```

Tested with a deploy key e.g.

```
cargo run -- \
    pip install uv-private-pypackage@git+ssh://<email address hidden>/astral-test/uv-private-pypackage.git \
    --reinstall --no-cache -v
```

and

```
cargo run -- \
    pip install uv-private-pypackage@git+ssh://<email address hidden>/astral-test/uv-private-pypackage.git \
    --reinstall --no-cache -v
```

with a ssh config like

```
Host github.com
        Hostname github.com
        IdentityFile=/Users/mz/.ssh/id_ed25519

Host github.com-test-uv-private-pypackage
        Hostname github.com
        IdentityFile=/Users/mz/.ssh/id_ed25519
```

It seems quite hard to add test coverage for this to the test suite, as
we'd need to add the SSH key and I don't know how to isolate that from
affecting other developer's machines.

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

Sort output when installing seed packages (#1822)

This output is technically non-deterministic right now.

39ee396... by Micha Reiser <email address hidden>

Upgrade to Rust 1.76 (#1820)

deef6c1... by Andrew Gallant <email address hidden>

platform-host: check /bin/sh, then /bin/dash and then /bin/ls (#1818)

Previously, we were only checking /bin/sh. While that works in most
cases, it seems like there are still scenarios where /bin/sh isn't an
executable itself, and is instead just a shell script that calls
/bin/dash. (See #1810 for example.)

In this PR, we make the `ld` detection a bit more robust by trying
multiple paths. As with previous changes, we emit copious logs to help
debug this in the future.

It's not totally clear how to test this. I'm not sure how to reproduce
the environment mentions in #1810 specifically since it seems like an
internal variant of WSL Ubuntu.

Fixes #1810

fac9d84... by Micha Reiser <email address hidden>

Normalize `VIRTUAL_ENV` path in activation scripts (#1817)

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

Use redirected URL as base for relative paths (#1816)

## Summary

If you review the setup in https://github.com/astral-sh/uv/issues/1747,
when we fetch `http://localhost:8000/simple/wheel/`, it gets redirected
to `http://localhost:8000/index/wheel/`. So any relative paths returned
need to be resolved relative to `http://localhost:8000/index/wheel/`.

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

## Test Plan

- Install `proxpi gunicorn pypiserver`
- `gunicorn proxpi.server:app --bind 0.0.0.0:8000`
- `pypi-server run -p 8080 ~/packages --fallback-url
"http://localhost:8000/index" --verbose`
- `echo "wheel" | cargo run pip compile - --index-url
http://localhost:8080/simple --verbose --no-cache`

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

Wait for distribution metadata with `--no-deps` (#1812)

## Summary

We still need to wait for the distribution metadata (for direct
dependencies), even when resolving with `--no-deps`, since we rely on it
to report diagnostics to the user.

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