## Summary
For pyx, we can allow uploads that bypass the registry and send the file
directly to S3. This is an opt-in feature, enabled via the `--direct`
flag.
<!--
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
<!-- What's the purpose of the change? What does it do, and why? -->
This allows users to set the HTTP, HTTPS, and no proxy variables via the
configuration files like ~pyproject.toml~ and uv.toml.
Users can set like so:
`uv.toml`
```toml
https-proxy = "http://my_cool_proxy:10500"
http-proxy = "http://my_cool_proxy:10500"
no-proxy = [
"dontproxyme.com",
"localhost",
]
```
Resolves https://github.com/astral-sh/uv/issues/9472
## Test Plan
<!-- How was it tested? -->
It also adds a new integration test for the proxy support in
`uv-client`.
This was tested on some of our developer machines with our proxy setup
using `~/.config/uv/uv.toml` with values like:
```toml
https-proxy = "http://my_cool_proxy:10500"
http-proxy = "http://my_cool_proxy:10500"
no-proxy = [
"dontproxyme.com",
"localhost",
]
```
---------
Signed-off-by: Eli Uriegas <eliuriegas@meta.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
## Summary
Fixes https://github.com/astral-sh/uv/issues/17232
When `uv build` fails (e.g., due to missing `__init__.py`), partial
distribution
files were being left in the `dist/` directory.
### Changes
- Use `NamedTempFile` to write build output to a temporary file first
- Only persist the file to the final location on successful build
- If build fails, the temporary file is automatically cleaned up
- Added `Error::Persist` variant for handling persistence failures
## Test Plan
Added `no_partial_files_on_build_failure` test that verifies:
1. `build_source_dist` fails when `__init__.py` is missing
2. `build_wheel` fails when `__init__.py` is missing
3. The `dist/` directory remains empty after both failures (no partial
files)
---------
Co-authored-by: Hayashi Reo <reo@wantedly.com>
Formats the generated JSON schema with prettier so it doesn't fail CI
lints immediately after update.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Previously, we had a retry count both on the top level error type, and
on an error variant, and had a conversion step in between. When
reviewing #17274, I noticed we can simplify that.
## Summary
Fixes#17266.
The retry count was getting dropped by
`ErrorKind::from_retry_middleware` and `<Error as
From<ErrorKind>>::from` so we were doing more retries than we should
have.
## Test Plan
Added a testcase for the specific error path in the issue. Added an
expect to the other retry test too.
## Summary
Gates four tests in `python_find.rs` that call `python_install()` behind
the `python-managed` feature flag. These tests attempt to download
Python versions from the network (free-threaded and pre-release
versions) which fail in offline build environments.
Fixes#16431
## Test Plan
Verified that the gated tests match the pattern used elsewhere in the
codebase where the entire `python_install` module is already gated
behind `#[cfg(feature = "python-managed")]`.
Since #16923, `-` stdin paths are suddenly only supported on the
`RequirementsSource::Extensionless`. However, parsing of cli arguments
using `from_requirements_txt`, `from_constraints_txt`
`from_overrides_txt` would always output a
`RequirementsSource::RequirementsTxt`. Resulting in the error:
```
$ cat overrides.txt | cargo run --bin uv --profile dev --manifest-path ./uv/crates/uv/Cargo.toml pip install 'numpy' --overrides=-
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.22s
Running `./uv/target/debug/uv pip install 'numpy' --overrides=-`
error: File not found: `-`
```
In this PR, I've added a small check in those for the `-` paths to use
`RequirementsSource::ExtensionLess`.
I'm not too sure about this change though, as it would also implicitly
start allowing PEP 723 scripts as input to overrides/constraints. I
don't see the direct issue in that, but then maybe we should explicitly
handle it so that an `--overrides=script.py` would also be supported.
@zanieb what do you think?
Relates to #17227
## Summary
Partially address #16709.
Previously, if cornered, `pip compile` would fail when the requested
python interpreter couldn't be found (more details in the issue and
comments), and now in those cases it will download it.
## Test Plan
Added an integration test for this case.
This also removes the file-specific targets from prettier execution
which means we're including `.json`, `.css`, and `.html` files, which
seems like an improvement.
Co-authored-by: Claude <noreply@anthropic.com>
## Summary
Implement #16653 by making `uv sync --output-format=json` output
information about package changes.
## Test Plan
Additional tests to test the cases where there is no known package
version _may_ be beneficial but as the information used is the same as
the information used by the dry run logging now, I don't think that's
strictly necessary as those cases are tested.
---------
Co-authored-by: Liam <liam@scalzulli.com>
We were using slightly different retry code in multiple places, this PR
unifies it.
Also fixes retry undercounting in publish if the retry middleware was
involved.
---------
Co-authored-by: Tomasz Kramkowski <tom@astral.sh>
<!--
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
improve code comments clarity
<!-- What's the purpose of the change? What does it do, and why? -->
## Test Plan
<!-- How was it tested? -->
Signed-off-by: stringscut <stringscut@outlook.jp>