Cssselect

Latest version: v1.3.0

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

Scan your dependencies

Page 3 of 4

0.7

-----------

Released on 2012-06-14.

Bug fix release: see 2, 7 and 10 on GitHub.

* The tokenizer and parser have been rewritten to be much closer to the
specified grammar. In particular, non-ASCII characters and backslash-escapes
are now handled correctly.
* Special characters are protected in the output so that generated XPath
exrpessions should always be valid
* The ``~=``, ``^=`` and ``*=`` attribute operators now correctly never match
when used with an empty string.

0.6.1

-------------

Released on 2012-04-25.

Make sure that internal token objects do not "leak" into the public API and
:attr:`Selector.pseudo_element` is an unicode string.

0.6

-----------

Released on 2012-04-24.

* In ``setup.py`` use setuptools/distribute if available, but fall back
on distutils.
* Implement the ``:lang()`` pseudo-class, although it is only based on
``xml:lang`` or ``lang`` attributes. If the document language is known from
some other meta-data (like a ``Content-Language`` HTTP header or ``<meta>``
element), a workaround is to set a lang attribute on the root element.

0.5

-----------

Released on 2012-04-20.

* Fix case sensitivity issues.
* Implement :class:`HTMLTranslator` based on the `HTML5 specification`_
rather than guessing; add the ``xhtml`` parameter.
* Several bug fixes and better test coverage.

.. _HTML5 specification: http://www.w3.org/TR/html5/links.html#selectors

0.4

-----------

Released on 2012-04-18.

* Add proper support for pseudo-elements
* Add specificity calculation
* Expose the :func:`parse` function and the parsed :class:`Selector` objects
in the API.
* Add the :meth:`~GenericTranslator.selector_to_xpath` method.

0.3

-----------

Released on 2012-04-17.

* Fix many parsing bugs.
* Rename the ``Translator`` class to :class:`GenericTranslator`
* There, implement ``:target``, ``:hover``, ``:focus``, ``:active``
``:checked``, ``:enabled``, ``:disabled``, ``:link`` and ``:visited``
as never matching.
* Make a new HTML-specific ``HTMLTranslator`` subclass. There, implement
``:checked``, ``:enabled``, ``:disabled``, ``:link`` and ``:visited``
as appropriate for HTML, with all links "not visited".
* Remove the ``css_to_xpath`` function. The translator classes
are the new API.
* Add support for ``:contains()`` back, but case-sensitive. lxml will
override it to be case-insensitive for backward-compatibility.

Discussion is open if anyone is interested in implementing eg. ``:target``
or ``:visited`` differently, but they can always do it in a ``Translator``
subclass.

Page 3 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.