soupsieve breaking changes
Updated December 4, 2026
On this page
Latest version 4.1.4, released December 1, 2026. Source repository
Its 3.0 release drops Python 3.10. Python end of life dates.
- From 3.0.4 to 4.1.4: 53 breaking changes in 6 versions.
- From 0.6 to 4.1.4: 277 breaking changes in 22 versions.
soupsieve 4.1.4 breaking changes
- Removed
soupsieve.css_match.CSSMatch.get_prefix
CSSMatch.get_prefix was removed in soupsieve 4.1.4 pypi.org - Removed
soupsieve.css_match.CSSMatch.get_prefix_name
CSSMatch.get_prefix_name was removed in soupsieve 4.1.4 pypi.org - Renamed
soupsieve.css_match.CSSMatch.is_customized_builtin
Use CSSMatch.names_insensitive instead. pypi.org - Behavior changed
On SVG and MathML elements in an HTML document, element names must now match exactly, so lineargradient no longer matches linearGradient. github.com - Behavior changed
On SVG and MathML elements in an HTML document, attribute names must now match exactly, so [viewbox] no longer matches viewBox. github.com - Behavior changed
:defined
Names reserved by HTML, such as font-face, are no longer treated as custom elements, and hyphenated names with a colon are no longer matched. Code relying on the previous matches must be updated. github.com - Behavior changed
[*|attr]
The selector now matches attributes such as xlink:href as well as plain attributes, and [*|attr!=value] matches only if none of the attributes has the value. github.com - Signature changed
soupsieve.css_match.CSSMatch.get_attribute_by_name
Was @classmethod def get_attribute_by_name(cls, el: bs4.Tag, name: str, default: str | Sequence[str] | None = None) -> str | Sequence[str] | None; now def get_attribute_by_name(self, el: bs4.Tag, name: str, default: str | Sequence[str] |... pypi.org - Signature changed
soupsieve.css_match.CSSMatch.get_classes
Was @classmethod def get_classes(cls, el: bs4.Tag) -> Sequence[str]; now def get_classes(self, el: bs4.Tag) -> Sequence[str]. pypi.org - Signature changed
soupsieve.css_match.CSSMatch.iter_attributes
Was @classmethod def iter_attributes(cls, el: bs4.Tag | None) -> Iterator[tuple[str, str | Sequence[str] | None]]; now @classmethod def iter_attributes(cls, el: bs4.Tag | None) -> Iterator[tuple[str, str | Sequence[str]]]. pypi.org - Signature changed
soupsieve.util.ascii_lower
Was def ascii_lower(string: str) -> str; now def ascii_lower(string: str, limit: int | None = None) -> str. pypi.org
soupsieve 4.1.3 breaking changes
- Signature changed
soupsieve.css_match.NthState.__init__
Was def __init__(self, pos: int, count: int, positions: dict[int, int]) -> None; now def __init__(self, pos: int, count: int, positions: dict[int, int], counts: dict[tuple[str | None, str], int] | None) -> None. pypi.org
soupsieve 4.1.2 breaking changes
- Removed
soupsieve.css_match.CSSMatch.cached_forms
CSSMatch.cached_forms was removed in soupsieve 4.1.2 pypi.org - Removed
soupsieve.css_match.CSSMatch.cached_meta_lang
CSSMatch.cached_meta_lang was removed in soupsieve 4.1.2 pypi.org - Removed
soupsieve.css_match.CSSMatch.cached_options
CSSMatch.cached_options was removed in soupsieve 4.1.2 pypi.org - Behavior changed
A selector whose An+B value has more digits than Python can convert to an integer now raises SelectorSyntaxError rather than ValueError. Code that catches ValueError for this case must catch SelectorSyntaxError instead. github.com - Configuration changed
ignore
The ignore option now disallows a pseudo-class however its name is written, including names using CSS escapes such as :h\61 s(). Each alias of a pseudo-class must also be listed in ignore. github.com - Signature changed
soupsieve.css_match.CSSMatch.anc_cache
Was anc_cache: dict[tuple[int, int], bool]; now anc_cache: dict[int, dict[int, bool]]. pypi.org - Signature changed
soupsieve.css_match.CSSMatch.desc_cache
Was desc_cache: dict[tuple[int, int], bool]; now desc_cache: dict[int, dict[int, bool]]. pypi.org - Signature changed
soupsieve.css_match.CSSMatch.sib_cache
Was sib_cache: dict[Hashable, int]; now sib_cache: dict[int, dict[int, int]]. pypi.org
soupsieve 4.1.1 breaking changes
- Behavior changed
:in-range
A range input's value is clamped to its minimum and maximum (0 and 100 by default), so :in-range and :out-of-range can match differently than before. Disabled, readonly or datalist range inputs now match neither. github.com - Behavior changed
:out-of-range
A range input's value is clamped to its minimum and maximum (0 and 100 by default), so :out-of-range now matches only when the maximum is less than the minimum. Disabled, readonly or datalist range inputs now match neither. github.com - Behavior changed
:placeholder-shown
The input value is sanitized before the check, as browsers do, so :placeholder-shown can match inputs it did not match before, such as ones with only line breaks or whitespace. github.com - Signature changed
soupsieve.css_match.CSSMatch.nth_cache
Was nth_cache: dict[Hashable, list[int]]; now nth_cache: dict[Hashable, NthState]. pypi.org
soupsieve 4.1 breaking changes
- Removed
soupsieve.css_match.RE_WILD_STRIP
soupsieve.css_match.RE_WILD_STRIP was removed in soupsieve 4.1 pypi.org - Removed
soupsieve.util.UC_A
soupsieve.util.UC_A was removed in soupsieve 4.1 pypi.org - Removed
soupsieve.util.UC_Z
soupsieve.util.UC_Z was removed in soupsieve 4.1 pypi.org - Behavior changed
:lang
:lang() no longer matches elements whose language tag is not well-formed BCP 47, and an ill-formed language range matches nothing. Previously ill-formed tags matched :lang('*') and lang="-" matched :lang(''). Review selectors that depended... github.com - Behavior changed
[attr=value]
The equality, prefix, dash-prefix and not-equal attribute selectors no longer ignore a trailing newline in the attribute value, so [type=hidden] no longer matches type="hidden ". Update selectors or data that relied on the old matching. github.com - Signature changed
soupsieve.css_types.SelectorAttribute.__init__
Was def __init__(self, attribute: str, prefix: str, pattern: Pattern[str] | None, xml_type_pattern: Pattern[str] | None, inverse: bool) -> None; now def __init__(self, attribute: str, prefix: str, pattern: Pattern[str] | None... pypi.org
soupsieve 4.0 breaking changes
- Removed
soupsieve.css_match.CSSMatch.cached_default_forms
CSSMatch.cached_default_forms was removed in soupsieve 4.0 pypi.org - Removed
soupsieve.css_match.CSSMatch.cached_indeterminate_forms
CSSMatch.cached_indeterminate_forms was removed in soupsieve 4.0 pypi.org - Removed
soupsieve.css_match.CSSMatch.iframe_restrict
CSSMatch.iframe_restrict was removed in soupsieve 4.0 pypi.org - Removed
soupsieve.css_match.CSSMatch.is_iframe
CSSMatch.is_iframe was removed in soupsieve 4.0 pypi.org - Removed
soupsieve.css_match.within
soupsieve.css_match.within was removed in soupsieve 4.0 pypi.org - Behavior changed
:checked
Only the last checked radio button in a group matches :checked, and for select only the browser-selected option matches. Code relying on earlier matching may see different results. github.com - Behavior changed
:defined
HTML elements with an is attribute (customized built-ins) no longer match :defined. github.com - Behavior changed
:dir
Non-HTML elements inherit direction, template contents are left to right, and only ltr and rtl identifiers are meaningful. Results may differ from earlier versions. github.com - Behavior changed
:disabled
option and optgroup elements inside a disabled select now match :disabled and no longer match :enabled. github.com - Behavior changed
:lang
Non-HTML elements such as SVG now have their lang attribute considered, with xml:lang taking precedence. github.com
And 13 more in this version. Sign up to see every change
Older versions
17 older versions, each with its first changes. Sign up to see every change
Show 17 older versions
soupsieve 3.0.4 breaking changes
- Behavior changed
escape
escape() no longer leaves every non-ASCII character unescaped; only non-ASCII identifier code points defined by the CSS specification stay unescaped, so code that relies on the old output may see different escaped strings. github.com
soupsieve 3.0.3 breaking changes
- Signature changed
soupsieve.css_match.CSSMatch.get_parent
Was def get_parent(self, el: bs4.Tag | None, no_iframe: bool = False) -> bs4.Tag | None; now def get_parent(self, el: bs4.Tag | None, no_iframe: bool = False, no_doc: bool = True) -> bs4.Tag | None. pypi.org
soupsieve 3.0.2 breaking changes
- Removed
Soup Sieve 3.0 and later need Python 3.11.5 or newer because older Python versions have broken possessive quantifiers. github.com - Removed
soupsieve.css_parser.ATTR
soupsieve.css_parser.ATTR was removed in soupsieve 3.0.2 pypi.org
And 111 more in this version.
soupsieve 3.0 breaking changes
- Removed
Python 3.10 is no longer supported. Users on Python 3.10 must upgrade their interpreter or stay on an older release. github.com - Behavior changed
:has
Complex selectors using combinators and nesting :has() inside :has() are now disallowed by default. To restore the old behavior in a safe environment, pass the new NOSTRICT flag. github.com
And 1 more in this version.
soupsieve 2.10 breaking changes
- Removed
soupsieve.css_match.CSSMatch.create_fake_parent
CSSMatch.create_fake_parent was removed in soupsieve 2.10 pypi.org - Removed
soupsieve.css_match.CSSMatch.normalize_value
CSSMatch.normalize_value was removed in soupsieve 2.10 pypi.org
And 25 more in this version.
soupsieve 2.9.2 breaking changes
- Removed
soupsieve.css_parser.CSSParser.check_count
CSSParser.check_count was removed in soupsieve 2.9.2 pypi.org - Behavior changed
:has
The :has() selector no longer allows empty selectors in some cases, since it is not forgiving. Selectors that relied on empty entries inside :has() will now be rejected. github.com
And 1 more in this version.
soupsieve 2.9.1 breaking changes
- Behavior changed
The selectors [attr^=""], [attr$=""] and [attr*=""] no longer match any element that merely has the attribute; they match nothing when the value is empty. Code relying on the old matching must be updated. github.com
soupsieve 2.9 breaking changes
- Removed
Python 3.9 is no longer supported by this release. Users on Python 3.9 must upgrade their Python version before using soupsieve 2.9. github.com - Removed
soupsieve.css_parser.CSSParser.css_tokens
CSSParser.css_tokens was removed in soupsieve 2.9 pypi.org
And 1 more in this version.
soupsieve 2.8.4 breaking changes
- Signature changed
soupsieve.css_types.SelectorList.__init__
Was def __init__(self, selectors: Iterable[Selector | SelectorNull] | None = None, is_not: bool = False, is_html: bool = False) -> None; now def __init__(self, selectors: Iterable[Selector | SelectorNull] | None = None, is_not: bool =... pypi.org
soupsieve 2.8.2 breaking changes
- Behavior changed
Custom selectors or namespace dictionaries with non-string keys are now rejected. Code that passes such keys must switch to string keys. github.com
soupsieve 2.8 breaking changes
- Removed
Python 3.8 is no longer supported by soupsieve 2.8. Users on Python 3.8 must stay on an earlier release or upgrade Python. github.com
soupsieve 2.7 breaking changes
- Signature changed
soupsieve.closest
Was def closest(select: str, tag: bs4.Tag, namespaces: dict[str, str] | None = None, flags: int = 0, *, custom: dict[str, str] | None = None, **kwargs: Any) -> bs4.Tag; now def closest(select: str, tag: bs4.Tag, namespaces: dict[str, str]... pypi.org - Signature changed
soupsieve.css_match.CSSMatch.__init__
Was def __init__(self, selectors: ct.SelectorList, scope: bs4.Tag, namespaces: ct.Namespaces | None, flags: int) -> None; now def __init__(self, selectors: ct.SelectorList, scope: bs4.Tag | None, namespaces: ct.Namespaces | None, flags... pypi.org
And 29 more in this version.
soupsieve 2.0 breaking changes
- Removed
soupsieve.comments
soupsieve.comments was removed in soupsieve 2.0 pypi.org - Removed
soupsieve.css_match.CommentsMatch
soupsieve.css_match.CommentsMatch was removed in soupsieve 2.0 pypi.org
And 15 more in this version.
soupsieve 1.0 breaking changes
- Removed
soupsieve.css_match.CSSMatch.is_xml
CSSMatch.is_xml was removed in soupsieve 1.0 pypi.org - Removed
soupsieve.css_match.CSSMatch.mode
CSSMatch.mode was removed in soupsieve 1.0 pypi.org
And 15 more in this version.
soupsieve 1.0b2 breaking changes
- Removed
Document flags are removed; the document type is now detected from the Beautiful Soup object directly. github.com - Behavior changed
CSS selectors are now evaluated using CSS whitespace rules, which may change which elements match. github.com
And 1 more in this version.
soupsieve 1.0b1 breaking changes
- Behavior changed
Selectors with attribute case flags but no attribute value are no longer allowed, so such selectors may now fail. github.com
soupsieve 0.6 breaking changes
- Renamed
mode
The mode attribute is now called flags, so code using mode must switch to flags. github.com
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.