Commit Graph

160 Commits

Author SHA1 Message Date
Zanie Blue 3e22637c93 Use #[expect(clippy::...)] throughout and drop unused supressions (#17537)
Co-authored-by: Claude <noreply@anthropic.com>
2026-01-20 21:52:06 +00:00
renovate[bot] a002a9af10 Update Rust crate resvg to 0.46.0 (#17595)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [resvg](https://redirect.github.com/linebender/resvg) | dependencies |
minor | `0.29.0` → `0.46.0` |

---

### Release Notes

<details>
<summary>linebender/resvg (resvg)</summary>

###
[`v0.46.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0460)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.45.1...v0.46.0)

This release has an MSRV of 1.87.0 for `usvg` and `resvg` and the C API.

##### Added

- Support SVGs without the xmlns attribute on the root. Thanks to
\[[@&#8203;JosefKuchar](https://redirect.github.com/JosefKuchar)]\[].
- Add a from\_data\_nested method to usvg::Tree
([#&#8203;955](https://redirect.github.com/linebender/resvg/issues/955)
by [@&#8203;tovrstra](https://redirect.github.com/tovrstra))
- Use cache for glyph outlining
([#&#8203;957](https://redirect.github.com/linebender/resvg/issues/957)
by [@&#8203;newinnovations](https://redirect.github.com/newinnovations))
- Support loading nested embedded images
([#&#8203;958](https://redirect.github.com/linebender/resvg/issues/958)
by [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV))

##### Changed

- Bump dependencies, bump MSRV to 1.87, Upgrade to edition 2024
([#&#8203;1002](https://redirect.github.com/linebender/resvg/issues/1002)
and
[#&#8203;1003](https://redirect.github.com/linebender/resvg/issues/1003)
[@&#8203;LaurenzV](https://redirect.github.com/LaurenzV))
- Upgraded kurbo to 0.13 and svgtypes to 0.16.1. Thanks to
\[[@&#8203;HaHa421](https://redirect.github.com/HaHa421)]\[].
- Bump zune\_jpeg
([#&#8203;964](https://redirect.github.com/linebender/resvg/issues/964)
by [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV))
- Fix abs\_bounding\_box calculation for image
([#&#8203;924](https://redirect.github.com/linebender/resvg/issues/924)
by [@&#8203;Dabble63](https://redirect.github.com/Dabble63))
- Fix crash caused by glyph splitting
([#&#8203;929](https://redirect.github.com/linebender/resvg/issues/929)
by
[@&#8203;arnaud-secondlayer](https://redirect.github.com/arnaud-secondlayer))
- Fix a bug with incorrect resolving of fill/stroke color
([#&#8203;953](https://redirect.github.com/linebender/resvg/issues/953)
by [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV))
- Fix inverted condition in has\_text\_nodes method
([#&#8203;967](https://redirect.github.com/linebender/resvg/issues/967)
by [@&#8203;Daaiid](https://redirect.github.com/Daaiid))
- Do not write empty defs nodes
([#&#8203;980](https://redirect.github.com/linebender/resvg/issues/980)
by [@&#8203;Its-Just-Nans](https://redirect.github.com/Its-Just-Nans))
- Check if text paths need to be written out
([#&#8203;981](https://redirect.github.com/linebender/resvg/issues/981)
by [@&#8203;Its-Just-Nans](https://redirect.github.com/Its-Just-Nans))
- Use checked arithmetic when computing bounding box
([#&#8203;987](https://redirect.github.com/linebender/resvg/issues/987)
by [@&#8203;Its-Just-Nans](https://redirect.github.com/Its-Just-Nans))
- Fix bug in rewriting of clip paths with transformed path
([#&#8203;988](https://redirect.github.com/linebender/resvg/issues/988)
by [@&#8203;Its-Just-Nans](https://redirect.github.com/Its-Just-Nans))

##### Removed

- Remove unused phf dependency
([#&#8203;920](https://redirect.github.com/linebender/resvg/issues/920))

###
[`v0.45.1`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0451---2025-04-16)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/0.45.0...v0.45.1)

##### Changed

- Support SVGs without the xmlns attribute on the root
([#&#8203;892](https://redirect.github.com/linebender/resvg/issues/892))
- Add optimization for paths with markers in paint-order but no actual
markers
([#&#8203;887](https://redirect.github.com/linebender/resvg/issues/887))

##### Removed

- tools/kde-dolphin-thumbnailer. This was never a released tool, and it
doesn't support current versions of KDE/dolphin
(\[[#&#8203;897](https://redirect.github.com/linebender/resvg/issues/897)]\[]
by \[[@&#8203;DJMcNab](https://redirect.github.com/DJMcNab)]\[])

###
[`v0.45.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0450---2025-02-26)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.44.0...0.45.0)

This is the first release under the stewardship of \[Linebender]\[], who
is now responsible for maintenance of this crate.
Many thanks to Yevhenii Reizner for the years of hard work that he has
poured into this and other crates.

