File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 99* Add support for JMESPath: you can now create a selector for a JSON document
1010 and call ``Selector.jmespath()``. See :ref:`the documentation
1111 <topics-selectors>` for more information and examples.
12- * Memory usage improvements
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.
1316* Typing improvements
1417* The ``pkg_resources`` module (which was absent from the requirements) is no
1518 longer used
Original file line number Diff line number Diff 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"``.
You can’t perform that action at this time.
0 commit comments