Skip to content

Commit f2f0225

Browse files
authored
Merge pull request #272 from scrapy/relnotes-1.8
Release notes for 1.8.0
2 parents fa7e0c0 + c8f2acb commit f2f0225

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

NEWS

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@
33
History
44
-------
55

6+
1.8.0 (YYYY-MM-DD)
7+
~~~~~~~~~~~~~~~~~~
8+
9+
* Add support for JMESPath: you can now create a selector for a JSON document
10+
and call ``Selector.jmespath()``. See :ref:`the documentation
11+
<topics-selectors>` for more information and examples.
12+
* Selectors can now be constructed from ``bytes`` (using the ``body`` and
13+
``encoding`` arguments) instead of ``str`` (using the ``text`` argument), so
14+
that there is no internal conversion from ``str`` to ``bytes`` and the memory
15+
usage is lower.
16+
* Typing improvements
17+
* The ``pkg_resources`` module (which was absent from the requirements) is no
18+
longer used
19+
* Documentation build fixes
20+
* New requirements:
21+
22+
* ``jmespath``
23+
* ``typing_extensions`` (on Python 3.7)
24+
625
1.7.0 (2022-11-01)
726
~~~~~~~~~~~~~~~~~~
827

parsel/selector.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,10 @@ class Selector:
416416
You can write selection expressions in CSS or XPath for HTML and XML
417417
inputs, or in JMESPath for JSON inputs.
418418
419-
``text`` is a `str`` object.
419+
``text`` is an ``str`` object.
420+
421+
``body`` is a ``bytes`` object. It can be used together with the
422+
``encoding`` argument instead of the ``text`` argument.
420423
421424
``type`` defines the selector type. It can be ``"html"`` (default),
422425
``"json"``, or ``"xml"``.

0 commit comments

Comments
 (0)