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