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 initsoupsieve 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.
Soup Sieve 3.0+ requires Python 3.11.5 or later because earlier versions have broken possessive quantifiers.
Performance 1
Caches resolved directionality when matching :dir() to avoid quadratic time on deeply nested dir="auto" elements.
Fixes and other changes 9
Unescaped U+0080–U+009F characters in identifiers are allowed to match browser behavior.
Elements with dir="auto" or <bdi> and no strong direction characters are assumed left-to-right, rather than inheriting the parent's direction.
Prevents :in-range and :out-of-range from raising ValueError for week inputs whose week-year is 10000 or greater.
Corrects :in-range and :out-of-range handling of time and datetime-local values that include seconds.
Corrects matching for :nth-last-child(an+b of S) when the first sibling tested does not match S.
Numeric input ranges match correctly when values or bounds use scientific notation.
Keeps own and descendant text separate when combining :soup-contains() and :soup-contains-own().
When matching with
>, theBeautifulSoupobject no longer counts as a parent.Relative sibling matching under
:has(~)no longer incorrectly matches a sibling that came before the target element.