Soupsieve

Latest version: v2.6

Safety actively analyzes 714973 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 8

1.7.0

- **NEW**: Add support for `:in-range` and `:out-of-range` selectors. (60)
- **NEW**: Add support for `:defined` selector. (76)
- **FIX**: Fix pickling issue when compiled selector contains a `NullSelector` object. (70)
- **FIX**: Better exception messages in the CSS selector parser and fix a position reporting issue that can occur in
some exceptions. (72, 73)
- **FIX**: Don't compare prefixes when evaluating attribute namespaces, compare the actual namespace. (75)
- **FIX**: Split whitespace attribute lists by all whitespace characters, not just space.
- **FIX**: `:nth-*` patterns were converting numbers to base 16 when they should have been converting to base 10.

1.6.2

- **FIX**: Fix pattern compile issues on Python < 2.7.4.
- **FIX**: Don't use `\d` in Unicode `Re` patterns as they will contain characters outside the range of `[0-9]`.

1.6.1

- **FIX**: Fix warning about not importing `Mapping` from `collections.abc`.

1.6.0

- **NEW**: Add `closest` method to the API that matches closest ancestor.
- **FIX**: Add missing `select_one` reference to module's `__all__`.

1.5.0

- **NEW**: Add `select_one` method like Beautiful Soup has.
- **NEW**: Add `:dir()` selector (HTML only).
- **FIX**: Fix handling issues of HTML fragments (elements without a `BeautifulSoup` object as a parent).
- **FIX**: Fix internal `nth` range check.

1.4.0

- **NEW**: Throw `NotImplementedError` for at-rules: `page`, etc.
- **NEW**: Match nothing for `:host`, `:host()`, and `:host-context()`.
- **NEW**: Add support for `:read-write` and `:read-only`.
- **NEW**: Selector patterns can be annotated with CSS comments.
- **FIX**: `\r`, `\n`, and `\f` cannot be escaped with `\` in CSS. You must use Unicode escapes.

Page 5 of 8

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.