astral-uv:zb/windows-ci

Last commit made on 2024-04-10
Get this branch:
git clone -b zb/windows-ci https://git.launchpad.net/astral-uv

Branch merges

Branch information

Name:
zb/windows-ci
Repository:
lp:astral-uv

Recent commits

a2caf22... by Zanie Blue <email address hidden>

Test flags?

# Conflicts:
# .github/workflows/ci.yml

3c159a1... by Zanie Blue <email address hidden>

DEBUG: Futz with Windows CI

520cd46... by Zanie Blue <email address hidden>

Add ecosystem test for flask (#2971)

Alternative to:

- https://github.com/astral-sh/uv/pull/2967
- #2946

Both of those are big and fail.

I'd like to generalize this coverage though.

44e39bd... by Zanie Blue <email address hidden>

Replace Python bootstrapping script with Rust implementation (#2842)

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

Note this also includes:
- #2918
- #2931 (pending)

A first step towards Python toolchain management in Rust.

First, we add a new crate to manage Python download metadata:

- Adds a new `uv-toolchain` crate
- Adds Rust structs for Python version download metadata
- Duplicates the script which downloads Python version metadata
- Adds a script to generate Rust code from the JSON metadata
- Adds a utility to download and extract the Python version

I explored some alternatives like a build script using things like
`serde` and `uneval` to automatically construct the code from our
structs but deemed it to heavy. Unlike Rye, I don't generate the Rust
directly from the web requests and have an intermediate JSON layer to
speed up iteration on the Rust types.

Next, we add add a `uv-dev` command `fetch-python` to download Python
versions per the bootstrapping script.

- Downloads a requested version or reads from `.python-versions`
- Extracts to `UV_BOOTSTRAP_DIR`
- Links executables for path extension

This command is not really intended to be user facing, but it's a good
PoC for the `uv-toolchain` API. Hash checking (via the sha256) isn't
implemented yet, we can do that in a follow-up.

Finally, we remove the `scripts/bootstrap` directory, update CI to use
the new command, and update the CONTRIBUTING docs.

<img width="1023" alt="Screenshot 2024-04-08 at 17 12 15"
src="https://github.com/astral-sh/uv/assets/2586601/57bd3cf1-7477-4bb8-a8e9-802a00d772cb">

7cd98d2... by Chan Kang <email address hidden>

Implement `--emit-index-annotation` to annotate source index for each package (#2926)

## Summary
resolves https://github.com/astral-sh/uv/issues/2852

## Test Plan
add a couple of tests:
- one covering the simplest case with all packages pulled from a single
index.
- another where packages are pull from two distinct indices.

tested manually as well:
```
$ (echo 'pandas'; echo 'torch') | UV_EXTRA_INDEX_URL='https://download.pytorch.org/whl/cpu' cargo run pip compile - --include-indices
    Finished dev [unoptimized + debuginfo] target(s) in 0.60s
     Running `target/debug/uv pip compile - --include-indices`
Resolved 15 packages in 686ms
# This file was autogenerated by uv via the following command:
# uv pip compile - --include-indices
filelock==3.9.0
    # via torch
    # from https://download.pytorch.org/whl/cpu
fsspec==2023.4.0
    # via torch
    # from https://download.pytorch.org/whl/cpu
jinja2==3.1.2
    # via torch
    # from https://download.pytorch.org/whl/cpu
markupsafe==2.1.3
    # via jinja2
    # from https://download.pytorch.org/whl/cpu
mpmath==1.3.0
    # via sympy
    # from https://download.pytorch.org/whl/cpu
networkx==3.2.1
    # via torch
    # from https://download.pytorch.org/whl/cpu
numpy==1.26.3
    # via pandas
    # from https://download.pytorch.org/whl/cpu
pandas==2.2.1
    # from https://pypi.org/simple
python-dateutil==2.9.0.post0
    # via pandas
    # from https://pypi.org/simple
pytz==2024.1
    # via pandas
    # from https://pypi.org/simple
six==1.16.0
    # via python-dateutil
    # from https://pypi.org/simple
sympy==1.12
    # via torch
    # from https://download.pytorch.org/whl/cpu
torch==2.2.2
    # from https://download.pytorch.org/whl/cpu
typing-extensions==4.8.0
    # via torch
    # from https://download.pytorch.org/whl/cpu
tzdata==2024.1
    # via pandas
    # from https://pypi.org/simple
```

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

Upgrade `reqwest` to v0.12.3 (#2817)

## Summary

Closes #2814.

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

Update hashes without `--upgrade` if not present (#2966)

## Summary

If the user runs with `--generate-hashes`, and the lockfile doesn't
contain _any_ hashes for a package (despite being pinned), we should add
new hashes. This mirrors running `uv pip compile --generate-hashes` for
the first time with an existing lockfile.

Closes #2962.

bbe46c0... by Zanie Blue <email address hidden>

Upgrade packse (#2963)

Should improve test performance with
https://github.com/astral-sh/packse/pull/169 thanks @konstin !

38ab39c... by Charlie Marsh <email address hidden>

Strip query string when parsing filename from HTML index (#2961)

## Summary

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

c345a79... by Zanie Blue <email address hidden>

Add `python-patch` feature to isolate tests that require Python patch versions to match our suite (#2940)

Closes https://github.com/astral-sh/uv/issues/2165
Follows https://github.com/astral-sh/uv/pull/2930