Commit graph

5779 commits

Author SHA1 Message Date
konsti
ddbc6e3150
Catch broken mac_ver() (#11396)
A user reported a homebrew Python that would raise an exception in the
interpreter probing script because `platform.mac_ver()` returned `('',
('', '', ''), '')` on his installation due to
https://github.com/Homebrew/homebrew-core/issues/206778

This is easy enough to catch and show a proper error message instead of
the Python backtrace.
2025-02-10 22:49:16 +01:00
Charlie Marsh
ca49495e4b
Bump version to v0.5.30 (#11405) 2025-02-10 21:42:31 +00:00
Alex Lowe
ac06e1318a
Add NO_BINARY and NO_BINARY_PACKAGE environment variables (#11399)
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

This adds `NO_BINARY` and `NO_BINARY_PACKAGE` environment variables to
the uv CLI, allowing the user to specify packages to build from source
using environment variables. Its not a complete fix for #4291 as it does
not handle the `pip` subcommand.

## Test Plan

This was tested by running `uv sync` with various `UV_NO_BINARY` and
`UV_NO_BINARY_PACKAGE` environment variables set and checking that the
correct set of packages were compiled rather than taken from pre-built
wheels.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-02-10 21:11:46 +00:00
konsti
768da2091b
Fix windows installation instructions mismatch (#11380)
See #7106

Fixes #11378
2025-02-10 21:42:50 +01:00
Zanie Blue
4badcef3d8
Disable pip cache in Windows system test job (#11403)
I have no idea why we'd want the cache enabled here anyway?

Closes https://github.com/astral-sh/uv/issues/11397
2025-02-10 20:36:00 +00:00
Charlie Marsh
8c8bed9454
Avoid re-cloning name when populating ambiguous set (#11401) 2025-02-10 20:26:57 +00:00
Charlie Marsh
f1221a6676
Allow dynamic packages to be overloaded (#11400)
## Summary

Now that `version` is an optional field, we shouldn't error if an
unambiguous package is lacking a version. We can still enforce the same
guarantees via `source`, since we always set version and source
together, if the package is unambiguous. I also retained the same error
for non-local packages that lack a version like this.

Closes https://github.com/astral-sh/uv/issues/11384.
2025-02-10 20:21:02 +00:00
Andrew Gallant
2352e745a6 uv-resolver: fix conflict marker simplification bug
Some checks are pending
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | alpine (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
The underlying cause here, I believe, was that we weren't accounting
for the case where an edge could be visited *without* any extras
enabled. Because of that, we got into situations where we thought
there was only one path to an edge when there were actually more
paths. This in turn lead to us erroneously doing simplification where
it actually isn't justified. And in turn lead to duplicate versions
of the same package being installed in the same environment.

The fix for this ends up being really simple: in the case where we
don't add any conflict items for a package during graph traversal,
we materialize an empty set of conflicts to mark the case of no
extras being enabled when visiting the child edges. This is enough
to propagate the knowledge of multiple paths to the same edge and
causes us to avoid doing improper simplifications.

This does fix the problem in the snapshot, but it does also I think
lead to other cases where simplifications are no longer possible
(hence the changes to the airflow snapshot). But this seems
expected, since we are doing strictly less simplification than we
were before. It's unclear if all of those cases were actual bugs
or not though.
2025-02-10 09:17:31 -05:00
Andrew Gallant
a65f2df393 uv/tests: add regression test for multiple torch packages
The snapshot is too big to meaningfully read, but the problem is
in the dependencies of `torchmetrics`:

[[package]]
name = "torchmetrics"
version = "1.6.1"
source = { registry = "https://pypi.org/simple" }
dependencies = [
    { name = "lightning-utilities" },
    { name = "numpy" },
    { name = "packaging" },
    { name = "torch", version = "2.2.1", source = { registry = "https://pypi.org/simple" } },
    { name = "torch", version = "2.5.1", source = { registry = "https://pypi.org/simple" }, marker = "extra == 'extra-4-test-chgnet' or extra != 'extra-4-test-m3gnet'" },
]

The conflict markers here are overlapping, which means
both can be included in the same environment.
2025-02-10 09:17:31 -05:00
renovate[bot]
cbb94e40b3
Update Rust crate mailparse to 0.16.0 (#11375)
Some checks are pending
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | alpine (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
2025-02-10 02:40:08 +00:00
renovate[bot]
9f7b344b88
Update Rust crate rustc-hash to v2.1.1 (#11369)
Some checks are pending
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | alpine (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
2025-02-10 02:21:03 +00:00
renovate[bot]
eb19d471f4
Update Rust crate data-encoding to v2.8.0 (#11374) 2025-02-10 02:16:51 +00:00
renovate[bot]
ffa1e63bb8
Update pre-commit hook astral-sh/ruff-pre-commit to v0.9.5 (#11373) 2025-02-10 01:51:27 +00:00
renovate[bot]
534b1a3bc9
Update Rust crate which to v7.0.2 (#11372) 2025-02-10 01:46:29 +00:00
renovate[bot]
f7649bcfcb
Update Rust crate toml to v0.8.20 (#11371) 2025-02-10 01:43:14 +00:00
renovate[bot]
d4b357d40b
Update Rust crate target-lexicon to v0.13.2 (#11370) 2025-02-10 01:40:28 +00:00
renovate[bot]
dbdeaf28ee
Update Rust crate clap to v4.5.28 (#11368) 2025-02-09 20:33:16 -05:00
renovate[bot]
9db3034b5d
Update Rust crate bytecheck to v0.8.1 (#11367) 2025-02-09 20:33:08 -05:00
renovate[bot]
3d8b01a10e
Update Rust crate boxcar to v0.2.9 (#11366) 2025-02-09 20:33:01 -05:00
Charlie Marsh
df7b7081fd
Avoid empty trailing colon for empty requirements (#11362) 2025-02-09 14:32:14 -05:00
Charlie Marsh
1b2125712e
Upgrade astral-tokio-tar to v0.5.1 (#11359)
## Summary

Pulling in https://github.com/astral-sh/tokio-tar/pull/40.

Closes https://github.com/astral-sh/uv/issues/2235.
2025-02-09 14:14:47 -05:00
Charlie Marsh
d22a2dfd12
Allow sync and update environment methods to take modifications (#11346)
Some checks are pending
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | alpine (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
## Summary

I have a use-case for an inexact sync here, so putting this up
separately.
2025-02-09 02:30:50 +00:00
Zanie Blue
6dfac4559b
Fix credential caching for index roots when URL ends in simple/ (#11336)
Some checks are pending
CI / check cache | ubuntu (push) Blocked by required conditions
CI / check cache | macos aarch64 (push) Blocked by required conditions
CI / check system | python on debian (push) Blocked by required conditions
CI / check system | python on fedora (push) Blocked by required conditions
CI / check system | python on ubuntu (push) Blocked by required conditions
CI / check system | python on opensuse (push) Blocked by required conditions
CI / check system | python on rocky linux 8 (push) Blocked by required conditions
CI / check system | python on rocky linux 9 (push) Blocked by required conditions
CI / check system | pypy on ubuntu (push) Blocked by required conditions
CI / check system | pyston (push) Blocked by required conditions
CI / check system | alpine (push) Blocked by required conditions
CI / check system | python on macos aarch64 (push) Blocked by required conditions
CI / check system | homebrew python on macos aarch64 (push) Blocked by required conditions
CI / check system | python on macos x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86-64 (push) Blocked by required conditions
CI / check system | python3.10 on windows x86 (push) Blocked by required conditions
CI / check system | python3.13 on windows x86-64 (push) Blocked by required conditions
CI / check system | windows registry (push) Blocked by required conditions
CI / check system | python3.12 via chocolatey (push) Blocked by required conditions
CI / check system | python3.9 via pyenv (push) Blocked by required conditions
CI / check system | python3.13 (push) Blocked by required conditions
CI / check system | conda3.11 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.8 on macos aarch64 (push) Blocked by required conditions
CI / check system | conda3.11 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on linux x86-64 (push) Blocked by required conditions
CI / check system | conda3.11 on windows x86-64 (push) Blocked by required conditions
CI / check system | conda3.8 on windows x86-64 (push) Blocked by required conditions
CI / check system | amazonlinux (push) Blocked by required conditions
CI / check system | embedded python3.10 on windows x86-64 (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
Closes https://github.com/astral-sh/uv/issues/11244

See test failure at
e12f98a3e4
2025-02-08 09:23:31 -06:00
Tai
07d3e5085a
Fix broken anchors in readme and docs index (#11338)
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

I've just fixed some broken anchors after browing ux doc site.

## Test Plan

- `index.md`: based on `mkdocs serve` log
- `readme.md`: manual check

## Aside

Do you manually keep `readme.md` and `index.md` partially sync? I've
tried
checking pre-commit and other scripts but found no way to port my edits
from one
to the other.

<!-- How was it tested? -->

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-02-08 15:21:08 +00:00
Charlie Marsh
5d8168875a
Ignore 'egg' fragment in HTML Simple API response (#11340)
## Summary

Closes https://github.com/astral-sh/uv/issues/11339.
2025-02-08 09:00:51 -05:00
Zanie Blue
e22ecee36b
Respect no-build label in Docker image builds (#11333)
e.g., https://github.com/astral-sh/uv/pull/11329 is runner Docker image
builds but should not
2025-02-08 02:17:59 +00:00
Charlie Marsh
12e7abe093
Support extras in @ requests for tools (#11335)
## Summary

Closes https://github.com/astral-sh/uv/issues/11321.
2025-02-08 02:07:15 +00:00
Geoffrey Thomas
25e7209a33
Patch pkg-config files to be relocatable (#11291)
Previously, we patched pkg-config .pc files to have the absolute path to
the directory where we unpack a python-build-standalone release. As
discussed in #11028, we can use ${pcfiledir} in a .pc file to indicate
paths relative to the location of the file itself.

This change was implemented in astral-sh/python-build-standalone#507, so
for newer python-build-standalone releases, we don't need to do any
patching. Optimize this case by only modifying the .pc file if an actual
change is needed (which might be helpful down the line with hard links
or something). For older releases, change uv's patch to match what
python-build-standalone now does.
2025-02-07 17:03:55 -06:00
konsti
96ac4b72b1
Add docs for uv tool install --editable (#11280)
I also moved it down a bit below the more important options

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2025-02-07 22:56:54 +00:00
Charlie Marsh
9e98b0e0f7
Use refined specifiers when logging narrowed Python range (#11334)
## Summary

The narrowed ranges are now logged correctly:

```
DEBUG Narrowed `requires-python` bound to: >=3.10.0, <3.12
DEBUG Narrowed `requires-python` bound to: >=3.12
```

Closes https://github.com/astral-sh/uv/issues/11322.
2025-02-07 17:43:32 -05:00
Zanie Blue
03616ebb68
Add note about available versions (#11331)
ref https://github.com/astral-sh/uv/issues/11243#issuecomment-2644104492
2025-02-07 16:10:05 -06:00
konsti
6e5479f5db
Optimize flattening in apache airflow workspace (#11313)
## Motivation

No-op `uv lock` in apache airflow
(891c67f210ab7c877d1f00ea6ea3d3cdbb0e96ef) is slow, which makes `uv run`
slow, too.

Reference project:

```
$ hyperfine "uv run python -c \"print('hi')\""
Benchmark 1: uv run python -c "print('hi')"
Time (mean ± σ):      16.3 ms ±   1.5 ms    [User: 9.8 ms, System: 6.4 ms]
Range (min … max):    13.0 ms …  20.0 ms    186 runs
```

Apache airflow before:

```
$ hyperfine "uv run python -c \"print('hi')\""
Benchmark 1: uv run python -c "print('hi')"
Time (mean ± σ):     161.0 ms ±   5.2 ms    [User: 135.3 ms, System: 24.1 ms]
Range (min … max):   155.0 ms … 176.3 ms    18 runs
```

## Optimization

`FlatRequiresDist::from_requirements` is taking 50% of main thread
runtime.

Before:


![image](https://github.com/user-attachments/assets/10ea76eb-d1e9-477c-b400-39e653eb8f3a)

After both commits:


![image](https://github.com/user-attachments/assets/5c578ff6-f80b-46bb-9b5f-8be8435c3d85)

Apache airflow after the first commit:

```
$ hyperfine "uv-profiling run python -c \"print('hi')\""
Benchmark 1: uv-profiling run python -c "print('hi')"
  Time (mean ± σ):     122.3 ms ±   5.4 ms    [User: 96.1 ms, System: 24.7 ms]
  Range (min … max):   114.0 ms … 133.2 ms    23 runs
```

Apache airflow after the second commit:

```
$ hyperfine "uv-profiling run python -c \"print('hi')\""
Benchmark 1: uv-profiling run python -c "print('hi')"
  Time (mean ± σ):     108.5 ms ±   3.4 ms    [User: 83.2 ms, System: 24.2 ms]
  Range (min … max):   103.6 ms … 119.9 ms    28 runs
```
2025-02-07 17:08:40 -05:00
Charlie Marsh
711766e79c
Set 777 permissions on locked files (#11328)
## Summary

These are used for coordination across processes. If you run uv under,
e.g., the root user, then under a different user, I don't think we
should prevent you from acquiring the lock.

Closes https://github.com/astral-sh/uv/issues/11324.
2025-02-07 21:36:09 +00:00
Charlie Marsh
f0d9ed8e09
Add tests for uv add with and without trailing slash (#11332) 2025-02-07 16:33:05 -05:00
Charlie Marsh
cf366a557b
Correct environment variable expansion in rustdoc (#11327)
## Summary

These comments are incorrect.
2025-02-07 19:51:40 +00:00
Aria Desires
161eb42cb9
don't use the Cool popup-generating eprintln in trampoline for warnings (#11295)
Also I refactored the code a bit to centralize all the calls of
eprintln.

Fixes #10706

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-02-07 13:33:12 -05:00
konsti
84b9ae2b92
Typo in release_specifiers_to_ranges docs (#11320) 2025-02-07 16:49:56 +00:00
Geoffrey Thomas
21369326ca
uv-python tests: Use #!/bin/sh instead of #!/bin/bash (#11292)
NixOS has (and POSIX mandates) a /bin/sh but not a /bin/bash, so this
fixes tests on NixOS.
2025-02-07 09:42:33 -06:00
github-actions[bot]
69f1904aeb
Sync latest Python releases (#11318)
Includes https://pypy.org/posts/2025/02/pypy-v7318-release.html

These are labeled as betas in the post but not anywhere obvious to me?
I'm not sure we need to portray this to users.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-02-07 09:42:20 -06:00
Aria Desires
5c4b6d436c
cleanup some dependency-group docs (#11284)
Some additional details, more mentioning of related flags, and some
minor rewordings to avoid misconceptions I had from the current docs.

Closes #11205
2025-02-07 15:40:59 +00:00
konsti
092e78d9d2
Un-nest satisfies_requires_dist (#11311)
Move the function to the top level, it doesn't need to be nested.
2025-02-07 10:54:40 +00:00
konsti
3e7ec1df05
Fix walkdir error message (#11310)
Fixes #11309
2025-02-07 10:24:05 +00:00
Charlie Marsh
46a03b5518
Use a DryRun enum everywhere (#11303)
## Summary

Rather than Yet Another Bool.
2025-02-07 00:42:49 +00:00
Charlie Marsh
51c05df9c9
Use an iterator for logging upgrade events (#11301)
## Summary

No behavior changes... This just separates the formatting from the
collection of the results, and also fixes a bug whereby we didn't say
"No changes detected" in some cases.
2025-02-07 00:13:58 +00:00
Charlie Marsh
8335a6d816
Add uv sync --dry-run (#11299)
## Summary

Allows users to understand how the environment will change prior to
committing.

Closes https://github.com/astral-sh/uv/issues/11282.
2025-02-06 23:52:49 +00:00
Zanie Blue
67e2f904ed
Add Discord to PyPI project URLs (#11286)
Referencing
https://daniel.feldroy.com/posts/2023-08-pypi-project-urls-cheatsheet


70eac9796f/warehouse/templates/packaging/detail.html (L38-L39)
2025-02-06 16:47:23 -06:00
konsti
5493deff65
Fix marker merging for requirements.txt for psycopg (#11298)
Given an input in the shape:

```
foo[bar]==1.0.0; sys_platform == 'linux'
foo==1.0.0; sys_platform != 'linux'
```

We would write either

```
foo==1.0.0; sys_platform == 'linux'
```
or
```
foo==1.0.0
```

depending on the iteration order, as the first one is from the marker
proxy package and the second one from the package without marker.

The fix correctly merges graph entries when there are two nodes with
different extras and different markers.

I tried to write a packse test but it failed due to a different
iteration order showing the correct case directly instead of the failing
one we'd need.

Only `strip_extras` is affected, since `combine_extras` uses
`version_marker`.
2025-02-06 22:31:53 +01:00
konsti
cfd1e670dd
Acquire reporter lock once (#11278)
See https://github.com/astral-sh/uv/pull/11165#discussion_r1943853482
2025-02-06 09:49:44 +00:00
samsja
5ce48cf799
add pip install setuptools in flash-attn docs (#11271)
Some checks failed
CI / integration test | uv publish (push) Has been cancelled
CI / check cache | ubuntu (push) Has been cancelled
CI / check cache | macos aarch64 (push) Has been cancelled
CI / check system | python on debian (push) Has been cancelled
CI / check system | python on fedora (push) Has been cancelled
CI / check system | python on ubuntu (push) Has been cancelled
CI / check system | python on opensuse (push) Has been cancelled
CI / check system | python on rocky linux 8 (push) Has been cancelled
CI / check system | python on rocky linux 9 (push) Has been cancelled
CI / check system | pypy on ubuntu (push) Has been cancelled
CI / check system | pyston (push) Has been cancelled
CI / check system | alpine (push) Has been cancelled
CI / check system | python on macos aarch64 (push) Has been cancelled
CI / check system | homebrew python on macos aarch64 (push) Has been cancelled
CI / check system | python on macos x86-64 (push) Has been cancelled
CI / check system | python3.10 on windows x86-64 (push) Has been cancelled
CI / check system | python3.10 on windows x86 (push) Has been cancelled
CI / check system | python3.13 on windows x86-64 (push) Has been cancelled
CI / check system | windows registry (push) Has been cancelled
CI / check system | python3.12 via chocolatey (push) Has been cancelled
CI / check system | python3.9 via pyenv (push) Has been cancelled
CI / check system | python3.13 (push) Has been cancelled
CI / check system | conda3.11 on macos aarch64 (push) Has been cancelled
CI / check system | conda3.11 on linux x86-64 (push) Has been cancelled
CI / check system | conda3.8 on linux x86-64 (push) Has been cancelled
CI / check system | conda3.11 on windows x86-64 (push) Has been cancelled
CI / check system | conda3.8 on windows x86-64 (push) Has been cancelled
CI / check system | amazonlinux (push) Has been cancelled
CI / check system | embedded python3.10 on windows x86-64 (push) Has been cancelled
CI / benchmarks (push) Has been cancelled
## Summary

I followed the docs to install flash-attn with uv and got the following
issue
```uv sync
Resolved 27 packages in 12ms
  × Failed to build `flash-attn==2.7.4.post1`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status: 1)

      [stderr]
      Traceback (most recent call last):
        File "<string>", line 8, in <module>
      ModuleNotFoundError: No module named 'setuptools'

      hint: This usually indicates a problem with the package or the build environment.
```

installing setuptools before running uv sync as done with torch helps
fix it.
## Test Plan

I tested locally before it failed to install, after it worked
2025-02-05 20:59:56 -05:00
Charlie Marsh
306fcfe718
Use consistent 'Registry' prefix for wheel and source distribution logs (#11270)
## Summary

We say "Registry requirement already cached" for source distributions,
but for wheels, it's just "Requirement already cached".
2025-02-06 01:35:11 +00:00