Jo
bcc52ed108
Add `uv pip show --files` ( #8369 )
...
## Summary
Resolves #8357
2024-10-20 12:13:41 -04:00
Zanie Blue
05a56dab61
Copy the workspace examples into test contexts ( #8348 )
...
Cherry-picked from https://github.com/astral-sh/uv/pull/8347
Per [this
flake](https://github.com/astral-sh/uv/actions/runs/11411928073/job/31757053523?pr=8347 )
it doesn't solve the problem unfortunately. Still seems like best
practice.
2024-10-20 12:11:52 -04:00
Jo
e980c1b0f8
Only remove a source from `[tool.uv.sources]` if it is no long being referenced ( #8366 )
...
## Summary
Resolves #8361
2024-10-19 10:52:01 -05:00
Jo
ca55793a90
Remove `tool.uv.sources` table if it is empty ( #8365 )
...
## Summary
Resolves #8362
2024-10-19 15:20:45 +00:00
Zanie Blue
4355392c82
Add a `uv remove` test where a dependency is repeated ( #8360 )
2024-10-19 14:33:54 +00:00
Jo
ac451af1bd
Check existing source by normalized name before add and remove ( #8359 )
...
Resolves #8328
Resolves #8330
2024-10-19 08:26:01 -05:00
Zanie Blue
4b0a4dadb7
Fix bug where username from authentication cache could be ignored ( #8345 )
...
Basically, if username-only authentication came from the _cache_ instead
of being present on the _request URL_ to start, we'd end up ignoring it
during password lookups which breaks keyring.
Includes some cosmetic changes to the logging and commentary in the
middleware, because I was confused when reading the code and logs.
2024-10-18 18:45:31 -05:00
konsti
e26eed10e4
Better missing self update feature ( #8337 )
2024-10-18 17:38:34 +00:00
Charlie Marsh
d53d580221
Add support for `UV_FROZEN` and `UV_LOCKED` ( #8340 )
...
## Summary
Closes https://github.com/astral-sh/uv/issues/8321 .
2024-10-18 13:37:49 -04:00
Vini Brasil
69d5e084d5
Allow dashes and underscores in custom index names ( #8339 )
...
Previously, `uv add --index` command threw an error when the index name
included characters like hyphens or underscores.
Closes #8315
2024-10-18 13:24:16 -04:00
konsti
c162078050
Add cfg for other external resources tests ( #8320 )
...
Fixes #8295
2024-10-18 12:30:11 -04:00
Zanie Blue
42dac85bf7
Remove commands available in the top-level from the suggested subcommand error ( #8316 )
...
Part of https://github.com/astral-sh/uv/issues/8313
I think we'll need to open an issue upstream to add more context to the
error here, because there's not sufficient information about the parent
command to provide a good error message. As a first step, let's avoid
giving these suggestions for subcommands that overlap with our top-level
commands.. because that's just confusing.
Here's all the information we have here
```rust
[crates/uv/src/lib.rs:1530:13] &err = ErrorInner {
kind: InvalidSubcommand,
context: FlatMap {
keys: [
InvalidSubcommand,
Usage,
],
values: [
String(
"remove",
),
StyledStr(
StyledStr(
"\u{1b}[1m\u{1b}[32mUsage:\u{1b}[0m \u{1b}[1m\u{1b}[36muv python\u{1b}[0m \u{1b}[36m[OPTIONS]\u{1b}[0m \u{1b}[36m<COMMAND>\u{1b}[0m",
),
),
],
},
message: None,
source: None,
help_flag: Some(
"--help",
),
styles: Styles {
header: Style {
fg: Some(
Ansi(
Green,
),
),
bg: None,
underline: None,
effects: Effects(BOLD),
},
error: Style {
fg: Some(
Ansi(
Red,
),
),
bg: None,
underline: None,
effects: Effects(BOLD),
},
usage: Style {
fg: Some(
Ansi(
Green,
),
),
bg: None,
underline: None,
effects: Effects(BOLD),
},
literal: Style {
fg: Some(
Ansi(
Cyan,
),
),
bg: None,
underline: None,
effects: Effects(BOLD),
},
placeholder: Style {
fg: Some(
Ansi(
Cyan,
),
),
bg: None,
underline: None,
effects: Effects(),
},
valid: Style {
fg: Some(
Ansi(
Green,
),
),
bg: None,
underline: None,
effects: Effects(),
},
invalid: Style {
fg: Some(
Ansi(
Yellow,
),
),
bg: None,
underline: None,
effects: Effects(),
},
},
color_when: Auto,
color_help_when: Auto,
backtrace: None,
}
```
2024-10-18 10:57:07 -05:00
konsti
6b8f447387
Make `lock_multiple_sources` stable over time ( #8336 )
2024-10-18 15:51:51 +00:00
Charlie Marsh
a459052f44
Redact index sources in `uv.lock` ( #8333 )
...
## Summary
Closes https://github.com/astral-sh/uv/issues/8296 .
2024-10-18 11:20:15 -04:00
konsti
23c80c547c
Remove trailing newlines in error messages ( #8322 )
2024-10-18 17:17:41 +02:00
Zanie Blue
d296e7270a
Run release builds for `macos-x86_64` on `macos-14` runners ( #8327 )
2024-10-18 11:01:52 -04:00
konsti
e3e1403c4b
Update reqwest-middleware ( #8325 )
2024-10-18 11:51:02 +00:00
konsti
32bba9f33b
Don't prefetch unreachable packages ( #8246 )
2024-10-18 13:44:24 +02:00
Zanie Blue
cf7fcaa942
Fixup `HTTP_BASIC` reference in docstring ( #8314 )
2024-10-17 19:37:06 -05:00
Zanie Blue
b9cd549138
Bump version to 0.4.24 ( #8312 )
2024-10-17 18:50:13 -05:00
Zanie Blue
c8cbd62a30
Patch Python executable name for Windows free-threaded builds ( #8310 )
...
A temporary fix for https://github.com/astral-sh/uv/issues/8298 while we
wait for my slower upstream fix at
https://github.com/indygreg/python-build-standalone/pull/373
I think we'll want this machinery anyway to ensure that the various
executable names are available? Otherwise we need to special-case all
the `python` names in `uv run`?
We don't have unit test coverage of managed downloads, so I added an
[integration
test](https://github.com/astral-sh/uv/actions/runs/11394150653/job/31703956805?pr=8310 )
similar to what we have for Linux.
2024-10-17 18:27:55 -05:00
David Bern
3fd69b448e
Respect `UV_INDEX_` rather than `UV_HTTP_BASIC_` ( #8306 )
...
The docs reference `UV_INDEX_`, but the code actually uses
UV_HTTP_BASIC_ as the prefix for environment variable credentials.
See PR #7741
Code is at
https://github.com/astral-sh/uv/blob/main/crates/uv-static/src/env_vars.rs#L163
```rust
/// Generates the environment variable key for the HTTP Basic authentication username.
pub fn http_basic_username(name: &str) -> String {
format!("UV_HTTP_BASIC_{name}_USERNAME")
}
/// Generates the environment variable key for the HTTP Basic authentication password.
pub fn http_basic_password(name: &str) -> String {
format!("UV_HTTP_BASIC_{name}_PASSWORD")
}
```
---------
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2024-10-17 21:42:04 +00:00
Charlie Marsh
c62f8d769c
Redact index credentials from lockfile sources ( #8307 )
...
## Summary
Closes https://github.com/astral-sh/uv/issues/8296 .
2024-10-17 21:38:21 +00:00
Charlie Marsh
7beb5ebe26
Improve sources deserialization errors ( #8308 )
2024-10-17 21:33:04 +00:00
Charlie Marsh
31441ef9db
Correct pytorch-to-torch reference in docs ( #8291 )
2024-10-17 15:28:51 +00:00
Zanie Blue
16b77e7fd4
Add a FreeBSD build to CI ( #8269 )
...
Playing with this because it's interesting and I learned about this cool
firecracker action.
Related #3370
2024-10-17 15:24:21 +00:00
konsti
a7bb3a767c
Add URL context to publish test script ( #8289 )
...
For #8288
2024-10-17 14:31:23 +00:00
Zanie Blue
83f835b0d0
Bump version to 0.4.23 ( #8275 )
...
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2024-10-17 14:26:39 +00:00
konsti
4e282efd39
Add cloudsmith to publish testing ( #8261 )
2024-10-17 14:52:19 +02:00
InSync
d2e3026160
Fix error leading to out-of-bound panic in `uv-pep508` ( #8282 )
...
Resolves #8281 .
## Summary
[`Cursor.slice()`](d930367f8c/crates/uv-pep508/src/cursor.rs (L39) )
expects a start index and a length, but it is instead [given a start
index and an end
index](d930367f8c/crates/uv-pep508/src/lib.rs (L936) ).
## Test plan
A new "leading whitespace" test is added to `tests.rs`.
2024-10-17 08:22:58 -04:00
konsti
7eed0bcd23
Add more context on resolve client error ( #8285 )
...
I'm not clear where #8144 comes from, so I'm adding some more error
context to narrow it down.
2024-10-17 08:22:09 -04:00
konsti
e0a2bc92cd
Reuse packages in test publish script ( #8257 )
2024-10-17 11:44:19 +02:00
Charlie Marsh
d930367f8c
Fix test fixtures to reflect installer new error messages ( #8278 )
...
## Summary
I unintentionally pushed this change directly to main; this PR just
updates the fixtures to reflect the more nuanced messages.
2024-10-16 22:22:06 -04:00
Charlie Marsh
5201550685
Update Saleor ecosystem snapshot ( #8277 )
2024-10-16 22:20:15 -04:00
Charlie Marsh
66211cb028
Use more precise error messages for preparation failures
2024-10-16 22:08:45 -04:00
Tim Hatch
91585a90e7
Narrow what the pip3.<minor> logic drops from entry points. ( #8273 )
...
## Summary
The hack in pip itself only modifies entry points called
`pip<number>.<number>` and `easy_install-<number>.<number>`, uv
previously dropped too many items including any of the form
`foo.<number>`.
Found while trying to install `memray` which somewhat notably does not
provide an abi3 wheel, so the installed, suffixed script matches. At a
minimum, this makes the installed files match the `entry_points.txt`
more than it did previously, which makes `pickley` happy.
## Test Plan
New test provided for previously-untested code.
2024-10-16 21:33:13 -04:00
Charlie Marsh
cf7dbaa7a7
Update to `cargo-dist` v0.23.0 ( #8270 )
...
## Summary
Closes https://github.com/astral-sh/uv/issues/8242 .
2024-10-16 16:25:03 -04:00
Zanie Blue
b851ced09e
Fix selection of free-threaded interpreters during default Python discovery ( #8239 )
...
Closes https://github.com/astral-sh/uv/issues/8228
e.g., on this branch
```
❯ uv python install 3.13t 3.13
❯ cargo build
❯ cargo run -q --bin uvx -- --from build python -c "import sys; print(sys.base_prefix)"
/Users/zb/.local/share/uv/python/cpython-3.13.0-macos-aarch64-none
❯ cargo run -q --bin uvx -- -p 3.13 --from build python -c "import sys; print(sys.base_prefix)"
/Users/zb/.local/share/uv/python/cpython-3.13.0-macos-aarch64-none
❯ cargo run -q --bin uvx -- -p 3.13t --from build python -c "import sys; print(sys.base_prefix)"
/Users/zb/.local/share/uv/python/cpython-3.13.0+freethreaded-macos-aarch64-none
```
and on main
```
❯ cargo build
❯ cargo run -q --bin uvx -- --from build python -c "import sys; print(sys.base_prefix)"
Installed 3 packages in 12ms
/Users/zb/.local/share/uv/python/cpython-3.13.0+freethreaded-macos-aarch64-none
```
I want to add more test coverage around this, but I've noticed the
free-threaded discovery tests are a bit off as-is and it'll be a bigger
task. I think the recent bugs around discovery indicate we should invest
more into that test framework.
2024-10-16 14:44:32 -05:00
github-actions[bot]
94a2686385
Fix managed distributions of free-threaded Python on Windows ( #8268 )
...
See upstream fix at
https://github.com/indygreg/python-build-standalone/pull/368
Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2024-10-16 14:35:29 -05:00
Jo
76a9afbae5
Ignore try lock error if it is WouldBlock ( #8258 )
...
## Summary
Address a TODO comment, seems like we don't need `raw_os_err`?
2024-10-16 14:15:48 -05:00
Charlie Marsh
b87a755225
Add some additional notes to `--index-url` docs ( #8267 )
2024-10-16 14:57:53 -04:00
Zanie Blue
6ac5859b1a
Improve styling of `requires-python` warnings ( #8240 )
...
Extends #7959
While I was looking at that message, I noticed I didn't love the
readability of the existing message and opted to follow-up with a change
to them both.
2024-10-16 13:08:21 -05:00
Aditya Pratap Singh
d5b5b82409
Add upgrade note to README ( #7937 )
...
Closes #7858
Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-10-16 18:03:37 +00:00
Charlie Marsh
4ca158931a
Show hint in resolution failure on `Forbidden` (`403`) or `Unauthorized` (`401`) ( #8264 )
...
## Summary
Closes https://github.com/astral-sh/uv/issues/8167 .
2024-10-16 17:34:29 +00:00
Charlie Marsh
5e05a62004
Respect index priority when storing credentials ( #8256 )
...
## Summary
Closes https://github.com/astral-sh/uv/issues/8248 .
2024-10-16 15:52:26 +00:00
konsti
31bf8eb43b
Update PubGrub ( #8245 )
2024-10-16 15:39:23 +00:00
Charlie Marsh
7730861bc5
Allow users to incorporate Git tags into dynamic cache keys ( #8259 )
...
## Summary
You can now use `cache-keys = [{ git = { commit = true, tags = true }
}]` to include both the current commit and set of tags in the cache key.
Closes https://github.com/astral-sh/uv/issues/7866 .
Closes https://github.com/astral-sh/uv/issues/7997 .
2024-10-16 11:13:29 -04:00
Charlie Marsh
6a81d302bb
Update to hyper v1.5.0 ( #8254 )
...
Saw a Tweet about this, it has some nice improvements.
2024-10-16 13:52:15 +00:00
Aditya Pratap Singh
0bd6e46bcf
Avoid writing duplicate index URLs with `--emit-index-url` ( #8226 )
...
closes #8116
---------
Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2024-10-16 12:45:25 +00:00
Charlie Marsh
0c445eb11d
Fix flaky test in `build.rs` ( #8250 )
...
## Summary
Closes https://github.com/astral-sh/uv/issues/8241 .
2024-10-16 12:26:05 +00:00