astral-uv:zb/3.12.2

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

Branch merges

Branch information

Name:
zb/3.12.2
Repository:
lp:astral-uv

Recent commits

1116189... by Zanie <email address hidden>

Bump to Python 3.12.2

Contributors will need to update their bootstrapped versions

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

Change benchmarks to use 3.12.1 (#1322)

We can wait to merge this until later, but we explicitly bootstrap
3.12.1 and the benches should not pin 3.12.0

bc14ed1... by Aarni Koskela

Fix typos & add pre-commit configuration (#1487)

Co-authored-by: Zanie Blue <email address hidden>

e4389e5... by Dhruv Manilawala <email address hidden>

Consistent use of `BIN_NAME` in activation scripts (#1577)

This PR fixes the bug where the `BIN_NAME` replacement field wasn't
being used in the activator scripts.

fixes: #1518

## Test plan

As I don't have a Windows machine, I switched the `bin_name` value here
to point to `Scripts` on `unix` platform:

https://github.com/astral-sh/uv/blob/2a76c5908416b1e4c565349c86bc41a01515c8bf/crates/gourgeist/src/bare.rs#L99-L105

<details><summary>Code diff</summary>
<p>

```diff
```diff
diff --git a/crates/gourgeist/src/bare.rs b/crates/gourgeist/src/bare.rs
index 4c7808d3..0e0b41cf 100644
--- a/crates/gourgeist/src/bare.rs
+++ b/crates/gourgeist/src/bare.rs
@@ -97,9 +97,9 @@ pub fn create_bare_venv(location: &Utf8Path,
interpreter: &Interpreter) -> io::R
// TODO(konstin): I bet on windows we'll have to strip the prefix again
     let location = location.canonicalize_utf8()?;
     let bin_name = if cfg!(unix) {
- "bin"
- } else if cfg!(windows) {
         "Scripts"
+ } else if cfg!(windows) {
+ "bin"
     } else {
         unimplemented!("Only Windows and Unix are supported")
     };
```

</p>
</details>

I then created the virtual environment as usual and tested out that the path modifications were correct:

```console
$ cargo run --bin uv -- venv
    Finished dev [unoptimized + debuginfo] target(s) in 0.13s
     Running `target/debug/uv venv`
Using Python 3.12.1 interpreter at
/Users/dhruv/.pyenv/versions/3.12.1/bin/python3.12
Creating virtualenv at: .venv

$ source .venv/Scripts/activate

$ echo $PATH
/Users/dhruv/work/astral/uv/.venv/Scripts:[...]

$ which python
/Users/dhruv/work/astral/uv/.venv/Scripts/python
```

I'm not sure how else to test this without having access to a Windows machine

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

Add graceful fallback for Artifactory indexes (#1574)

## Summary

There are more details in https://github.com/astral-sh/uv/issues/1370,
but it looks like Artifactory servers have incorrect behavior when it
comes to HTTP range requests, in that they return `Accept-Ranges:
bytes`, but then incorrectly return 200 requests when you actually ask
for a given range.

This PR ensures that we fallback gracefully in this case. It's built on
https://github.com/prefix-dev/async_http_range_reader/pull/5. Assuming
that gets merged upstream, we can then remove the Git dependency.

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

## Test Plan

`cargo run pip install requests -i
https://killjoyuvbug.jfrog.io/artifactory/api/pypi/pypi/simple
--verbose`

12fea1d... by Charlie Marsh <email address hidden>

Always run `get_requires_for_build_wheel` (#1590)

## Summary

I want to revisit this as I think it's still skippable in some cases,
but for now, let's be more conservative.

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

## Test Plan

Cloned
`https://github.com/OCA/mis-builder/blob/3aea4235697bac0f74d446e610e2b934b0994e06/setup/mis_builder/setup.py#L4`,
and ran `cargo run pip install -e mis_builder`.

563c636... by Zanie Blue <email address hidden>

Improve tracing when encountering invalid `requires-python` values (#1568)

Unsure what the easiest way to test this is, it is hard to publish
invalid requires-python specifiers with hatchling

5d58d4f... by Shantanu <email address hidden>

Better error messages on expect failures in resolver (#1583)

I ran into some (tricky to reproduce) panics while using uv, would be
useful to have a better error message to track down the source of the
problem

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

Avoid using `white` coloring in terminal output (#1576)

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

340cb67... by Charlie Marsh <email address hidden>

Allow non-nested archives for `hexdump` and others (#1564)

## Summary#1562

It turns out that `hexdump` uses an invalid source distribution format
whereby the contents aren't nested in a top-level directory -- instead,
they're all just flattened at the top-level. In looking at pip's source
(https://github.com/pypa/pip/blob/51de88ca6459fdd5213f86a54b021a80884572f9/src/pip/_internal/utils/unpacking.py#L62),
it only strips the top-level directory if all entries have the same
directory prefix (i.e., if it's the only thing in the directory). This
PR accommodates these "invalid" distributions.

I can't find any history on this method in `pip`. It looks like it dates
back over 15 years ago, to before `pip` was even called `pip`.

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