unstale

pypi / soupsieve

soupsieve

What changed in soupsieve 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.

2 breaking1 performance9 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.9 on npm

soupsieve 312 changes

Breaking changes 2

  • Only non-ASCII identifier code points remain unescaped; all other non-ASCII characters are escaped, as defined by the CSS specification.

    3.0.4release notes

  • Soup Sieve 3.0+ requires Python 3.11.5 or later because earlier versions have broken possessive quantifiers.

    3.0.2release notes

Performance 1

  • Caches resolved directionality when matching :dir() to avoid quadratic time on deeply nested dir="auto" elements.

    3.0.4release notes

Fixes and other changes 9

  • Unescaped U+0080–U+009F characters in identifiers are allowed to match browser behavior.

    3.0.4release notes

  • Elements with dir="auto" or <bdi> and no strong direction characters are assumed left-to-right, rather than inheriting the parent's direction.

    3.0.4release notes

  • Prevents :in-range and :out-of-range from raising ValueError for week inputs whose week-year is 10000 or greater.

    3.0.4release notes

  • Corrects :in-range and :out-of-range handling of time and datetime-local values that include seconds.

    3.0.4release notes

  • Corrects matching for :nth-last-child(an+b of S) when the first sibling tested does not match S.

    3.0.4release notes

  • Numeric input ranges match correctly when values or bounds use scientific notation.

    3.0.4release notes

  • Keeps own and descendant text separate when combining :soup-contains() and :soup-contains-own().

    3.0.4release notes

  • When matching with >, the BeautifulSoup object no longer counts as a parent.

    3.0.3release notes

  • Relative sibling matching under :has(~) no longer incorrectly matches a sibling that came before the target element.

    3.0.3release notes