Skip to content

Update dependency soupsieve to v4.1.3 - #980

Open
k1h-renovate[bot] wants to merge 1 commit into
masterfrom
renovate/soupsieve-4.x
Open

k1h-renovate[bot] wants to merge 1 commit into
masterfrom
renovate/soupsieve-4.x

Conversation

@k1h-renovate

@k1h-renovate k1h-renovate Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Update Change
soupsieve minor ==4.0 → ==4.1.3

Warning

Some dependencies could not be looked up. Check the warning logs for more information.


Release Notes

facelessuser/soupsieve (soupsieve)

v4.1.3

Compare Source

4.1.3
  • FIX: Fix filter() given a list of tags taking time and memory quadratic in the number of top level elements
    of a document, such as a fragment parsed with html.parser, for selectors that count siblings, like
    :nth-child() or :first-of-type. The tags were grouped by their top level element, so each top level element
    counted all of its siblings again with caches of its own. The tags of a document now share one group, as with
    select().
  • FIX: Fix of-type selectors, such as :first-of-type, :last-of-type, :only-of-type, and
    :nth-of-type(), taking time quadratic in the number of siblings when many of them have distinct tag names, as
    the siblings were scanned again for each tag name. Siblings of every type now share one scan.
  • FIX: :lang() stops checking a language against its list of values at the first value that matches. Along with
    each distinct language being matched against a list only once per select, a list with many values no longer costs
    time for every element.
  • FIX: Document that max_selectors does not limit the length of selector strings, or the number of values in
    the argument of a pseudo-class, and that limiting the length of selectors, if that is a concern, is the
    responsibility of the application.

v4.1.2

Compare Source

4.1.2
  • FIX: Fix :lang() taking time quadratic in the number of top level elements of a fragment that have an html
    or head child, such as many documents concatenated and parsed with html.parser, as the content language
    found in the header of each one was cached in a list that was searched for every new top level element.
  • FIX: Fix :lang() taking time quadratic in the size of the document when many elements share a long language
    tag, such as one inherited from <html lang>, as the tag was checked and matched again for every element.
  • FIX: Fix :-soup-contains() taking time quadratic in the depth of the document, such as a long list of
    unclosed <li> parsed with html.parser, as the text of every element, which includes that of all its
    descendants, was gathered and searched again for every element.
  • FIX: NOCACHE now turns off the caches of the content language in a document's header, of the forms of a
    document, and of the selected options of a select, so :lang(), :default, :indeterminate and :checked
    see changes made to the tree during a lazy iteration such as iselect().
  • FIX: Slimmed relation caches so they now take roughly half the memory.
  • FIX: Fix nth selectors with very large An+B values raising an OverflowError when matching, and
    matching the wrong elements when a value is larger than 2^53, as the position of an element was checked with a
    float division. A value with more digits than Python will convert to an integer now raises a
    SelectorSyntaxError instead of a ValueError.
  • FIX: filter() given a list of tags now matches the tags under the same top level element together, sharing
    the caches that keep matching linear, instead of matching each tag separately, which took time quadratic in the
    depth of a nested document for any selector. A selector that uses :scope or & still matches each tag
    separately, as each tag is its own scope.
  • FIX: The ignore option now disallows a pseudo-class however its name is written, as names were compared
    without resolving CSS escapes, so a name written with an escape, such as :h\61 s(), was not disallowed. Document
    that each alias of a pseudo-class, such as :contains() for :-soup-contains(), must be listed as well.

v4.1.1

Compare Source

4.1.1
  • FIX: Improve performance of tag name matching, which runs for every element and selector.
  • FIX: Fix nth selectors taking polynomial time when nested inside the of S of other nth selectors, such
    as :nth-last-child(n of :nth-last-child(n of li)), as each level of nesting multiplied the work by the number
    of siblings. nth selectors inside :has() with a subsequent-sibling combinator, such as
    :has(~ :nth-child(n of li)), were also quadratic. Each sibling is now evaluated against an nth selector at most
    once per parent.
  • FIX: A range input's value is clamped to its minimum and maximum, 0 and 100 by default, so it now matches
    :out-of-range only when its maximum is less than its minimum, and :in-range otherwise, including without min
    or max. A range input that is disabled, readonly or in a datalist matches neither.
  • FIX: :in-range and :out-of-range no longer match an input of any type that is disabled, readonly or in a
    datalist, as it is barred from constraint validation.
  • FIX: :in-range and :out-of-range treat a date, month, week or datetime-local value after
    275760-09-13T00:00:00Z as invalid, as browsers do.
  • FIX: :placeholder-shown sanitizes an input's value before checking it, as browsers do, so it matches when the
    value is only line breaks, only whitespace for url and email, or, for number, not a valid floating-point
    number or one that overflows a double, such as 1e9999.
  • FIX: Fix :placeholder-shown taking time quadratic in the depth of the document, as it got the text of every
    element before checking that it is a textarea.

v4.1

Compare Source

4.1
  • NEW: Soup Sieve is now thread safe, and this is now tested, including on free-threaded Python. This is assuming
    read only operations on a document. Check out our documentation for more details.
  • FIX: Fix a race where compiling selectors in multiple threads at the same time could fail with a bogus
    syntax error or silently parse a selector incorrectly.
  • FIX: Fix issue where trailing whitespace and comments can sometimes fail to be consumed properly.
  • FIX: Fix a selector that starts with a comment followed by whitespace, such as /* comment */ div, failing
    with a syntax error.
  • FIX: Custom selector names should be checked with ASCII only lowercase.
  • FIX: Fix [attr=value], [attr$=value], [attr|=value], and [attr!=value] ignoring a trailing newline in
    the attribute value, so [type=hidden] no longer matches type="hidden&#&#8203;10;".
  • FIX: Cache the language, the contenteditable state, the select of an option, and the tree that an element
    is in, as found from its ancestors, when matching :lang(), :read-write, :read-only, :checked, :default,
    and :indeterminate to avoid quadratic time on deeply nested documents.
  • FIX: Fix :lang('') not matching every element without any language information, which per the HTML spec has
    an empty language tag. It missed the first such element checked, or all of them when there was no head.
  • FIX: :lang() no longer matches an element whose language tag is not well-formed BCP 47 syntax, such as -,
    en-, en_US, or a subtag longer than 8 characters, and a language range that is not well-formed matches
    nothing. Previously, lang="-" matched :lang(''), and ill-formed tags matched :lang('*').
  • FIX: Fix :lang() ranges that end in a wildcard, such as en-* or *-*, never matching. As RFC 4647 extended
    filtering specifies, wildcards after the first subtag are ignored, so en-* matches the same as en.
  • FIX: Fix [attr*=value] and [attr$=value] taking time quadratic in the length of the value when it nearly
    matches a long attribute value, including when matching case insensitive.

v4.0.1

Compare Source

4.0.1
  • FIX: Cache whether an element is or has a matching descendant when matching :has() to avoid quadratic time
    on deeply nested documents.
  • FIX: Cache whether the parent matches when matching the child combinator (a > b) so it is matched once for
    all of its children, avoiding quadratic time when the parent is expensive, such as div:has(> p) > span.

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

@k1h-renovate
k1h-renovate Bot requested a review from samanrassam as a code owner November 25, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants