astral-uv:konsti/strip-stream-in-indicatif-layer

Last commit made on 2024-03-04
Get this branch:
git clone -b konsti/strip-stream-in-indicatif-layer https://git.launchpad.net/astral-uv

Branch merges

Branch information

Name:
konsti/strip-stream-in-indicatif-layer
Repository:
lp:astral-uv

Recent commits

81bba51... by konstin

.

836b90c... by Charlie Marsh <email address hidden>

Expand environment variables in `-r` and `-c` subfile paths (#2143)

## Summary

This PR expands environment variables in `-r` and `-c` paths _within_
requirements files. We already do this for `@` URL references and
others.

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

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

Add tests for empty index URL environment variable (#2141)

13a6fc8... by Taniguchi Yasufumi <email address hidden>

Make an empty string behave like the default (#2137)

## Summary

Resolve #2129

I changed the behavior to parse an empty string for `--index-url` to be
the same as the default.

6fa88f9... by Charlie Marsh <email address hidden>

Use space as delimiter for `UV_EXTRA_INDEX_URL` (#2140)

## Summary

I was looking at something unrelated and saw this in the Clap docs.

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

## Test Plan

```shell
❯ UV_EXTRA_INDEX_URL="https://google.com https://foo.com" cargo run pip compile -
    Finished dev [unoptimized + debuginfo] target(s) in 0.14s
     Running `target/debug/uv pip compile -`
index: None
extra_index_url: [Url(VerbatimUrl { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("google.com")), port: None, path: "/", query: None, fragment: None }, given: Some("https://google.com") }), Url(VerbatimUrl { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("foo.com")), port: None, path: "/", query: None, fragment: None }, given: Some("https://foo.com") })]
```

6a53798... by Charlie Marsh <email address hidden>

Add support for Python installed from Windows Store (#2122)

## Summary

After https://github.com/astral-sh/uv/pull/2121, the only remaining
issue is that calling `canonicalize` on these Pythons returns an error.

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

## Test Plan

Uninstalled all python.org Pythons on my Windows machine, then created a
virtualenv. The resulting config file:

```
Using Python 3.11.8 interpreter at: C:\Users\crmar\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe
Creating virtualenv at: .venv
Activate with: .venv\Scripts\activate
PS C:\Users\crmar\workspace\puffin> cat .\.venv\pyvenv.cfg
home = C:\Users\crmar\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0
implementation = CPython
version_info = 3.11.8
include-system-site-packages = false
uv = 0.1.13
prompt = puffin
```

Prior to this PR, it would fail with a canonicalization error.

Prior to #2121, it would leave a "bad" Python in the config file:

```
Using Python 3.11.8 interpreter at: C:\Users\crmar\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe
Creating virtualenv at: .venv
Activate with: .venv\Scripts\activate
PS C:\Users\crmar\workspace\puffin> cat .\.venv\pyvenv.cfg
home = C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2288.0_x64__qbz5n2kfra8p0
implementation = CPython
version_info = 3.11.8
include-system-site-packages = false
uv = 0.1.13
prompt = puffin
```

Which, once activated, would fail with:

```
(venv) PS C:\Users\crmar\workspace\puffin> python
No Python at '"C:\Users\crmar\AppData\Local\Programs\Python\Python312\python.exe'
```

46265b7... by Charlie Marsh <email address hidden>

Adjust base Python lookup logic for Windows (#2121)

## Summary

When I install via the Windows Store, `interpreter.base_prefix` contains
a bunch of resolved information that leads to a broken environment.

Instead, we now use `sys._base_executable` on Windows by default,
falling back to `sys.base_prefix` if it doesn't exist. (There are some
issues with `sys.base_executable` that lead to complexity in
`virtualenv`, but they only affect POSIX.) Admittedly, I don't know when
`sys._base_executable` wouldn't exist. It exists in all the environments
I've tested.

Additionally, we use the system interpreter directly if we're outside of
a virtualenv.

d4f1973... by Nyakku Shigure <email address hidden>

Allow empty extras in `pep508-rs` and add more corner case to tests (#2128)

## Summary

Fixes #2127, allow empty extras, and add more corner case to tests

## References

- [PEP 508 grammar](https://peps.python.org/pep-0508/#complete-grammar)

782a862... by Charlie Marsh <email address hidden>

Add caveats on `--system` support to the README (#2131)

## Summary

Covering some of the limitations from
https://github.com/astral-sh/uv/issues/2113.

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

Preserve environment variables in resolved Git dependencies (#2125)

## Summary

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