1Changelog 2========= 3 4Version 1.1.0 5------------- 6 7Released on 2019-08-09. 8 9* Support for the ``:scope`` selector, which allows to access immediate 10 children of a selector. 11 12* Support for the ``|E`` syntax for type selectors without a namespace. 13 14* A new selector method, ``canonical``, returns the CSS expression of the 15 selector, as a string. 16 17 18Version 1.0.3 19------------- 20 21Released on 2017-12-27. 22 23* Fix artifact uploads to pypi 24 25 26Version 1.0.2 27------------- 28 29Released on 2017-12-26. 30 31* Drop support for Python 2.6 and Python 3.3. 32* Fix deprecation warning in Python 3.6. 33* Minor cleanups. 34 35 36Version 1.0.1 37------------- 38 39Released on 2017-01-10. 40 41* Add support for Python 3.6. 42* Documentation hosted `on Read the Docs <https://cssselect.readthedocs.io/>`_ 43 44 45Version 1.0.0 46------------- 47 48Released on 2016-10-21. 49 50* Add code coverage reports. 51* Fix ``:nth-*(an+b)`` pseudo-classes selectors. 52 (except ``*:nth-child()`` which looks untranslatable to XPath 1.0.) 53 54 55Version 0.9.2 56------------- 57 58Released on 2016-06-15. 59 60* Distribute as universal wheel. 61* Add support for Python 3.3, 3.4 and 3.5. 62* Drop support for Python 2.5 as testing is getting difficult. 63* Improve tests on pseudo-elements. 64 65 66Version 0.9.1 67------------- 68 69Released on 2013-10-17. 70 71* **Backward incompatible change from 0.9**: 72 :meth:`~GenericTranslator.selector_to_xpath` defaults to 73 ignoring pseudo-elements, 74 as it did in 0.8 and previous versions. 75 (:meth:`~GenericTranslator.css_to_xpath` doesn’t change.) 76* Drop official support for Python 2.4 and 3.1, 77 as testing was becoming difficult. 78 Nothing will break overnight, 79 but future releases may on may not work on these versions. 80 Older releases will remain available on PyPI. 81 82 83Version 0.9 84----------- 85 86Released on 2013-10-11. 87 88Add parser support for :attr:`functional 89pseudo-elements <Selector.pseudo_element>`. 90 91*Update:* 92This version accidentally introduced a **backward incompatible** change: 93:meth:`~GenericTranslator.selector_to_xpath` defaults to 94rejecting pseudo-elements instead of ignoring them. 95 96 97Version 0.8 98----------- 99 100Released on 2013-03-15. 101 102Improvements: 103 104* `#22 <https://github.com/SimonSapin/cssselect/issues/22>`_ 105 Let extended translators override what XPathExpr class is used 106* `#19 <https://github.com/SimonSapin/cssselect/issues/19>`_ 107 Use the built-in ``lang()`` XPath function 108 for implementing the ``:lang()`` pseudo-class 109 with XML documents. 110 This is probably faster than ``ancestor-or-self::``. 111 112Bug fixes: 113 114* `#14 <https://github.com/SimonSapin/cssselect/issues/14>`_ 115 Fix non-ASCII pseudo-classes. (Invalid selector instead of crash.) 116* `#20 <https://github.com/SimonSapin/cssselect/issues/20>`_ 117 As per the spec, elements containing only whitespace are not considered empty 118 for the ``:empty`` pseudo-class. 119 120 121Version 0.7.1 122------------- 123 124Released on 2012-06-14. Code name *remember-to-test-with-tox*. 125 1260.7 broke the parser in Python 2.4 and 2.5; the tests in 2.x. 127Now all is well again. 128 129Also, pseudo-elements are now correctly made lower-case. (They are supposed 130to be case-insensitive.) 131 132 133Version 0.7 134----------- 135 136Released on 2012-06-14. 137 138Bug fix release: see #2, #7 and #10 on GitHub. 139 140* The tokenizer and parser have been rewritten to be much closer to the 141 specified grammar. In particular, non-ASCII characters and backslash-escapes 142 are now handled correctly. 143* Special characters are protected in the output so that generated XPath 144 exrpessions should always be valid 145* The ``~=``, ``^=`` and ``*=`` attribute operators now correctly never match 146 when used with an empty string. 147 148 149Version 0.6.1 150------------- 151 152Released on 2012-04-25. 153 154Make sure that internal token objects do not "leak" into the public API and 155:attr:`Selector.pseudo_element` is an unicode string. 156 157 158Version 0.6 159----------- 160 161Released on 2012-04-24. 162 163* In ``setup.py`` use setuptools/distribute if available, but fall back 164 on distutils. 165* Implement the ``:lang()`` pseudo-class, although it is only based on 166 ``xml:lang`` or ``lang`` attributes. If the document language is known from 167 some other meta-data (like a ``Content-Language`` HTTP header or ``<meta>`` 168 element), a workaround is to set a lang attribute on the root element. 169 170 171Version 0.5 172----------- 173 174Released on 2012-04-20. 175 176* Fix case sensitivity issues. 177* Implement :class:`HTMLTranslator` based on the `HTML5 specification`_ 178 rather than guessing; add the ``xhtml`` parameter. 179* Several bug fixes and better test coverage. 180 181.. _HTML5 specification: http://www.w3.org/TR/html5/links.html#selectors 182 183 184Version 0.4 185----------- 186 187Released on 2012-04-18. 188 189* Add proper support for pseudo-elements 190* Add specificity calculation 191* Expose the :func:`parse` function and the parsed :class:`Selector` objects 192 in the API. 193* Add the :meth:`~GenericTranslator.selector_to_xpath` method. 194 195 196Version 0.3 197----------- 198 199Released on 2012-04-17. 200 201* Fix many parsing bugs. 202* Rename the :class:`Translator` class to :class:`GenericTranslator` 203* There, implement ``:target``, ``:hover``, ``:focus``, ``:active`` 204 ``:checked``, ``:enabled``, ``:disabled``, ``:link`` and ``:visited`` 205 as never matching. 206* Make a new HTML-specific ``HTMLTranslator`` subclass. There, implement 207 ``:checked``, ``:enabled``, ``:disabled``, ``:link`` and ``:visited`` 208 as appropriate for HTML, with all links "not visited". 209* Remove the :func:`css_to_xpath` function. The translator classes 210 are the new API. 211* Add support for ``:contains()`` back, but case-sensitive. lxml will 212 override it to be case-insensitive for backward-compatibility. 213 214Discussion is open if anyone is interested in implementing eg. ``:target`` 215or ``:visited`` differently, but they can always do it in a ``Translator`` 216subclass. 217 218 219Version 0.2 220----------- 221 222Released on 2012-04-16. 223 224* Remove the ``CSSSelector`` class. (The ``css_to_xpath()`` function is now 225 the main API.) 226* Remove support for the ``:contains()`` pseudo-class. 227 228These changes allow cssselect to be used without lxml. (Hey, this was 229the whole point of this project.) The tests still require lxml, though. 230The removed parts are expected to stay in lxml for backward-compatibility. 231 232``:contains()`` only existed in an `early draft 233<http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#content-selectors>`_ 234of the Selectors specification, and was removed before Level 3 stabilized. 235Internally, it used a custom XPath extension function which can be 236difficult to express outside of lxml. 237 238 239* Separate the XPath translation from the parsed objects into a new 240 ``Translator`` class. 241 242Subclasses of ``Translator`` can be made to change the way that some selector 243(eg. a pseudo-class) is implemented. 244 245 246Version 0.1 247----------- 248 249Released on 2012-04-13. 250 251Extract lxml.cssselect from the rest of lxml and make it a stand-alone project. 252 253Commit ``ea53ceaf7e44ba4fbb5c818ae31370932f47774e`` was taken on 2012-04-11 254from the 'master' branch of lxml’s git repository. This is somewhere 255between versions 2.3.4 and 2.4. 256 257The commit history has been rewritten to: 258 259* Remove lxml files unrelated to cssselect 260* Import the early history from the 'html' branch in the old SVN repository 261* Fix author names in commits from SVN 262 263This project has its own import name, tests and documentation. But the 264code itself is unchanged and still depends on lxml. 265 266 267Earlier history 268--------------- 269 270Search for *cssselect* in `lxml’s changelog 271<https://github.com/lxml/lxml/blob/master/CHANGES.txt>`_ 272