Please note that the license of this project changed from `MPL-2.0` to
`Apache-2.0 OR MIT`.
See [resvg#838](https://redirect.github.com/linebender/resvg/issues/838)
for more information.

This release has an MSRV of 1.65 for `usvg` and 1.67.1 for `resvg` and
the C API.

##### Added

- Support for the `background-color` attribute.
- Support for additional `image-rendering` attributes.
- Support for the `!important` CSS flag.
- Support for Luma JPEG images.
- (c-api) `resvg_options_set_stylesheet`.
Thanks to
\[[@&#8203;michabay05](https://redirect.github.com/michabay05)]\[].
- (svgtypes) Support for floating point hue in `hsl()` and `hsla()`.

##### Changed

- License to `Apache-2.0 OR MIT`.
See [resvg#838](https://redirect.github.com/linebender/resvg/issues/838)
for more information.
- Updated WebP decoder for bug fixes and improved performance.
Thanks to
\[[@&#8203;Shnatsel](https://redirect.github.com/Shnatsel)]\[].
- MSRV of resvg and c-api bumped to 1.67.1.
- `fontdb` and `rustybuzz` have been updated.
- Updated other dependencies.
- (svgtypes) Simplified color component rounding and bounds checking.
- Improved handling of paths with paint order `markers` but no actual
markers.

##### Fixed

- Relative unit handling when `use` references `symbol`.
- (svgtypes) Rounding of hues in HSL to RGB conversion.
- (svgtypes) Rounding of alpha.

###
[`v0.44.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0440---2024-09-28)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.43.0...v0.44.0)

##### Added

- Stylesheet injection support.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- (c-api) `resvg_get_object_bbox`
- (c-api) `cargo-c` metadata.
  Thanks to [@&#8203;lu-zero](https://redirect.github.com/lu-zero).
- Implement `From` for `fontdb` and `usvg` font types.
  Thanks to [@&#8203;dhardy](https://redirect.github.com/dhardy).

##### Changed

- (c-api) `resvg_get_image_bbox` returns a *layer* and not *object*
bounding box now.
  Use `resvg_get_object_bbox` to preserve the old behavior.

##### Fixed

- (svgtypes) Path parsing with `S` or `T` segments after `A`.
- Bounding box calculation for the root group used for `viewBox`
flattening.

###
[`v0.43.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0430---2024-08-10)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.42.0...v0.43.0)

##### Added

- Support WebP images.
  Thanks to [@&#8203;notjosh](https://redirect.github.com/notjosh).

##### Changed

- Use `zune-jpeg` instead of `jpeg-decoder`.
Thanks to [@&#8203;mattfbacon](https://redirect.github.com/mattfbacon).
- Update dependencies.

##### Fixed

- Canvas size limits calculation.
- SVG fonts handling.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- Transforms in COLR fonts.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).

###
[`v0.42.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0420---2024-06-01)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.41.0...v0.42.0)

##### Added

- `resvg` can render color fonts now, aka Emojis.<br>
In TrueType terms, `COLRv0`, `COLRv1` (mostly), `sbix`, `CBDT` and `SVG`
tables are supported.<br>
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- Fonts matching and fallback can be controlled by the caller via
`usvg::FontResolver` now.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- `usvg::Options::font_resolver`. Similar to
`usvg::Options::image_href_resolver` we already had.
- `usvg::Options::fontdb`
- Support double-quoted FuncIRIs, aka `url("#id")`.
- `image` element viewbox flattening.<br>
Instead of having `usvg::Image::view_box` that the caller should handle
themselves,
  we instead replace it with `transform` and optional `clip-path`.
  This greatly simplifies `image` rendering.
- `usvg::Image::size`
- Tree viewbox flattening.<br>
  Similar to `image` above, but affects the root `svg` element instead.
- `pattern` viewbox flattening.<br>
  Similar to `image` above, but for patterns.
- Improve vertical text rendering.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).

##### Changed

- `usvg::fontdb::Database` should be set in `usvg::Options` and not
passed
  to the parser separately now.
- `usvg::Options` and `usvg::ImageHrefResolver` have a lifetime now.
- Replace `usvg::Visibility` enum with just `bool`.
- `usvg::Path::visibility()` is replaced with `usvg::Path::is_visible()`
- `usvg::Image::visibility()` is replaced with
`usvg::Image::is_visible()`
- `usvg::TextSpan::visibility()` is replaced with
`usvg::TextSpan::is_visible()`
- Always represent `feImage` content as a link to an element.<br>
In SVG, `feImage` can contain a link to an element or a base64 image
data, just like `image`.
From now, the inlined base64 data will always be represented by a link
to an actual `image` element.
  ```xml
  <filter>
    <feImage xlink:href="data:image/png;base64,..."/>
  </filter>
  ```
  will be parsed as
  ```xml
  <image id="image1" xlink:href="data:image/png;base64,..."/>
  <filter>
    <feImage xlink:href="#image1"/>
  </filter>
  ```
This simplifies `feImage` rendering, since we don't have to handle both
cases now.
- The `--list-fonts` resvg argument can be used without providing an SVG
file now.
  Can simply call `resvg --list-fonts` now.
- The `--list-fonts` resvg argument includes generic font family names
as well now.
- Make sure all warning and errors are printed to stderr.
  Thanks to [@&#8203;ahaoboy](https://redirect.github.com/ahaoboy).

##### Removed

- `usvg::ViewBox`, `usvg::AspectRatio`, `usvg::Align` types. Nol longer
used.
- `usvg::filter::Image::aspect`. No longer needed.
- `usvg::filter::Image::rendering_mode`. No longer needed.
- `usvg::filter::Image::data`. Use `usvg::filter::Image::root` instead.
- `usvg::Tree::view_box`. No longer needed.
- `usvg::Image::view_box`. No longer needed.
- `usvg::Image::pattern`. No longer needed.
- `usvg::utils::align_pos`. No longer needed.
- `usvg::Visibility`. No longer needed.
- (c-api) `resvg_get_image_viewbox`. Use `resvg_get_image_size` instead.

##### Fixed

- `context-fill` handling.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).

###
[`v0.41.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0410---2024-04-03)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.40.0...v0.41.0)

##### Added

- `context-fill` and `context-stroke` support.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- `usvg::Text::layouted()`, which returns a list of glyph IDs.
It can be used to manually draw glyphs, unlike with
`usvg::Text::flattened()`, which returns
  just vector paths.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).

##### Fixed

- Missing text when a `text` element uses multiple fonts and one of them
produces ligatures.
- Absolute transform propagation during `use` resolving.
- Absolute transform propagation during nested `svg` resolving.
- `Node::abs_transform` documentation. The current element's transform
*is* included.

###
[`v0.40.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0400---2024-02-17)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.39.0...v0.40.0)

##### Added

- `usvg::Tree` is `Send + Sync` compatible now.
- `usvg::WriteOptions::preserve_text` to control how `usvg` generates an
SVG.
- `usvg::Image::abs_bounding_box`

##### Changed

- All types in `usvg` are immutable now. Meaning that `usvg::Tree`
cannot be modified
  after creation anymore.
- All struct fields in `usvg` are private now. Use getters instead.
- All `usvg::Tree` parsing methods require the `fontdb` argument now.
- All `defs` children like gradients, patterns, clipPaths, masks and
filters are guarantee
  to have a unique, non-empty ID.
- All `defs` children like gradients, patterns, clipPaths, masks and
filters are guarantee
to have `userSpaceOnUse` units now. No `objectBoundingBox` units
anymore.
- `usvg::Mask` is allowed to have no children now.
- Text nodes will not be parsed when the `text` build feature isn't
enabled.
- `usvg::Tree::clip_paths`, `usvg::Tree::masks`, `usvg::Tree::filters`
returns
  a pre-collected slice of unique nodes now.
It's no longer a closure and you do not have to deduplicate nodes by
yourself.
- `usvg::filter::Primitive::x`, `y`, `width` and `height` methods were
replaced
  with `usvg::filter::Primitive::rect`.
- Split `usvg::Tree::paint_servers` into `usvg::Tree::linear_gradients`,
  `usvg::Tree::radial_gradients`, `usvg::Tree::patterns`.
  All three returns pre-collected slices now.
- A `usvg::Path` no longer can have an invalid bbox. Paths with an
invalid bbox will be
  rejected during parsing.
- All `usvg` methods that return bounding boxes return non-optional
`Rect` now.
  No `NonZeroRect` as well.
- `usvg::Text::flattened` returns `&Group` and not `Option<&Group>` now.
- `usvg::ImageHrefDataResolverFn` and `usvg::ImageHrefStringResolverFn`
  require `fontdb::Database` argument.
- All shared nodes are stored in `Arc` and not `Rc<RefCell>` now.
- `resvg::render_node` now includes filters bounding box. Meaning that a
node with a blur filter
  no longer be clipped.
- Replace `usvg::utils::view_box_to_transform` with
`usvg::ViewBox::to_transform`.
- Rename `usvg::XmlOptions` into `usvg::WriteOptions` and embed
`xmlwriter::Options`.

##### Removed

- `usvg::Tree::postprocess()` and `usvg::PostProcessingSteps`. No longer
needed.
- `usvg::ClipPath::units()`, `usvg::Mask::units()`,
`usvg::Mask::content_units()`,
`usvg::Filter::units()`, `usvg::Filter::content_units()`,
`usvg::LinearGradient::units()`,
`usvg::RadialGradient::units()`, `usvg::Pattern::units()`,
`usvg::Pattern::content_units()`
  and `usvg::Paint::units()`. They are always `userSpaceOnUse` now.
- `usvg::Units`. No longer needed.

##### Fixed

- Text bounding box is accounted during SVG size resolving.
  Previously, only paths and images were included.
- Font selection when an italic font isn't explicitly marked as one.
- Preserve `image` aspect ratio when only `width` or `height` are
present.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).

###
[`v0.39.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0390---2024-02-06)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.38.0...v0.39.0)

##### Added

- `font` shorthand parsing.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- `usvg::Group::abs_bounding_box`
- `usvg::Group::abs_stroke_bounding_box`
- `usvg::Path::abs_bounding_box`
- `usvg::Path::abs_stroke_bounding_box`
- `usvg::Text::abs_bounding_box`
- `usvg::Text::abs_stroke_bounding_box`

##### Changed

- All `usvg-*` crates merged into one. There is just the `usvg` crate
now, as before.

##### Removed

- `usvg::Group::abs_bounding_box()` method. It's a field now.
- `usvg::Group::abs_filters_bounding_box()`
- `usvg::TreeParsing`, `usvg::TreePostProc` and `usvg::TreeWriting`
traits.
  They are no longer needed.

##### Fixed

- `font-family` parsing.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- Absolute bounding box calculation for paths.

###
[`v0.38.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0380---2024-01-21)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.37.0...v0.38.0)

##### Added

- Each `usvg::Node` stores its absolute transform now.
  `Node::abs_transform()` executes in constant time now.
- `usvg::Tree::calculate_bounding_boxes` to calculate all bounding boxes
beforehand.
- `usvg::Node::bounding_box` which returns a precalculated node's
bounding box in object coordinates.
- `usvg::Node::abs_bounding_box` which returns a precalculated node's
bounding box in canvas coordinates.
- `usvg::Node::stroke_bounding_box` which returns a precalculated node's
bounding box,
  including stroke, in object coordinates.
- `usvg::Node::abs_stroke_bounding_box` which returns a precalculated
node's bounding box,
  including stroke, in canvas coordinates.
- (c-api) `resvg_get_node_stroke_bbox`
- `usvg::Node::filters_bounding_box`
- `usvg::Node::abs_filters_bounding_box`
- `usvg::Tree::postprocess`

##### Changed

- `resvg` renders `usvg::Tree` directly again. `resvg::Tree` is gone.
- `usvg` no longer uses `rctree` for the nodes tree implementation.
  The tree is a regular `enum` now.
  - A caller no longer need to use the awkward `*node.borrow()`.
  - No more panics on incorrect mutable `Rc<RefCell>` access.
- Tree nodes respect tree's mutability rules. Before, one could mutate
tree nodes when the tree
itself is not mutable. Because `Rc<RefCell>` provides a shared mutable
access.
- Filters, clip paths, masks and patterns are stored as `Rc<RefCell<T>>`
instead of `Rc<T>`.
This is required for proper mutability since `Node` itself is no longer
an `Rc`.
- Rename `usvg::NodeKind` into `usvg::Node`.
- Upgrade to Rust 2021 edition.

##### Removed

- `resvg::Tree`. No longer needed. `resvg` can render `usvg::Tree`
directly once again.
- `rctree::Node` methods. The `Node` API is completely different now.
- `usvg::NodeExt`. No longer needed.
- `usvg::Node::calculate_bbox`. Use `usvg::Node::abs_bounding_box`
instead.
- `usvg::Tree::convert_text`. Use `usvg::Tree::postprocess` instead.
- `usvg::TreeTextToPath` trait. No longer needed.

##### Fixed

- Mark `mask-type` as a presentation attribute.
- Do not show needless warnings when parsing some attributes.
- `feImage` rendering with a non-default position.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).

###
[`v0.37.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0370---2023-12-16)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.36.0...v0.37.0)

##### Added

- `usvg` can write text back to SVG now.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- `--preserve-text` flag to the `usvg` CLI tool.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- Support
[`transform-origin`](https://drafts.csswg.org/css-transforms/#transform-origin-property)
  property.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- Support non-default markers order via
[`paint-order`](https://svgwg.org/svg2-draft/painting.html#PaintOrder).
  Previously, only fill and stroke could have been swapped.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- `usvg_tree::Text::flattened` that will contain a flattened/outlined
text.
- `usvg_tree::Text::bounding_box`. Will be set only after text
flattening.
- Optimize `usvg_tree::NodeExt::abs_transform` by storing absolute
transforms in the tree
  instead of calculating them each time.

##### Changed

- `usvg_tree::Text::positions` was replaced with `usvg_tree::Text::dx`
and `usvg_tree::Text::dy`.<br>
`usvg_tree::CharacterPosition::x` and `usvg_tree::CharacterPosition::y`
are gone.
  They were redundant and you should use `usvg_tree::TextChunk::x`
  and `usvg_tree::TextChunk::y` instead.
- `usvg_tree::LinearGradient::id` and `usvg_tree::RadialGradient::id`
are moved to
  `usvg_tree::BaseGradient::id`.
- Do not generate element IDs during parsing. Previously, some elements
like `clipPath`s
and `filter`s could have generated IDs, but it wasn't very reliable and
mostly unnecessary.
Renderer doesn't rely on them and usvg writer would generate them
anyway.
- Text-to-paths conversion via `usvg_text_layout::Tree::convert_text` no
longer replaces
original text elements with paths, but instead puts them into
`usvg_tree::Text::flattened`.

##### Removed

- The `transform` field from `usvg_tree::Path`, `usvg_tree::Image` and
`usvg_tree::Text`.
  Only `usvg_tree::Group` can have it.<br>
It doesn't break anything, because those properties were never used
before anyway.<br>
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- `usvg_tree::CharacterPosition`
- `usvg_tree::Path::text_bbox`. Use `usvg_tree::Text::bounding_box`
instead.
- `usvg_text_layout::TextToPath` trait for `Text` nodes.
  Only the whole tree can be converted at once.

##### Fixed

- Path object bounding box calculation. We were using point bounds
instead of tight contour bounds.
  Was broken since v0.34
- Convert text-to-paths in embedded SVGs as well. The one inside the
`Image` node.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- Indirect `text-decoration` resolving in some cases.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- (usvg) Clip paths writing to SVG.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).

###
[`v0.36.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0360---2023-10-01)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.35.0...v0.36.0)

##### Added

- `stroke-linejoin=miter-clip` support. SVG2.
Thanks to [@&#8203;torokati44](https://redirect.github.com/torokati44).
- Quoted FuncIRI support. Like `fill="url('#gradient')"`. SVG2.
  Thanks to [@&#8203;romanzes](https://redirect.github.com/romanzes).
- Allow float values in `rgb()` and `rgba()` colors. SVG2.
  Thanks to [@&#8203;yisibl](https://redirect.github.com/yisibl).
- `auto-start-reverse` variant support to `orient` in markers. SVG2.
Thanks to [@&#8203;EpicEricEE](https://redirect.github.com/EpicEricEE).

##### Changed

- Update dependencies.

##### Fixed

- Increase precision of the zero-scale transform check.
  Was rejecting some valid transforms before.
- Panic when rendering a very specific text.
- Greatly improve parsing performance when an SVG has a lot of
references.
  Thanks to [@&#8203;wez](https://redirect.github.com/wez).
- (Qt API) Fix scaling factor calculation.
  Thanks to [@&#8203;missdeer](https://redirect.github.com/missdeer).

###
[`v0.35.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0350---2023-06-27)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.34.1...v0.35.0)

##### Fixed

- Panic when an element is completely outside the viewbox.

##### Removed

- `FillPaint` and `StrokePaint` filter inputs support.
It's a mostly undocumented SVG feature that no one supports and no one
uses.
  And it was adding a significant complexity to the codebase.
- `usvg::filter::Filter::fill_paint` and
`usvg::filter::Filter::stroke_paint`.
- `BackgroundImage`, `BackgroundAlpha`, `FillPaint` and `StrokePaint`
from `usvg::filter::Input`.
- `usvg::Group::filter_fill_paint` and
`usvg::Group::filter_stroke_paint`.

###
[`v0.34.1`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0341---2023-05-28)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.34.0...v0.34.1)

##### Fixed

- Transform components order. Affects only `usvg` SVG output and C API.

###
[`v0.34.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0340---2023-05-27)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.33.0...v0.34.0)

##### Changed

- `usvg` uses `tiny-skia` geometry primitives now, including the `Path`
container.<br>
  The main difference compared to the old `usvg` primitives
  is that `tiny-skia` uses `f32` instead of `f64`.
So while in theory we could loose some precision, in practice, `f32` is
used mainly
as a storage type and precise math operations are still done using
`f64`.<br>
`tiny-skia` primitives are move robust, strict and have a nicer API.<br>
More importantly, this change reduces the peak memory usages for SVGs
with large paths
  (in terms of the number of segments).
And removes the need to convert `usvg::PathData` into `tiny-skia::Path`
before rendering.
  Which was just a useless reallocation.
- All numbers are stored as `f32` instead of `f64` now.
- Because we use `tiny-skia::Path` now, we allow *quadratic curves* as
well.
  This includes `usvg` CLI output.
- Because we allow *quadratic curves* now, text might render slightly
differently (better?).
  This is because TrueType fonts contain only *quadratic curves*
  and we were converting them to cubic before.
- `usvg::Path` no longer implements `Default`. Use `usvg::Path::new`
instead.
- Replace `usvg::Rect` with `tiny_skia::NonZeroRect`.
- Replace `usvg::PathBbox` with `tiny_skia::Rect`.
- Unlike the old `usvg::PathBbox`, `tiny_skia::Rect` allows both width
and height to be zero.
  This is not an error.
- `usvg::filter::Turbulence::base_frequency` was split into
`base_frequency_x` and `base_frequency_y`.
- `usvg::NodeExt::calculate_bbox` no longer includes stroke bbox.
- (c-api) Use `float` instead of `double` everywhere.
- The `svgfilters` crate was merged into `resvg`.
- The `rosvgtree` crate was merged into `usvg-parser`.
- `usvg::Group::filter_fill` moved to
`usvg::filter::Filter::fill_paint`.
- `usvg::Group::filter_stroke` moved to
`usvg::filter::Filter::stroke_paint`.

##### Remove

- `usvg::Point`. Use `tiny_skia::Point` instead.
- `usvg::FuzzyEq`. Use `usvg::ApproxEqUlps` instead.
- `usvg::FuzzyZero`. Use `usvg::ApproxZeroUlps` instead.
- (c-api) `resvg_path_bbox`. Use `resvg_rect` instead.
- `svgfilters` crate.
- `rosvgtree` crate.

##### Fixed

- Write `transform` on `clipPath` children in `usvg` SVG output.
- Do not duplicate marker children IDs.
  Previously, each element resolved for a marker would preserve its ID.
  Affects only `usvg` SVG output and doesn't affect rendering.

###
[`v0.33.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0330---2023-05-17)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.32.0...v0.33.0)

