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.
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.
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.
## 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.
## 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>
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
([#​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>
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
([#​210](https://redirect.github.com/vorner/arc-swap/issues/210),
[#​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>
## 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.
## 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.
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>
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`
([#​99](https://redirect.github.com/mozilla/thin-vec/issues/99)).
- Implement Index/IndexMut
([#​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>
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>
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
([#​70](https://redirect.github.com/dtolnay/indoc/issues/70),
thanks [@​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>
## 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.
## 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.
## 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.
Summary
--
This PR fixesastral-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