Commit Graph
70 Commits
Author SHA1 Message Date
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 1b93171700 [ty] Add NumPy to ecosystem runs (#30572) 2026-11-19 13:18:13 +00:00
David Peter 9abaa92cb8 [ty] Enable script dependency sync via ecosystem-analyzer (#30536)
Use `--sync-script-dependencies` in the ecosystem workflow to preinstall
PEP 723 script dependencies before timing either revision. The analyzer
passes `project-manager.script = "uv"` to both ty binaries, so the
workflow can drop `TY_UV: scripts`.

Update `uv.lock` to the analyzer revision that introduced the flag.
[astral-sh/ecosystem-analyzer#260](https://github.com/astral-sh/ecosystem-analyzer/pull/260)
2026-11-18 15:34:11 +01:00
renovate[bot] e2d113b693 Update dependency soupsieve to v4 (#30409)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [soupsieve](https://redirect.github.com/facelessuser/soupsieve) |
`2.9.2` → `4.0` |
![age](https://developer.mend.io/api/mc/badges/age/pypi/soupsieve/4.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/soupsieve/2.9.2/4.0?slim=true)
|

---

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

---

### Soup Sieve: General sibling combinator inside :has() matches
untrusted HTML in quadratic time
[CVE-2026-126192](https://nvd.nist.gov/vuln/detail/CVE-2026-126192) /
[GHSA-4j63-6c4x-wfg4](https://redirect.github.com/advisories/GHSA-4j63-6c4x-wfg4)

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

#### Details
##### Summary

Matching a selector that puts a general-sibling combinator inside
`:has()`, such as `div:has(a ~ b)`, against untrusted HTML runs in O(n²)
time in the number of sibling elements. A single small document with a
few thousand siblings ties the process up for a minute of CPU, so an
application that runs a fixed selector of this shape over HTML it
doesn't control can be stalled by one request.

`:has` is powerful, but much in the same way poor regular expressions
can be crafted to cause catastrophic backtracking with greedy capturing,
has can be used to create non-ideal scenarios that can cause large
portions of the tree to be evaluated for one or many elements if not
used thoughtfully.

This behavior is not exclusive to Soup Sieve, but browsers make note of
these potential performance issues themselves:
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:has#performance_considerations.

With all of that said, there is room for improvements that can in some
cases greatly improve performance.

##### Details

`:has(a ~ b)` asks "does this element contain an `a` that has a later
sibling `b`?". When no `b` is present, soupsieve can't short-circuit,
and it answers the question with a nested scan: `match_future_child`
walks every candidate `a` under the scope, and for each one the
general-sibling branch of `match_future_relations` walks all of that
`a`'s following siblings looking for `b`. With n siblings that is (n-1)
+ (n-2) + ... + 1 comparisons, i.e. O(n²).

The adjacent-sibling form `div:has(a + b)` stays linear, because its
branch checks only the one immediately following sibling per candidate.
So the cost is specific to the general-sibling `~` (and `~` nested
inside `:has`), and it shows up on the common case where the right-hand
side simply isn't there.

##### Proof of concept

Installed from PyPI: `pip install soupsieve==2.9.2 beautifulsoup4`.

```python
import time
import soupsieve
from bs4 import BeautifulSoup

selector = "div:has(a ~ b)"

for n in (1000, 2000, 4000, 8000):
    html = "<div>" + ("<a></a>" * n) + "</div>"
    soup = BeautifulSoup(html, "html.parser")
    start = time.perf_counter()
    soupsieve.select(selector, soup)
    print(n, round((time.perf_counter() - start) * 1000), "ms")
```

Measured:

```
n=1000    837 ms
n=2000   3667 ms
n=4000  14797 ms
n=8000  59746 ms
```

Time quadruples for each doubling of n. The n=8000 input is a ~56 KB
HTML fragment.

##### Impact

Availability. Any caller that evaluates a fixed selector containing a
general sibling under `:has()` over attacker-controlled markup can be
forced to spend minutes of CPU on a small input. The selector is
developer-authored and ordinary; the untrusted part is the HTML, which
is soupsieve's normal input.

A single-pass evaluation of the sibling run (remember whether an `a` has
been seen while scanning the siblings once) would make this case linear.

##### Mitigation

Quadratic time for `:has` in some circumstances is expected and not a
bug. While we've made optimizations and there may be more in the future,
the way `:has` is designed to operate will never perform in linear time
in all circumstances. Users should thoughtfully apply the use of `:has`.

The anchor selector (the `A` in `A:has(B)`) should not be an element
that has too many children. Additionally, too general an anchor, such as
`*`, can cause `:has()` to be applied to every element.

Further, it is recommended that the inner selector (the `B` in
`A:has(B)`) should use combinators like `>` or `+` to limit traversal.
When the selector inside `:has()` is not tightly constrained, Soup Sieve
might need to traverse the entire subtree of the anchor
element to check the condition.

If the risk for a given project is too great, user input can be scanned
for usage of `:has` and be denied. Calls can also be wrapped in a
timeout to prevent long-running processes as well.

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

#### References
-
[https://github.com/facelessuser/soupsieve/security/advisories/GHSA-4j63-6c4x-wfg4](https://redirect.github.com/facelessuser/soupsieve/security/advisories/GHSA-4j63-6c4x-wfg4)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-126192](https://nvd.nist.gov/vuln/detail/CVE-2026-126192)
-
[https://github.com/facelessuser/soupsieve/pull/304](https://redirect.github.com/facelessuser/soupsieve/pull/304)
-
[https://github.com/facelessuser/soupsieve/commit/ffb88cca745c591224f74a8e86414a85e8f35fc0](https://redirect.github.com/facelessuser/soupsieve/commit/ffb88cca745c591224f74a8e86414a85e8f35fc0)
-
[https://github.com/facelessuser/soupsieve/releases/tag/2.10](https://redirect.github.com/facelessuser/soupsieve/releases/tag/2.10)
-
[https://github.com/advisories/GHSA-4j63-6c4x-wfg4](https://redirect.github.com/advisories/GHSA-4j63-6c4x-wfg4)

This data is provided by the [GitHub Advisory
Database](https://redirect.github.com/advisories/GHSA-4j63-6c4x-wfg4)
([CC-BY
4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)).
</details>

---

### Soup Sieve: Polynomial-time denial of service in the descendant
combinator
[CVE-2026-126190](https://nvd.nist.gov/vuln/detail/CVE-2026-126190) /
[GHSA-mmhr-3c5m-f64f](https://redirect.github.com/advisories/GHSA-mmhr-3c5m-f64f)

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

#### Details
##### Summary

Matching a selector that uses the descendant combinator (`a b`) takes
time that grows polynomially with how deeply the document is nested, and
each extra descendant combinator in the selector raises the degree by
one. A selector with `k` descendant combinators takes `O(n^(k+1))` time
on a chain of `n` nested elements.

An attacker who controls the HTML or XML that an application passes to
Soup Sieve (directly, or through Beautiful Soup's `select()`,
`select_one()`, `css.select()`, etc.) can send a very small, deeply
nested document that keeps a CPU busy for seconds to minutes against an
ordinary selector such as `section div div`.

##### Details

To match `a b`, Soup Sieve checks each element against `b` and then
walks up through its ancestors looking for one that matches `a`. When
the selector has more descendant combinators, the rest of the selector
is tried again from each ancestor on that walk, and so on for every
combinator. Nothing was reused between walks, so the same ancestors were
matched against the same part of the selector over and over.

The worst case is when the leftmost part of the selector never matches,
as in `section div div` against a document of nested `<div>` with no
`<section>`: every walk goes all the way to the root and no search can
stop early.

##### Timings

Example timings with `html.parser` on Soup Sieve 3.0.4 and 4.0, using a
document of nested `<div>` (5 bytes each) and no matches:

| Nesting depth | Input size | Selector | 3.0.4 | 4.0 |
| --- | --- | --- | --- | --- |
| 2,000 | 10 KB | `section div` | 1.6 s | 0.05 s |
| 4,000 | 20 KB | `section div` | 5.1 s | 0.01 s |
| 400 | 2 KB | `section div div` | 6.7 s | < 0.01 s |
| 800 | 4 KB | `section div div` | 53.0 s | < 0.01 s |
| 100 | 0.5 KB | `section div div div` | 2.5 s | < 0.01 s |
| 200 | 1 KB | `section div div div` | 40.9 s | < 0.01 s |

None of these selectors use unusual syntax.

##### Proof of concept

```py
import time
import bs4
import soupsieve as sv

soup = bs4.BeautifulSoup('<div>' * 200, 'html.parser')
t = time.process_time()
sv.select('section div div div', soup)
print(time.process_time() - t)
```

On affected versions, doubling the nesting depth multiplies the time by
about 2^(k+1), where `k` is the number of descendant combinators: about
4x for `section div`, 8x for `section div div`, and 16x for `section div
div div`.

##### Impact

Applications are affected if they run selectors with descendant
combinators against documents that untrusted users can influence, such
as scrapers, HTML sanitizers or filters, and services that process
uploaded or fetched markup. Descendant combinators are among the most
common parts of CSS selectors, and a document of about 1 KB is enough to
tie up a worker for close to a minute. Applications that only run
selectors against trusted documents are not affected.

##### Patches

Fixed in 4.0 by
[facelessuser/soupsieve#351](https://redirect.github.com/facelessuser/soupsieve/pull/351).
Whether an element is, or has an ancestor that is, a match for part of a
selector depends only on its parent, so Soup Sieve now caches that
result per element and relation for every element visited on the walk.
Each descendant combinator is then linear in the size of the document.
Results are unchanged, and ordinary documents are no slower.

Caching is enabled by default, so no changes are needed beyond
upgrading. The `NOCACHE` flag is a temporary fallback for users who run
into problems with caching, and it is planned for removal. It uses the
old uncached matching, so selectors compiled with `NOCACHE` are still
subject to polynomial time and shouldn't be used with descendant
combinators on untrusted input.

##### Workarounds

If users can't upgrade:

- Use as few descendant combinators as they can in selectors that run on
untrusted documents. Where the structure of the
document is known, the child combinator (`a > b`) only looks at the
parent and is not affected.
- Limit the size and nesting depth of untrusted documents before
selecting on them.
- Run selection on untrusted input with a time limit, for example in a
worker process that can be stopped.

#### Severity
- CVSS Score: 7.5 / 10 (High)
- Vector String: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

#### References
-
[https://github.com/facelessuser/soupsieve/security/advisories/GHSA-mmhr-3c5m-f64f](https://redirect.github.com/facelessuser/soupsieve/security/advisories/GHSA-mmhr-3c5m-f64f)
-
[https://nvd.nist.gov/vuln/detail/CVE-2026-126190](https://nvd.nist.gov/vuln/detail/CVE-2026-126190)
-
[https://github.com/facelessuser/soupsieve/pull/351](https://redirect.github.com/facelessuser/soupsieve/pull/351)
-
[https://github.com/facelessuser/soupsieve/commit/ff1a5ce7e5addc31626d7b6053511fecdb4f6320](https://redirect.github.com/facelessuser/soupsieve/commit/ff1a5ce7e5addc31626d7b6053511fecdb4f6320)
-
[https://github.com/facelessuser/soupsieve/releases/tag/4.0](https://redirect.github.com/facelessuser/soupsieve/releases/tag/4.0)
-
[https://github.com/advisories/GHSA-mmhr-3c5m-f64f](https://redirect.github.com/advisories/GHSA-mmhr-3c5m-f64f)

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

---

### Release Notes

<details>
<summary>facelessuser/soupsieve (soupsieve)</summary>

###
[`v4.0`](https://redirect.github.com/facelessuser/soupsieve/releases/tag/4.0)

[Compare
Source](https://redirect.github.com/facelessuser/soupsieve/compare/3.0.4...4.0)

#### 4.0

- **BREAK**: The contents of an HTML `template` are no longer treated as
part of the document. Selectors do not
descend into a `template`, and elements inside one can't see beyond it,
which also applies to pseudo-classes such
as `:lang()`, `:disabled`, and `:default`. `select` and `filter` will
still reach the contents of a `template` when
they are called on the `template` itself, for example
`soup.template.select('p')`. See the
  [FAQ](../faq.md#how-does-template-handling-work) for more information.
- **BREAK**: The contents of an `iframe` are no longer treated as a
separate document, as they are not one in a
browser. Elements in an `iframe` are normal children, so `:root` does
not match them, and `:default`,
`:indeterminate`, `:checked`, `:dir()`, `:lang()`, and `:read-write`
treat them like any other element. Recent
versions of `html.parser`, `lxml`, and `html5lib` all escape the
contents of an `iframe` like a browser does, so
this mostly affects XHTML, Python versions that still don't escape such
content in their specific `html.parser`,
and elements added to an `iframe` by hand. `:-soup-contains()` now also
includes the escaped text in an `iframe`.
See the [FAQ](../faq.md#how-does-iframe-handling-work) for more
information.
- **NEW**: Update `:disabled` and `:enabled` to treat `option` and
`optgroup` elements inside a disabled `select` as
  disabled, following a recent HTML specification update.
- **FIX**: Fix the subsequent-sibling combinator and `:has(~ ...)` never
matching top level elements of a fragment
  that has no root element, unless caching was disabled.
- **FIX**: `:indeterminate` now treats a radio button group without a
form as extending across the whole document
instead of the top level element that contains it, and it no longer
ignores radio buttons at the top level.
- **FIX**: Fix `:default` to treat a `button` with a missing or invalid
`type`, and an `input` with `type="image"`,
  as submit buttons.
- **FIX**: Fix `:in-range` and `:out-of-range` raising `TypeError` when
the document contains an `input` without a
  `type` attribute.
- **FIX**: `:read-write` (and `:read-only`) now treat
`contenteditable="plaintext-only"` elements as editing hosts and
match the editable elements inside an editing host, following the
nearest `contenteditable` state.
- **FIX**: `:read-write` (and `:read-only`) now ignore `contenteditable`
on non-HTML elements, such as an SVG
`foreignObject`, as the attribute only applies to HTML elements. Such
elements inherit the state of their parent.
- **FIX**: `:checked` now only matches the last radio button with a
`checked` attribute in a radio button group, as
in a browser, where a group is the radio buttons with the same `name`
and form, including the `form` attribute.
`:default` still matches all of them, and the contents of a `template`
are unaffected as they are not connected.
- **FIX**: `:dir()` and `:defined` no longer affect the rest of the
selector list they are in. Previously, a selector
list that used either of them could not have its combinators cross an
`iframe`, ignored the specified namespaces,
and matched nothing in XML, not even the parts that didn't use them.
They still do not match in XML, but
  `:not(:dir(ltr))` and `:not(:defined)` now do.
- **FIX**: `:default` and `:indeterminate` now honor the `form`
attribute, which can associate a submit button or
radio button with a form it is not in, or leave it without a form. It is
ignored in a `template`, as in the HTML
specification. Submit buttons outside of a form can now be its default
button.
- **FIX**: `:default`, `:checked`, and `:indeterminate` now handle a
form inside a form like a browser. In HTML, a
browser ignores the nested form and takes its end tag for that of the
parent, which matters for parsers that keep
the nested form, such as `html.parser`. In XHTML and in a `template`,
nested forms are real forms.
- **FIX**: `:checked` now matches the `option` that a browser would
select. Without `multiple`, that is only the
last `option` with a `selected` attribute in a `select`, and if there
are none and the `select` shows a single
option, the first `option` that is not disabled. `:default` still only
considers the `selected` attribute.
- **FIX**: Fix `[attribute!=value]` excluding values that only start
with the specified value, and in XML documents,
  `type` values that contain a newline.
- **FIX**: Match the values of every attribute that the HTML
specification lists as ASCII case insensitive (`rel`,
`method`, `lang`, `dir`, ...) without ASCII case sensitivity on HTML
elements in HTML documents, not just `type`.
  Non-HTML elements are matched case sensitively.
- **FIX**: `:dir()` now matches non-HTML elements, such as SVG and
MathML, by the direction they inherit from their
parent (the `dir` attribute only applies to HTML elements), and HTML
elements inside them, such as in an SVG
  `foreignObject`, by the direction of their ancestors.
- **FIX**: Fix `:dir()` ignoring the value of an `input` with
`dir="auto"` and a missing or empty `type`.
- **FIX**: `:dir()` now uses a table generated from Unicode 18 instead
of `unicodedata`, so results no longer depend
on the Unicode version of the Python in use, and unassigned code points
use their default direction.
- **FIX**: `:dir()` now uses the value of an `input` with `dir="auto"`
when `type` is `hidden`, `password`, `submit`,
  `reset`, or `button`, as the HTML specification does.
- **FIX**: `dir="auto"` and `bdi` now analyze the text of non-HTML
elements, such as SVG and MathML, and only ignore
HTML elements such as `script`, `style`, and `bdi`. The text directly in
an `iframe` is analyzed as well, and the
  contents of a `template`, which are not part of the document, are not.
- **FIX**: `:dir()` no longer lets the contents of a `template` inherit
direction from the `template` or its
ancestors, as they are not part of the document. They are left to right
unless they specify otherwise.
- **FIX**: `:dir()` now matches a `bdi` element that is the root by its
text instead of assuming left to right.
- **FIX**: `:dir()` now treats any element without a parent element as
left to right, not just the root. Before,
all but the first top level element of a fragment parsed with
`html.parser` never matched.
- **FIX**: `:dir()` now accepts any identifier, as CSS requires,
including escaped ones. Values other than `ltr` and
  `rtl` do not match anything.
- **FIX**: Respect namespaces provided by the parser when the root is
not an HTML element, such as an `svg` element
extracted from an `html5lib` document. Previously every element in such
a tree was treated as an HTML element,
which affected namespace selectors, namespaced attributes, and HTML
specific pseudo-classes.
- **FIX**: Fix `:lang()` treating an element with an empty `lang` or
`xml:lang` attribute as having the language of
  a tagged ancestor.
- **FIX**: Cache forms without a default button when matching `:default`
to avoid quadratic time on forms with
  many non-default submit candidates.
- **FIX**: Fix `:in-range` and `:out-of-range` matching elements whose
value, `min`, or `max` has a trailing newline;
per HTML, such values are not valid, so they are treated like a missing
value and cannot be out of range.
- **FIX**: Fix `:in-range` and `:out-of-range` raising `ValueError` when
a date, month, week, or local date and
time `input` has a year with more digits than Python will convert; such
a year is now treated as invalid.
- **FIX**: Fix `:in-range` and `:out-of-range` not recognizing a
`datetime-local` value, `min`, or `max` that uses a
  single space instead of `T` to separate the date and time.
- **FIX**: Search a form only once for checked radio buttons when
matching `:indeterminate` to avoid quadratic time
  on forms with many radio button groups.
- **FIX**: `:lang()` now uses the `lang` attribute of SVG elements, as
the HTML specification does (with `xml:lang`
taking precedence). Previously only `xml:lang` was considered for
elements outside the HTML namespace.
- **FIX**: `:defined` no longer matches HTML elements with an `is`
attribute (customized built-in elements), which,
  like custom elements, are undefined until they are registered.
- **FIX**: Cache the index of each child when matching the general
sibling combinator (`a ~ b` and `:has(~ b)`) to
avoid quadratic time when the first matching sibling is far into a long
list of siblings.
- **FIX**: Match attribute values with the `i` modifier using ASCII case
insensitivity.
- **FIX**: Treat an `input` with an unknown `type`, such as
`type="foo"`, as a text input in `:placeholder-shown`,
`:read-write`, `:read-only` and `:dir()`, as an invalid `type` is in the
Text state in the HTML specification.
- **FIX**: Fix `:enabled` and `:disabled` never matching `input`
elements with `type="hidden"`.
- **FIX**: `:required` no longer matches `input` elements of types the
`required` attribute does not apply to
(`hidden`, `range`, `color`, `submit`, `image`, `reset` and `button`).
Like in browsers, they match `:optional`.
- **FIX**: Cache whether an element is or has a matching ancestor when
matching the descendant combinator (`a b`) to
avoid time that grows with the depth of the document to the power of the
number of combinators.

###
[`v3.0.4`](https://redirect.github.com/facelessuser/soupsieve/releases/tag/3.0.4)

[Compare
Source](https://redirect.github.com/facelessuser/soupsieve/compare/3.0.3...3.0.4)

#### 3.0.4

- **FIX**: Keep own and descendant text separate when combining
`:-soup-contains()` and `:-soup-contains-own()`.
- **FIX**: Cache resolved directionality when matching `:dir()` to avoid
quadratic time on deeply nested
  `dir="auto"` elements.
- **FIX**: Fix `auto` handling in regard to `:dir()` selector. When an
element with `dir="auto"` (or a `<bdi>`)
contains no strong direction characters, it should be assumed as
left-to-right and not assume the direction of the
  parent.
- **FIX**: Match numeric input ranges correctly when values or bounds
use scientific notation.
- **FIX**: Fix `:in-range` and `:out-of-range` raising `ValueError` for
`week` inputs whose week-year is 10000 or
  greater.
- **FIX**: Fix `:nth-last-child(an+b of S)` matching the wrong elements
when the first sibling tested does not
  match `S`.
- **FIX**: `escape()` now only leaves non-ASCII identifier code points
unescaped, as defined by the CSS specification.
  All other non-ASCII characters are escaped.
- **FIX**: Allow unescaped U+0080 - U+009F characters in identifiers to
match browser behavior.
- **FIX**: Fix `:in-range` and `:out-of-range` treating `time` and
`datetime-local` values with seconds as
  invalid.

###
[`v3.0.3`](https://redirect.github.com/facelessuser/soupsieve/releases/tag/3.0.3)

[Compare
Source](https://redirect.github.com/facelessuser/soupsieve/compare/3.0.2...3.0.3)

#### 3.0.3

- **FIX**: When matching with `>`, the `BeautifulSoup` object should not
count as a parent.
- **FIX**: Fix case where relative sibling matching under `:has(~)`
would incorrectly match a sibling that came before
  the target element.

###
[`v3.0.2`](https://redirect.github.com/facelessuser/soupsieve/releases/tag/3.0.2)

[Compare
Source](https://redirect.github.com/facelessuser/soupsieve/compare/3.0.1...3.0.2)

#### 3.0.2

- **FIX**: Python versions less than 3.11.5 have broken possessive
quantifiers, so require at least 3.11.5 for Soup
Sieve 3.0+. 3.0 and 3.0.1 will be yanked from PyPI to avoid having the
3.0 series installed on Python < 3.11.5
  which will cause the library to be broken.

###
[`v3.0.1`](https://redirect.github.com/facelessuser/soupsieve/releases/tag/3.0.1)

[Compare
Source](https://redirect.github.com/facelessuser/soupsieve/compare/3.0...3.0.1)

#### 3.0.1

- **FIX**: Fix regression related to `[attribute!=value]` where
previously it would match if the attribute was not
present and recent changes broke that. Essentially, `[attribute!=value]`
should be the same as
  `:not([attribute=value])`.

###
[`v3.0`](https://redirect.github.com/facelessuser/soupsieve/releases/tag/3.0)

[Compare
Source](https://redirect.github.com/facelessuser/soupsieve/compare/2.10...3.0)

#### 3.0

- **BREAK**: `:has()`, by default, now behaves according to CSS more
strictly, disallowing complex selectors that use
combinators and prevents nesting `:has()` within `:has()`. This gives a
safer, more performant default for Soup
Sieve. If in a safe environment, these restrictions can be lifted by
passing the new `NOSTRICT` flag restoring
  behavior to before 3.0.
- **BREAK**: Custom selectors must be provided in order. If one custom
selector depends on another custom selector,
the custom selector dependency must be defined first in the dictionary.
This eliminates recursive processing of
custom selectors. Users are encouraged to pre-compile custom selectors
via
  `my_selectors = soupsive.CustomSelectors({custm: selector, ...})`.
- **NEW**: Drop Python 3.10.
- **NEW**: Aggressively use possessive quantifiers and atomic groups in
CSS pattern parsing to reduce backtracking.
- **NEW**: Eliminate recursion within the parser and the matcher.
- **NEW**: Expose new parameter `max_selectors` that can be used to
control the maximum allowed selectors in a given
  input.
- **FIX**: A CSS escape that is a surrogate, or past the Unicode range,
is `U+FFFD`.
([#&#8203;307](https://redirect.github.com/facelessuser/soupsieve/issues/307))

###
[`v2.10`](https://redirect.github.com/facelessuser/soupsieve/releases/tag/2.10)

[Compare
Source](https://redirect.github.com/facelessuser/soupsieve/compare/2.9.2...2.10)

##### 2.10

- **NEW**: Support Python 3.15.
- **NEW**: Add new `ignore` option to API methods that allows the
specification of specific pseudo-classes to be
  ignored.
- **NEW**: Tighten restrictions such that `namespaces` and `custom`
objects must always be a Mapping, previously lists
  of tuples were also allowed.
- **NEW**: Use a singleton for null selectors internally via called
`Null` of type `SelectorNull`.
- **NEW**: For performance, Soup Sieve will no longer try and coerce bad
attribute values to useable strings.
- **NEW**: Add `NOCACHE` flag that can be used to disable caching
optimizations selectors and possibly other future
caching optimizations. Provided for disabling and also disabling if
issues are found with the new caching approach.
- **FIX**: Improve performance of `~` for various cases by employing
caching.
- **FIX**: Improve performance of `nth-*` family of selectors in certain
scenarios by employing caching.
- **FIX**: Ensure `custom` is properly passed down from API functions to
compilation.

</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:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjguMCIsInVwZGF0ZWRJblZlciI6IjQ0LjIyOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCIsInNlY3VyaXR5Il19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-11-13 17:28:40 +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
David Peter fca4b6eb67 [ty] Pick up the schema_salad ecosystem setup fix (#30136)
Update Ruff's locked `ecosystem-analyzer` revision to pick up the
`schema_salad` setup fix. Align the setup script's `mypy-primer` lock
with the analyzer. [ecosystem-analyzer
#246](https://github.com/astral-sh/ecosystem-analyzer/pull/246) ·
[mypy_primer #275](https://github.com/hauntsaninja/mypy_primer/pull/275)

The lock checks passed, and the setup script installed `schema_salad` at
`0fd6c25fb0` with the dependency cutoff from the failing ecosystem run.
`uv pip check` passed.
2026-11-06 15:24:47 +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
William Woodruff 49ef18ab7b Use jaq from the Astral dev toolchain in CI (#29922)
Signed-off-by: William Woodruff <william@yossarian.net>
2026-11-04 12:45:55 -05:00
renovate[bot] 1abd01c669 Update dependency prek to v0.5.5 (#29999) 2026-11-04 00:49:58 -08:00
Alex Waygood 7fcdf2d60f Update msgpack to 1.2.3 in the release environment (#29834) 2026-10-29 22:15:35 +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
Alex Waygood 10056500e0 Update uv to 0.13.5 (#29659) 2026-10-22 23:29:36 +00:00
renovate[bot] ca20f90dde Update dependency black to v26.10.1 (#29638) 2026-10-22 11:06:57 -07: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
Alex Waygood 89d80d30d2 Exempt uv from the dependency cooldown (#29554)
Exempt the Astral-maintained uv package from the seven-day dependency
cooldown, replacing the temporary uv cutoff added in #29551. This allows
lockfile updates to select new uv releases without waiting seven days.

Codex prepared this update.
2026-10-20 21:14:21 +00:00
Alex Waygood f71f169f6f Update uv after the eMudhra incident (#29551)
The [eMudhra incident](https://emudhra.we-have-a-problem.com/)
compromised intermediate CA keys that could be used to impersonate HTTPS
sites. uv 0.13.4 removes the emSign root that anchors the affected
intermediates from its bundled trust store.

Update the uv versions used in CI and by the uv-lock hook, and the
locked uv dependency. A uv-specific cutoff allows the updated release
through the seven-day dependency waiting period.

Codex prepared this update.
2026-10-20 20:44:34 +00:00
konsti e02754d1fb Update certifi to 2026.10.19 (#29538)
Update the locked certifi dependency to 2026.10.19. The package-specific
cutoff can be removed after 2026-10-27.

Addresses
[GHSA-6q48-6c7w-9gw2](https://github.com/certifi/python-certifi/security/advisories/GHSA-6q48-6c7w-9gw2).
2026-10-20 16:46:58 +02:00
Alex Waygood 34266aa483 Update transitive urllib3 dependency (#29522) 2026-10-19 17:44:58 -07:00
Alex Waygood 24bba09655 Update transitive anyio dependency (#29519) 2026-10-19 17:44:34 -07:00
Zanie Blueandzaniebot c79af46103 Require hashes for build dependencies (#29336)
Enable `require-build-hashes` for the Python projects and inline scripts
so isolated builds require declared hashes for their build dependencies.
Pin the build backends and their dependencies with hashes.

---------

Co-authored-by: zaniebot <242828183+zaniebot@users.noreply.github.com>
2026-10-15 20:15:23 +01:00
astral-automations-bot[bot] 4683270c69 Bump version to 0.17.1 (#29420)
Co-authored-by: astral-automations-bot[bot] <305554984+astral-automations-bot[bot]@users.noreply.github.com>
2026-10-15 10:56:41 -04:00
renovate[bot] 8fce8f4359 Update dependency prek to v0.5.3 (#29348)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [prek](https://prek.j178.dev/)
([source](https://redirect.github.com/j178/prek),
[changelog](https://redirect.github.com/j178/prek/blob/master/CHANGELOG.md))
| `==0.5.2` → `==0.5.3` |
![age](https://developer.mend.io/api/mc/badges/age/pypi/prek/0.5.3?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/prek/0.5.2/0.5.3?slim=true)
|

---

### Release Notes

<details>
<summary>j178/prek (prek)</summary>

###
[`v0.5.3`](https://redirect.github.com/j178/prek/blob/HEAD/CHANGELOG.md#053)

[Compare
Source](https://redirect.github.com/j178/prek/compare/v0.5.2...v0.5.3)

Released on 2026-09-13.

##### Enhancements

- Add PEP 740 attestations for PyPI releases
([#&#8203;2705](https://redirect.github.com/j178/prek/pull/2705))
- Add a `check-jsonc` builtin hook
([#&#8203;2682](https://redirect.github.com/j178/prek/pull/2682))
- Allow disabling automatic uv installation
([#&#8203;2702](https://redirect.github.com/j178/prek/pull/2702))

##### Bug fixes

- Fix Julia additional dependency specifiers
([#&#8203;2703](https://redirect.github.com/j178/prek/pull/2703))
- Update `granit-parser` to fix YAML flow indentation
([#&#8203;2707](https://redirect.github.com/j178/prek/pull/2707))

##### Contributors

- [@&#8203;clbarnes](https://redirect.github.com/clbarnes)
- [@&#8203;j178](https://redirect.github.com/j178)
- [@&#8203;tisonkun](https://redirect.github.com/tisonkun)

</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:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNTUuMiIsInVwZGF0ZWRJblZlciI6IjQ0LjE1NS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-14 12:14:39 +01:00
Alex Waygood ef1dfb18ac [ty] Use the Black release for typeshed formatting (#29115)
Black 26.10.0’s preview style adds missing blank lines after stub
functions whose bodies contain only a docstring, without inserting blank
lines within overload groups. Previously, this formatting behavior
required installing Black from Git. Switch typeshed formatting to the
released wheel so that Black no longer needs an exception to `no-build`,
and remove its unused build constraints.
2026-10-13 19:07:10 +01:00
astral-automations-bot[bot]andBrent Westbrook 5b27c1ccfa Bump version to 0.17.0 (#29259)
Co-authored-by: astral-automations-bot[bot] <305554984+astral-automations-bot[bot]@users.noreply.github.com>
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
2026-10-09 13:45:29 -04:00
Dhruv Manilawala 28ae9fbc68 Remove retired ruff-lsp compatibility CI (#28751)
Remove the deprecated `ruff-lsp` compatibility CI job, its dependency
group and Python constraint, and the associated `pygls` Renovate rule.
Prune ten unused packages from the root lockfile while preserving all
remaining package versions and Git revisions.

Related: https://github.com/astral-sh/ruff/issues/28545,
https://github.com/astral-sh/ruff-vscode/pull/1170
2026-10-09 12:26:57 -04:00
David Peter d1d6a5d4ae [ty] Upgrade hyperfine to 2.0.0 for benchmarks (#29219)
Follow-up to #29151: upgrade the benchmark dependency from hyperfine
2.0.0-alpha.2 to 2.0.0.

Use `--env RAYON_NUM_THREADS=1` instead of an `env` command prefix for
the single-threaded formatter benchmarks. This avoids measuring the
overhead of `env` itself (~5 ms).
2026-10-08 13:34:20 +02:00
renovate[bot] 35f1b2a242 Update dependency prek to v0.5.2 (#29159)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [prek](https://prek.j178.dev/)
([source](https://redirect.github.com/j178/prek),
[changelog](https://redirect.github.com/j178/prek/blob/master/CHANGELOG.md))
| `==0.5.0` → `==0.5.2` |
![age](https://developer.mend.io/api/mc/badges/age/pypi/prek/0.5.2?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/prek/0.5.0/0.5.2?slim=true)
|

---

### Release Notes

<details>
<summary>j178/prek (prek)</summary>

###
[`v0.5.2`](https://redirect.github.com/j178/prek/blob/HEAD/CHANGELOG.md#052)

Released on 2026-09-03.

##### Enhancements

- Allow unknown tags by default in `check-yaml`
([#&#8203;2678](https://redirect.github.com/j178/prek/pull/2678))

##### Contributors

- [@&#8203;j178](https://redirect.github.com/j178)

###
[`v0.5.1`](https://redirect.github.com/j178/prek/blob/HEAD/CHANGELOG.md#051)

Released on 2026-09-01.

##### Enhancements

- Add `--hide-status <passed|failed|skipped>` for hook reports
([#&#8203;2644](https://redirect.github.com/j178/prek/pull/2644))
- Add `prek init` for repository setup
([#&#8203;2636](https://redirect.github.com/j178/prek/pull/2636))
- Apply hook `env` during environment creation
([#&#8203;2650](https://redirect.github.com/j178/prek/pull/2650))
- Disable error snippets in `check-yaml` diagnostics
([#&#8203;2664](https://redirect.github.com/j178/prek/pull/2664))
- Show hooks excluded by skip selectors
([#&#8203;2645](https://redirect.github.com/j178/prek/pull/2645))
- Support Pixi for Conda environments
([#&#8203;2667](https://redirect.github.com/j178/prek/pull/2667))
- Support `cargo-binstall` for Rust CLI dependencies
([#&#8203;2658](https://redirect.github.com/j178/prek/pull/2658))
- Warn about unused keys in user settings
([#&#8203;2665](https://redirect.github.com/j178/prek/pull/2665))

##### Bug fixes

- Reject unsupported YAML tags in check-yaml
([#&#8203;2656](https://redirect.github.com/j178/prek/pull/2656))

##### Documentation

- Clarify local hook documentation
([#&#8203;2640](https://redirect.github.com/j178/prek/pull/2640))
- Clarify pre-commit command compatibility
([#&#8203;2635](https://redirect.github.com/j178/prek/pull/2635))
- Document automatic PR fixes with autofix.ci
([#&#8203;2643](https://redirect.github.com/j178/prek/pull/2643))
- Document check-yaml unsafe support
([#&#8203;2632](https://redirect.github.com/j178/prek/pull/2632))
- Improve setup and workflow documentation
([#&#8203;2637](https://redirect.github.com/j178/prek/pull/2637))

##### Other changes

- Drop low-usage release targets
([#&#8203;2651](https://redirect.github.com/j178/prek/pull/2651))
- Generate a prek manifest JSON schema
([#&#8203;2648](https://redirect.github.com/j178/prek/pull/2648))

##### Contributors

- [@&#8203;j178](https://redirect.github.com/j178)

</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:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-07 10:25:55 -04:00
David Peter db2a4a9216 [ty] Upgrade hyperfine to 2.0.0-alpha.2 for benchmarks (#29151)
## Summary

Upgrade hyperfine to 2.0.0-alpha.2, which now includes support for
memory measurements (see output below).

Tested:

<details>
<summary>Formatter benchmark output</summary>

```text
Benchmark 1: ./target/release/ruff format ./fixture (2 runs)
                mean     ±       σ          min     …     max
  Wall Time     12.8 ms  ±     0.2 ms      12.7 ms  …    12.9 ms
  Memory        16.6 MiB ±     0.1 MiB     16.5 MiB …    16.6 MiB
 
Benchmark 2: black --no-cache ./fixture --safe (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    207.1 ms  ±     4.8 ms     203.7 ms  …   210.5 ms         +1517.9%  (16.2x slower)
  Memory        37.3 MiB ±     0.1 MiB     37.2 MiB …    37.4 MiB         +125.2%  (2.3x more)
 
Benchmark 3: black --no-cache ./fixture --fast (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    226.6 ms  ±     7.4 ms     221.4 ms  …   231.9 ms         +1670.7%  (17.7x slower)
  Memory        37.4 MiB ±     0.1 MiB     37.3 MiB …    37.5 MiB         +126.2%  (2.3x more)
 
Benchmark 4: black --no-cache ./fixture --safe --preview (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    250.1 ms  ±    41.8 ms     220.6 ms  …   279.6 ms         +1854.3%  (19.5x slower)
  Memory        37.4 MiB ±     0.3 MiB     37.2 MiB …    37.6 MiB         +126.0%  (2.3x more)
 
Benchmark 5: black --no-cache ./fixture --fast --preview (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    186.2 ms  ±     2.5 ms     184.5 ms  …   188.0 ms         +1355.1%  (14.6x slower)
  Memory        37.3 MiB ±     0.0 MiB     37.3 MiB …    37.3 MiB         +125.2%  (2.3x more)
 
Benchmark 6: autopep8 ./fixture --recursive --in-place (2 runs)
                mean     ±       σ          min     …     max
  Wall Time     41.6 ms  ±     0.7 ms      41.1 ms  …    42.1 ms          +225.2%  (3.3x slower)
  Memory        26.3 MiB ±     0.0 MiB     26.3 MiB …    26.3 MiB          +58.8%  (1.6x more)
 
Benchmark 7: yapf ./fixture --parallel --recursive --in-place (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    142.1 ms  ±     4.8 ms     138.7 ms  …   145.5 ms         +1010.6%  (11.1x slower)
  Memory        29.1 MiB ±     0.3 MiB     28.9 MiB …    29.4 MiB          +76.0%  (1.8x more)
 
Benchmark 1: env RAYON_NUM_THREADS=1 ./target/release/ruff format ./fixture (2 runs)
                mean     ±       σ          min     …     max
  Wall Time     12.7 ms  ±     2.5 ms      10.9 ms  …    14.4 ms
  Memory        14.6 MiB ±     0.1 MiB     14.6 MiB …    14.7 MiB
 
Benchmark 2: black --no-cache ./fixture --workers=1 --safe (2 runs)
                mean     ±       σ          min     …     max
  Wall Time     95.2 ms  ±     3.2 ms      92.9 ms  …    97.4 ms          +650.6%  (7.5x slower)
  Memory        38.4 MiB ±     0.0 MiB     38.4 MiB …    38.4 MiB         +162.6%  (2.6x more)
 
Benchmark 3: black --no-cache ./fixture --workers=1 --fast (2 runs)
                mean     ±       σ          min     …     max
  Wall Time     89.6 ms  ±     2.8 ms      87.6 ms  …    91.6 ms          +606.5%  (7.1x slower)
  Memory        38.4 MiB ±     0.0 MiB     38.4 MiB …    38.4 MiB         +162.7%  (2.6x more)
 
Benchmark 4: black --no-cache ./fixture --workers=1 --safe --preview (2 runs)
                mean     ±       σ          min     …     max
  Wall Time     94.7 ms  ±     0.6 ms      94.3 ms  …    95.2 ms          +646.9%  (7.5x slower)
  Memory        38.5 MiB ±     0.1 MiB     38.5 MiB …    38.6 MiB         +163.5%  (2.6x more)
 
Benchmark 5: black --no-cache ./fixture --workers=1 --fast --preview (2 runs)
                mean     ±       σ          min     …     max
  Wall Time     92.7 ms  ±     0.6 ms      92.3 ms  …    93.2 ms          +631.4%  (7.3x slower)
  Memory        38.4 MiB ±     0.1 MiB     38.3 MiB …    38.4 MiB         +162.5%  (2.6x more)
 
Benchmark 6: autopep8 ./fixture --in-place --recursive --jobs=1 (2 runs)
                mean     ±       σ          min     …     max
  Wall Time     43.5 ms  ±     3.7 ms      40.9 ms  …    46.1 ms          +242.7%  (3.4x slower)
  Memory        26.5 MiB ±     0.1 MiB     26.4 MiB …    26.6 MiB          +81.2%  (1.8x more)
 
Benchmark 7: yapf ./fixture --recursive --in-place (2 runs)
                mean     ±       σ          min     …     max
  Wall Time     56.8 ms  ±     1.2 ms      55.9 ms  …    57.6 ms          +347.8%  (4.5x slower)
  Memory        27.3 MiB ±     0.1 MiB     27.2 MiB …    27.4 MiB          +86.5%  (1.9x more)
 
Benchmark 1: ./target/release/ruff format ./fixture --check (2 runs)
                mean     ±       σ          min     …     max
  Wall Time     10.2 ms  ±     0.3 ms       9.9 ms  …    10.4 ms
  Memory        16.9 MiB ±     0.1 MiB     16.8 MiB …    17.0 MiB
 
Benchmark 2: black --no-cache ./fixture --check --safe (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    193.8 ms  ±     6.2 ms     189.5 ms  …   198.2 ms         +1806.9%  (19.1x slower)
  Memory        37.3 MiB ±     0.1 MiB     37.2 MiB …    37.4 MiB         +120.8%  (2.2x more)
 
Benchmark 3: black --no-cache ./fixture --check --fast (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    188.2 ms  ±     1.9 ms     186.8 ms  …   189.6 ms         +1751.4%  (18.5x slower)
  Memory        37.3 MiB ±     0.1 MiB     37.3 MiB …    37.4 MiB         +121.1%  (2.2x more)
 
Benchmark 4: black --no-cache ./fixture --check --safe --preview (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    202.1 ms  ±     6.3 ms     197.7 ms  …   206.6 ms         +1888.5%  (19.9x slower)
  Memory        37.2 MiB ±     0.0 MiB     37.2 MiB …    37.2 MiB         +120.5%  (2.2x more)
 
Benchmark 5: black --no-cache ./fixture --check --fast --preview (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    197.0 ms  ±    20.1 ms     182.8 ms  …   211.2 ms         +1837.8%  (19.4x slower)
  Memory        37.2 MiB ±     0.0 MiB     37.2 MiB …    37.2 MiB         +120.5%  (2.2x more)
 
Benchmark 6: autopep8 ./fixture --recursive --diff (2 runs)
                mean     ±       σ          min     …     max
  Wall Time     38.5 ms  ±     0.1 ms      38.4 ms  …    38.6 ms          +278.4%  (3.8x slower)
  Memory        26.3 MiB ±     0.0 MiB     26.3 MiB …    26.4 MiB          +56.0%  (1.6x more)
 
Benchmark 7: yapf ./fixture --parallel --recursive --quiet (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    144.8 ms  ±     7.4 ms     139.6 ms  …   150.1 ms         +1324.8%  (14.2x slower)
  Memory        29.0 MiB ±     0.2 MiB     28.9 MiB …    29.1 MiB          +71.6%  (1.7x more)
```

</details>

<details>
<summary>ty_benchmark (multi-threaded, then single-threaded)</summary>

```text
jinja
-----

Benchmark 1: ty (2 runs)
                mean     ±       σ          min     …     max
  Wall Time     73.0 ms  ±     5.6 ms      69.0 ms  …    76.9 ms
  Memory       100.1 MiB ±     0.1 MiB    100.0 MiB …   100.2 MiB
 
  Warning: Ignoring non-zero exit code.
 
Benchmark 2: Pyrefly (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    118.3 ms  ±     6.0 ms     114.0 ms  …   122.5 ms           +62.1%  (1.6x slower)
  Memory       130.9 MiB ±     0.2 MiB    130.8 MiB …   131.1 MiB          +30.8%  (1.3x more)
 
  Warning: Ignoring non-zero exit code.
 
Benchmark 3: mypy (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    802.9 ms  ±     8.0 ms     797.2 ms  …   808.6 ms         +1000.2%  (11.0x slower)
  Memory       143.4 MiB ±     0.1 MiB    143.3 MiB …   143.5 MiB          +43.2%  (1.4x more)
 
  Warning: Ignoring non-zero exit code.
 
Benchmark 4: mypy (warm) (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    208.8 ms  ±     5.6 ms     204.9 ms  …   212.7 ms          +186.1%  (2.9x slower)
  Memory        51.9 MiB ±     0.2 MiB     51.8 MiB …    52.0 MiB          -48.2%  (1.9x less)
 
  Warning: Ignoring non-zero exit code.
 
Benchmark 5: Pyright (2 runs)
                mean     ±       σ          min     …     max
  Wall Time   1198.8 ms  ±    12.0 ms    1190.3 ms  …  1207.3 ms         +1542.8%  (16.4x slower)
  Memory       251.6 MiB ±     1.3 MiB    250.7 MiB …   252.5 MiB         +151.3%  (2.5x more)
 
  Warning: Ignoring non-zero exit code.

jinja
-----

Benchmark 1: ty (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    226.1 ms  ±    14.0 ms     216.2 ms  …   236.0 ms
  Memory        84.9 MiB ±     0.2 MiB     84.8 MiB …    85.0 MiB
 
  Warning: Ignoring non-zero exit code.
 
Benchmark 2: Pyrefly (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    210.4 ms  ±     6.9 ms     205.5 ms  …   215.3 ms            -7.0%
  Memory        92.3 MiB ±     0.1 MiB     92.2 MiB …    92.4 MiB           +8.8%
 
  Warning: Ignoring non-zero exit code.
 
Benchmark 3: mypy (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    896.4 ms  ±    88.8 ms     833.7 ms  …   959.2 ms          +296.4%  (4.0x slower)
  Memory       144.3 MiB ±     0.6 MiB    143.9 MiB …   144.7 MiB          +70.0%  (1.7x more)
 
  Warning: Ignoring non-zero exit code.
 
Benchmark 4: mypy (warm) (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    213.0 ms  ±     3.7 ms     210.4 ms  …   215.6 ms            -5.8%
  Memory        51.7 MiB ±     0.1 MiB     51.6 MiB …    51.8 MiB          -39.1%  (1.6x less)
 
  Warning: Ignoring non-zero exit code.
 
Benchmark 5: Pyright (2 runs)
                mean     ±       σ          min     …     max
  Wall Time    981.9 ms  ±    13.0 ms     972.6 ms  …   991.1 ms          +334.2%  (4.3x slower)
  Memory       315.4 MiB ±     5.9 MiB    311.2 MiB …   319.5 MiB         +271.6%  (3.7x more)
 
  Warning: Ignoring non-zero exit code.
```

</details>

I also tested most of the other hyperfine invocations mentioned
somewhere in this repo.
2026-10-07 13:43:40 +00:00
Alex Waygood 5f34507931 Group uv workflow and pre-commit updates (#29111) 2026-10-05 14:01:42 +00:00
astral-automations-bot[bot]andBrent Westbrook 3265ed1f94 Bump version to 0.16.10 (#29055)
Co-authored-by: astral-automations-bot[bot] <305554984+astral-automations-bot[bot]@users.noreply.github.com>
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
2026-10-01 13:40:09 -04:00
Alex Waygood ccba26cc3a [ty] Bump docstring-adder pin (#29038) 2026-10-01 12:08:41 +00:00
Alex Waygood f7446a5970 [ty] Update ecosystem pins and refresh script lockfiles (#29017) 2026-09-30 10:38:07 +00:00
renovate[bot] 6b00b83f05 Update dependency prek to v0.5.0 (#29010) 2026-09-30 08:14:32 +02:00
Alex Waygood 0401be8069 [ty] Fix ecosystem dependency installation (#28883) 2026-09-24 21:55:11 +01:00
astral-automations-bot[bot]andBrent Westbrook 0be08a206f Bump version to 0.16.9 (#28882)
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-09-24 16:21:50 -04:00
William Woodruff 8defe19c5d Use cargo deny for dep enforcement (#28655)
Signed-off-by: William Woodruff <william@yossarian.net>
2026-09-17 13:55:45 -04:00
astral-automations-bot[bot]andBrent Westbrook 62914c4b9b Bump version to 0.16.8 (#28648)
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-09-16 11:31:02 -04:00
renovate[bot] 457b4578b6 Update dependency prek to v0.4.14 (#28625) 2026-09-16 08:15:52 +02:00
astral-automations-bot[bot]andBrent Westbrook b5dba861cc Bump version to 0.16.7 (#28496)
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-09-10 13:47:30 -04:00
Brent Westbrook 22f65a2ab5 Bump 0.16.6 (#28280) 2026-09-03 12:36:42 -04:00
William Woodruff f96c18b8ae Use cargo insta, cargo nextest, cargo codspeed from toolchain (#28210)
Signed-off-by: William Woodruff <william@yossarian.net>
2026-09-01 14:52:34 +00:00
William WoodruffandAlex Waygood 91a07f5e2d Lift cargo-fuzz into astral-dev-toolchain (#28200)
## Summary

Continues #28197 by lifting `cargo-fuzz` into the dev toolchain.

<!-- What's the purpose of the change? What does it do, and why? -->

## Test Plan

NFC, internal only. I confirmed that `./init-fuzzer.sh` still runs as
expected. I'm less positive about the CI changes.

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

---------

Signed-off-by: William Woodruff <william@yossarian.net>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2026-08-31 20:34:06 +00:00
William Woodruff da9e283158 Swap cargo shear and hyperfine to the Astral toolchain (#28197)
Signed-off-by: William Woodruff <william@yossarian.net>
2026-08-31 14:19:43 -04:00
David Peter 298858ebb6 [ty] Update ecosystem-analyzer (#28131)
## Summary

Bump ecosystem-analyzer from `fcce2284` to `a31ef389`, including:

- HTML escaping and restricted report links
([#181](https://github.com/astral-sh/ecosystem-analyzer/pull/181)).
- Git subprocess calls in place of GitPython
([#179](https://github.com/astral-sh/ecosystem-analyzer/pull/179)).
- Suppression of removed `unknown-rule` diagnostics in Markdown comments
([#182](https://github.com/astral-sh/ecosystem-analyzer/pull/182)).
2026-08-28 15:06:51 +02:00
Brent Westbrook 9e4938c4a6 Bump 0.16.5 (#28110) 2026-08-27 12:09:07 -04:00
David Peter eb78048803 [ty] Bump ecosystem-analyzer for HTML escaping (#28104)
Pick up https://github.com/astral-sh/ecosystem-analyzer/pull/180 to fix
HTML escaping in reports.
2026-08-27 13:37:15 +00:00
Micha Reiser a9fa5e59e5 [ty] Bump ecosystem-analyzer for script dependency preparation (#28058) 2026-08-26 12:39:00 +02:00
Brent Westbrook 11c76bf48f Bump 0.16.4 (#27937) 2026-08-20 13:14:29 -04:00
Alex Waygood 974d3cbc04 Upgrade ecosystem-analyzer and mypy_primer to the latest upstream pins (#27932) 2026-08-20 13:56:26 +00:00