##### Added

- A new rendering algorithm.<br>
When rendering [isolated
groups](https://razrfalcon.github.io/notes-on-svg-parsing/isolated-groups.html),
aka layers, we have to know the layer bounding box beforehand, which is
ridiculously hard in SVG.<br>
  Previously, resvg would simply use the canvas size for all the layers.
Meaning that to render a 10x10px layer on a 1000x1000px canvas, we would
have to allocate and then blend
  a 1000x1000px layer, which is just a waste of CPU cycles.<br>
The new rendering algorithm is able to calculate layer bounding boxes,
which dramatically improves
  performance when rendering a lot of tiny layers on a large canvas.<br>
Moreover, it makes performance more linear with a canvas size
increase.<br>
The
[paris-30k.svg](https://redirect.github.com/google/forma/blob/681e8bfd348caa61aab47437e7d857764c2ce522/assets/svgs/paris-30k.svg)
sample from [google/forma](https://redirect.github.com/google/forma) is
rendered *115 times* faster on M1 Pro now.
  From \~33760ms down to \~290ms. 5269x3593px canvas.<br>
If we restrict the canvas to 1000x1000px, which would contain only the
actual `paris-30k.svg` content,
  then we're *13 times* faster. From \~3252ms down to \~253ms.
- `resvg::Tree`, aka a render tree, which is an even simpler version of
`usvg::Tree`.
`usvg::Tree` had to be converted into `resvg::Tree` before rendering
now.

##### Changed

- Restructure the root directory. All crates are in the `crates`
directory now.
- Restructure tests. New directory structure and naming scheme.
- Use `resvg::Tree::render` instead of `resvg::render`.
- resvg's `--export-area-drawing` option uses calculated bounds instead
of trimming
excessive alpha now. It's faster, but can lead to a slightly different
output.
- (c-api) Removed `fit_to` argument from `resvg_render`.
- (c-api) Removed `fit_to` argument from `resvg_render_node`.
- `usvg::ScreenSize` moved to `resvg`.
- `usvg::ScreenRect` moved to `resvg`.
- Rename `resvg::ScreenSize` into `resvg::IntSize`.
- Rename `resvg::ScreenRect` into `resvg::IntRect`.

##### Removed

- `filter` build feature from `resvg`. Filters are always enabled now.
- `resvg::FitTo`
- `usvg::utils::view_box_to_transform_with_clip`
- `usvg::Size::to_screen_size`. Use `resvg::IntSize::from_usvg` instead.
- `usvg::Rect::to_screen_size`. Use
`resvg::IntSize::from_usvg(rect.size())` instead.
- `usvg::Rect::to_screen_rect`. Use `resvg::IntRect::from_usvg` instead.
- (c-api) `resvg_fit_to`
- (c-api) `resvg_fit_to_type`

##### Fixed

- Double quotes parsing in `font-family`.

###
[`v0.32.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0320---2023-04-23)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.31.1...v0.32.0)

##### Added

- Clipping and masking is up to 20% faster.
- `mask-type` property support. SVG2
- `usvg_tree::MaskType`
- `usvg_tree::Mask::kind`
- (rosvgtree) New SVG 2 mask attributes.

##### Changed

- `BackgroundImage` and `BackgroundAlpha` filter inputs will produce the
same output
  as `SourceGraphic` and `SourceAlpha` respectively.

##### Removed

- `enable-background` support. This feature was never supported by
browsers
and was deprecated in SVG 2. To my knowledge, only Batik has a good
support of it.
Also, it's a performance nightmare, which caused multiple issues in
resvg already.
- `usvg_tree::EnableBackground`
- `usvg_tree::Group::enable_background`
- `usvg_tree::NodeExt::filter_background_start_node`

##### Fixed

- Improve rectangular clipping anti-aliasing quality.
- Mask's RGB to Luminance converter was ignoring premultiplied alpha.

###
[`v0.31.1`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0311---2023-04-22)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.31.0...v0.31.1)

##### Fixed

- Use the latest `tiny-skia` to fix SVGs with large masks rendering.

###
[`v0.31.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0310---2023-04-10)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.30.0...v0.31.0)

##### Added

- `usvg::Tree::paint_servers`
- `usvg::Tree::clip_paths`
- `usvg::Tree::masks`
- `usvg::Tree::filters`
- `usvg::Node::subroots`
- (usvg) `--coordinates-precision` and `--transforms-precision` writing
options.
  Thanks to [@&#8203;flxzt](https://redirect.github.com/flxzt).

##### Fixed

- `fill-opacity` and `stroke-opacity` resolving.
- Double `transform` when resolving `symbol`.
- `symbol` clipping when its viewbox is the same as the document one.
- (usvg) Deeply nested gradients, patterns, clip paths, masks and
filters
  were ignored during SVG writing.
- Missing text in nested clip paths and mask, text decoration patterns,
filter inputs and feImage.

###
[`v0.30.0`](https://redirect.github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0300---2023-03-25)

[Compare
Source](https://redirect.github.com/linebender/resvg/compare/v0.29.0...v0.30.0)

##### Added

- Readd `usvg` CLI tool. Can be installed via cargo as before.

##### Changed

- Extract most `usvg` internals into new `usvg-tree` and `usvg-parser`
crates.
  `usvg-tree` contains just the SVG tree and all the types.
  `usvg-parser` parsers SVG into `usvg-tree`.
  And `usvg` is just an umbrella crate now.
- To use `usvg::Tree::from*` methods one should import the
`usvg::TreeParsing` trait now.
- No need to import `usvg-text-layout` manually anymore. It is part of
`usvg` now.
- `rosvgtree` no longer reexports `svgtypes`.
- `rosvgtree::Node::attribute` returns just a string now.
- `rosvgtree::Node::find_attribute` returns just a `rosvgtree::Node`
now.
- Rename `usvg::Stretch` into `usvg::FontStretch`.
- Rename `usvg::Style` into `usvg::FontStyle`.
- `usvg::FitTo` moved to `resvg::FitTo`.
- `usvg::IsDefault` trait is private now.

##### Removed

- `rosvgtree::FromValue`. Due to Rust's orphan rules this trait is
pretty useless.

##### Fixed

- Recursive markers detection.
- Skip malformed `transform` attributes without skipping the whole
element.
- Clipping path rectangle calculation for nested `svg` elements.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- Panic when applying `text-decoration` on text with only one cluster.
  Thanks to [@&#8203;LaurenzV](https://redirect.github.com/LaurenzV).
- (Qt API) Image size wasn't initialized. Thanks to
[@&#8203;missdeer](https://redirect.github.com/missdeer).
- `resvg` CLI allows files with XML DTD again.
- (svgtypes) Handle implicit MoveTo after ClosePath segments.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, only on
Monday ( * 0-3 * * 1 ) (UTC), Automerge - At any time (no schedule
defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/astral-sh/uv).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43NC41IiwidXBkYXRlZEluVmVyIjoiNDIuNzQuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2026-01-19 09:01:20 -06:00
github-actions[bot] 0c08cba0c4 Sync latest Python releases (#17480)
Automated update for Python releases.

Co-authored-by: jjhelmus <1050278+jjhelmus@users.noreply.github.com>
2026-01-15 04:21:14 +00:00
github-actions[bot] c6a02873fd Sync latest Python releases (#17445)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2026-01-13 22:01:12 +00:00
Eli Uriegas e67dbce3fe Allow setting proxy variables via global / user configuration (#16918)
<!--
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>
2026-01-06 11:13:59 -06:00
Zanie Blue d7cdd58d63 Format JSON schema with prettier at generation time (#17272)
Formats the generated JSON schema with prettier so it doesn't fail CI
lints immediately after update.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-06 08:20:45 -06:00
github-actions[bot] 1ddb646a74 Add CPython 3.15.0a3 (#17165)
Automated update for Python releases.

---------

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-12-18 13:15:04 +00:00
github-actions[bot] 81c99dd438 Sync latest Python releases (#17057)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-12-09 22:30:11 +00:00
Zanie Blue 4e1469b151 Remove now unused generate tests (#17031)
I missed this in #16969
2025-12-08 15:50:40 +00:00
github-actions[bot] 9635258867 Sync latest Python releases (#16943)
Automated update for Python releases.

---------

Co-authored-by: jjhelmus <1050278+jjhelmus@users.noreply.github.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-12-06 00:03:57 +00:00
konsti 62bf92132b Add a 5 min default timeout for deadlocks (#16342)
When a process is running and another calls `uv cache clean` or `uv
cache prune` we currently deadlock - sometimes until the CI timeout
(https://github.com/astral-sh/setup-uv/issues/588). To avoid this, we
add a default 5 min timeout waiting for a lock. 5 min balances allowing
in-progress builds to finish, especially with larger native
dependencies, while also giving timely errors for deadlocks on (remote)
systems.

Commit 1 is a refactoring.

This branch also fixes a problem with the logging where acquired and
released resources currently mismatch:

```
DEBUG Acquired lock for `https://github.com/tqdm/tqdm`
DEBUG Using existing Git source `https://github.com/tqdm/tqdm`
DEBUG Released lock at `C:\Users\Konsti\AppData\Local\uv\cache\git-v0\locks\16bb813afef8edd2`
```
2025-12-04 14:59:04 +01:00
github-actions[bot] e799a088a5 Sync latest Python releases (#16792)
Automated update for Python releases.

---------

Co-authored-by: jjhelmus <1050278+jjhelmus@users.noreply.github.com>
Co-authored-by: Jonathan Helmus <jjhelmus@gmail.com>
2025-11-20 20:27:40 +00:00
Charlie Marsh c1c1950dce Add support for the Simple index API top-level route (#16656)
## Summary

At present, we only have support for the detail routes (e.g.,
`https://pypi.org/simple/requests`), but not the top-level index route
(e.g., `https://pypi.org/simple/`). I need this for some downstream work
so pulling it into its own PR.
2025-11-10 14:50:19 -05:00
github-actions[bot] 1b7faafd7a Sync latest Python releases (#16505)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-11-08 10:16:21 -06:00
samypr100 7978122837 Update Rust toolchain to 1.91 and MSRV to 1.89 (#16531)
## Summary

Updates Rust Toolchain to
[1.91](https://blog.rust-lang.org/2025/10/30/Rust-1.91.0/) and bumps
MSRV to [1.89](https://blog.rust-lang.org/2025/08/07/Rust-1.89.0/) per
versioning policy. New clippy rule [implicit
clone](https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone)
resulted in some minor changes (some with improvements).

Updates trampoline to `nightly-2025-06-23` which is roughly 1.89~. The
trampoline binaries do not need to be regenerated as there should be no
changes.
2025-10-30 22:34:59 -05:00
github-actions[bot] ed65c2482c Sync latest Python releases (#16246)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-10-21 00:41:53 +00:00
Andrei Berenda a58d031157 Add UV_UPLOAD_HTTP_TIMEOUT and respect UV_HTTP_TIMEOUT in uploads (#16040)
## Summary
- Move parsing `UV_HTTP_TIMEOUT`, `UV_REQUEST_TIMEOUT` and
`HTTP_TIMEOUT` to `EnvironmentOptions`
- Add new env varialbe `UV_UPLOAD_HTTP_TIMEOUT`

Relates https://github.com/astral-sh/uv/issues/14720

## Test Plan

Tests with existing tests
2025-10-09 12:28:30 -05:00
samypr100 f81c6b9a62 document uv version for environment variables (#15196)
## Summary

As new environment variables get introduced (e.g. `UV_EDITABLE`) I
thought it would useful to start tracking which release they were
introduced. I think its a common workflow to navigate to the [env var
documentation](https://docs.astral.sh/uv/reference/environment) to know
what the env var for something is but then end up in a situation where
one is using an environment variable with the wrong version of uv and
not notice immediately that its not compatible and therefore ignored.

## Test Plan

Existing tests.

The versions in `since` have all been manually reviewed to the best of
my ability for correctness.
2025-10-08 12:31:12 -05:00
github-actions[bot] 4c4fce4284 Sync latest Python releases (#16169)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-10-08 04:26:32 +00:00
github-actions[bot] 3979c59726 Sync latest Python releases (#15958)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-09-20 02:25:21 +00:00
github-actions[bot] 4162005df8 Sync latest Python releases (#15670)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-09-03 20:04:55 -05:00
github-actions[bot] 35ce8e1dae Sync latest Python releases (#15578)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-09-02 14:24:39 +00:00
konsti 289ed86e63 Use a global BaseClientBuilder (#15548)
Alternative to #15105

Instead of building a `BaseClientBuilder` from `NetworkSettings` each
time we need a client, we instead build a single `BaseClientBuilder` and
pass it around. The `RegistryClientBuilder` then uses
`BaseClientBuilder` exclusively for configuration. This removes a chunk
of copy-and-paste code, and also moves the fallible `retries_from_env`
into a single place

Borrow vs. clone is mostly ad-hoc, we can change it in either direction
if it matters.

Closes #15105
2025-08-29 13:30:51 -05:00
Charlie Marsh ac84f5aedc Move preview features into a dedicated crate (#15482)
## Summary

This is causing some cyclic dependencies issues for me, because these
can be used in virtually _any_ crate (like `uv-install-wheel`), which
then means that all of `uv-configuration` becomes a dependency, etc. I
think this should be a leaf crate so that we can safely depend on it
anywhere.
2025-08-24 09:55:30 -04:00
github-actions[bot] 724e4c7e5e Sync latest Python releases (#15363)
Automated update for Python releases.

---------

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-08-18 21:49:00 +00:00
Zanie Blue a4d14710d4 Skip all generated content checks when in CI (#15354) 2025-08-18 16:09:14 +00:00
github-actions[bot] 42beb20b90 Add Python 3.14.0rc2 (#15285)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-08-14 13:18:36 -05:00
github-actions[bot] ed499d7453 Sync latest Python releases (#15186)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-08-09 00:43:10 +00:00
Charlie Marsh 7f1eaf48c1 Harden ZIP streaming to reject repeated entries and other malformed ZIP files (#15136)
## Summary

uv will now reject ZIP files that meet any of the following conditions:

- Multiple local header entries exist for the same file with different
contents.
- A local header entry exists for a file that isn't included in the
end-of-central directory record.
- An entry exists in the end-of-central directory record that does not
have a corresponding local header.
- The ZIP file contains contents after the first end-of-central
directory record.
- The CRC32 doesn't match between the local file header and the
end-of-central directory record.
- The compressed size doesn't match between the local file header and
the end-of-central directory record.
- The uncompressed size doesn't match between the local file header and
the end-of-central directory record.
- The reported central directory offset (in the end-of-central-directory
header) does not match the actual offset.
- The reported ZIP64 end of central directory locator offset does not
match the actual offset.

We also validate the above for files with data descriptors, which we
previously ignored.

Wheels from the most recent releases of the top 15,000 packages on PyPI
have been confirmed to pass these checks, and PyPI will also reject ZIPs
under many of the same conditions (at upload time) in the future.

In rare cases, this validation can be disabled by setting
`UV_INSECURE_NO_ZIP_VALIDATION=1`. Any validations should be reported to
the uv issue tracker and to the upstream package maintainer.
2025-08-07 15:31:48 +01:00
github-actions[bot] 038bf56366 Sync latest Python releases (#15135)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-08-07 13:59:02 +00:00
adamnemecek 3f83390e34 Make the use of Self consistent. (#15074)
## Summary

Make the use of `Self` consistent. Mostly done by running `cargo clippy
--fix -- -A clippy::all -W clippy::use_self`.

## Test Plan

<!-- How was it tested? -->
No need.
2025-08-05 20:17:12 +01:00
Zanie Blue 8db61abb50 Prefer system Python installations over managed ones when --system is used (#15061)
This fixes a regression from 0.8.0 from
https://github.com/astral-sh/uv/pull/7934 and follows
https://github.com/astral-sh/uv/pull/15059

The regression is from [this
change](https://github.com/astral-sh/uv/pull/7934/files#diff-c7a660ac39628d5e12f388b0cacc7360affa3d7bb21191184d7ee78489675e83),
which was made because we'd otherwise (with the other changes in that
pull request) _filter out_ managed Python interpreters found in virtual
environments.

When `--system` is used we'll convert the default Python preference of
`managed` to `system` which avoids things like `uv pip install --system`
targeting a managed Python installation.

The basic test is

```
uv python install
uv pip install --system anyio
```

Prior to this change, we'd read a managed interpreter from our managed
installation directory and target that. After this change, without
#15059, we'd read a managed interpreter from the PATH and target that.
Both of those experiences are bad, because the managed interpreters are
marked as externally managed. After this change, with #15059, we
properly target the system interpreter.

Since we use `system` instead of `only-system`, if there is not a system
interpreter we'll still retain our existing behavior and use a managed
interpreter. This should limit breakage from the change. Given the
source of the regression, we could probably use `only-system` here. I
don't feel strongly. I think the main benefit of doing so would be that
we'd omit the check for managed installations in error messages when an
interpreter cannot be found?

We can't really add test coverage here because the test suite always has
externally managed interpreters :)
2025-08-04 19:53:59 -05:00
konsti 56677c540a Log the debug error trace (#14458)
For #14425. We can see the error without `error(transparent)` applied by
looking at the debug representation.
2025-07-31 19:13:09 +02:00
Zanie Blue d867f3e595 Skipcargo dev generate-all test case in CI (#14972)
This means that CI tests fail in a way that is redundant with the
dedicated CI job which can obscure signal on whether actual tests are
failing

e.g.,
https://github.com/astral-sh/uv/actions/runs/16623645930/job/47034116533
2025-07-31 15:49:42 +00:00
Zanie Blue bfb4bc2aeb Split preview mode into separate feature flags (#14823)
I think this would give us better hygiene than a global flag. It makes
it easier for users to opt-in to overlapping features, such as Python
upgrades and Python bin installations and to disable warnings for
preview mode without opting in to a bunch of other features. In general,
I want to reduce the burden for putting something under preview.

The `--preview` and `--no-preview` flags are retained as global
overrides. A new `--preview-features` option is added which accepts
comma separated features or can be passed multiple times, e.g.,
`--preview-features add-bounds,pylock`. There's a `UV_PREVIEW_FEATURES`
environment variable for that option (I'm not sure if we should overload
`UV_PREVIEW`, but could be convinced).
2025-07-25 11:01:57 -05:00
github-actions[bot] 310a9d3426 Sync latest Python releases (#14847)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-07-23 11:01:09 -05:00
github-actions[bot] 4175e3eb4d Sync latest Python releases (#14581)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-07-13 08:20:51 -05:00
github-actions[bot] 92716606e5 Sync latest Python releases (#14531)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-07-10 00:40:58 +00:00
github-actions[bot] 3bb8ac610c Sync latest Python releases (#14426)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-07-02 14:51:17 -05:00
github-actions[bot] a3db9a9ae4 Sync latest Python releases (#14381)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-07-01 03:44:18 +00:00
github-actions[bot] db14cc3005 Sync latest Python releases (#14339)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-06-28 03:08:53 +00:00
ya7010 ac788d7cde Update schemars 1.0.0 (#13693)
<!--
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
Update [schemars
0.9.0](https://github.com/GREsau/schemars/releases/tag/v0.9.0)

There are differences in the generated JSON Schema and I will [contact
the author](https://github.com/GREsau/schemars/issues/407).

## Test Plan

---------

Co-authored-by: konstin <konstin@mailbox.org>
2025-06-24 21:43:31 +02:00
John Mumm e9d5780369 Support transparent Python patch version upgrades (#13954)
> NOTE: The PRs that were merged into this feature branch have all been
independently reviewed. But it's also useful to see all of the changes
in their final form. I've added comments to significant changes
throughout the PR to aid discussion.

This PR introduces transparent Python version upgrades to uv, allowing
for a smoother experience when upgrading to new patch versions.
Previously, upgrading Python patch versions required manual updates to
each virtual environment. Now, virtual environments can transparently
upgrade to newer patch versions.

Due to significant changes in how uv installs and executes managed
Python executables, this functionality is initially available behind a
`--preview` flag. Once an installation has been made upgradeable through
`--preview`, subsequent operations (like `uv venv -p 3.10` or patch
upgrades) will work without requiring the flag again. This is
accomplished by checking for the existence of a minor version symlink
directory (or junction on Windows).

### Features

* New `uv python upgrade` command to upgrade installed Python versions
to the latest available patch release:
``` 
# Upgrade specific minor version 
uv python upgrade 3.12 --preview
# Upgrade all installed minor versions
uv python upgrade --preview
```
* Transparent upgrades also occur when installing newer patch versions: 
```
uv python install 3.10.8 --preview
# Automatically upgrades existing 3.10 environments
uv python install 3.10.18
```
* Support for transparently upgradeable Python `bin` installations via
`--preview` flag
```
uv python install 3.13 --preview
# Automatically upgrades the `bin` installation if there is a newer patch version available
uv python upgrade 3.13 --preview
```
* Virtual environments can still be tied to a patch version if desired
(ignoring patch upgrades):
```
uv venv -p 3.10.8
```

### Implementation

Transparent upgrades are implemented using:
* Minor version symlink directories (Unix) or junctions (Windows)
* On Windows, trampolines simulate paths with junctions
* Symlink directory naming follows Python build standalone format: e.g.,
`cpython-3.10-macos-aarch64-none`
* Upgrades are scoped to the minor version key (as represented in the
naming format: implementation-minor version+variant-os-arch-libc)
* If the context does not provide a patch version request and the
interpreter is from a managed CPython installation, the `Interpreter`
used by `uv python run` will use the full symlink directory executable
path when available, enabling transparently upgradeable environments
created with the `venv` module (`uv run python -m venv`)

New types:
* `PythonMinorVersionLink`: in a sense, the core type for this PR, this
is a representation of a minor version symlink directory (or junction on
Windows) that points to the highest installed managed CPython patch
version for a minor version key.
* `PythonInstallationMinorVersionKey`: provides a view into a
`PythonInstallationKey` that excludes the patch and prerelease. This is
used for grouping installations by minor version key (e.g., to find the
highest available patch installation for that minor version key) and for
minor version directory naming.

### Compatibility

* Supports virtual environments created with:
  * `uv venv`
* `uv run python -m venv` (using managed Python that was installed or
upgraded with `--preview`)
  * Virtual environments created within these environments
* Existing virtual environments from before these changes continue to
work but aren't transparently upgradeable without being recreated
* Supports both standard Python (`python3.10`) and freethreaded Python
(`python3.10t`)
* Support for transparently upgrades is currently only available for
managed CPython installations

Closes #7287
Closes #7325
Closes #7892
Closes #9031
Closes #12977

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-06-20 16:17:13 +02:00
github-actions[bot] d9c34259b3 Sync latest Python releases (#13996)
Automated update for Python releases.

---------

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-06-12 09:47:28 -05:00
github-actions[bot] 357fc91c3c Sync latest Python releases (#13956)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-06-10 21:13:32 -05:00
Zanie Blue 262ca73965 Remove the configuration section in favor of concepts / reference (#13842)
Extends https://github.com/astral-sh/uv/pull/13841 — I'll drop that
commit later after that pull request merges but it's small.

I find the split into a "Configuration" section awkward and don't think
it's helping us. Everything moved into the "Concepts" section, except
the "Environment variables" page which definitely belongs in the
reference and the "Installer" page which is fairly niche and seems
better in the reference.

Before / After


<img
src="https://github.com/user-attachments/assets/80d8304b-17da-4900-a5f4-c3ccac96fcc5"
width="400">
2025-06-05 17:09:49 +00:00
github-actions[bot] cd89a592ea Update tag for Python sysconfig metadata (#13851)
Automated update for Python releases.

Co-authored-by: zanieb <2586601+zanieb@users.noreply.github.com>
2025-06-05 11:21:35 -05:00
samypr100 d65c146b21 feat: add dynamically generated sysconfig replacement mappings (#13441)
## Summary

Implementation referenced in
https://github.com/astral-sh/uv/pull/12239#issuecomment-2744880003

Closes #12919 #12901

This makes the sysconfig replacements mappings dynamically generated
from
https://github.com/astral-sh/python-build-standalone/blob/main/cpython-unix/targets.yml

## Test Plan

cargo dev tests, and tested scenario from
https://github.com/astral-sh/uv/issues/12901#issuecomment-2822107454
2025-06-02 10:58:30 -05:00
renovate[bot] c7cabfccd7 Update markdown to v1 and fix CLI reference links (#13166)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [markdown](https://redirect.github.com/wooorm/markdown-rs) |
dependencies | major | `0.3.0` -> `1.0.0` |

---

### Release Notes

<details>
<summary>wooorm/markdown-rs (markdown)</summary>

###
[`v1.0.0`](https://redirect.github.com/wooorm/markdown-rs/releases/tag/1.0.0)

💯

Nothing changed since the last alpha.
It’s just that: this crate’s now being used a bunch and working well, so
it’s time to be stable!

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/astral-sh/uv).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjI1Ny4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: konstin <konstin@mailbox.org>
2025-05-21 22:50:09 +02:00
Charlie Marsh c5032aee80 Bump MSRV to 1.85 and Edition 2024 (#13516)
## Summary

Builds on https://github.com/astral-sh/uv/pull/11724.

Closes https://github.com/astral-sh/uv/issues/13476.
2025-05-18 19:38:43 -04:00