Skip to content

Commit 54fae45

Browse files
committed
Release notes for 0.23.0.
1 parent a2061e8 commit 54fae45

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

CHANGES.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changes
22
=======
33

4+
0.23.0 (YYYY-MM-DD)
5+
-------------------
6+
7+
* Added support for :ref:`custom attribute extraction <custom-attrs>`.
8+
* Added the :class:`~scrapy_zyte_api.LocationSessionConfig` class.
9+
410
0.22.1 (2024-08-30)
511
-------------------
612

docs/reference/inputs.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@ Built-in input annotations
6060
:members:
6161

6262
.. autofunction:: scrapy_zyte_api.actions
63+
64+
.. autofunction:: scrapy_zyte_api.custom_attrs

docs/usage/scrapy-poet.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ Custom attribute extraction
137137
---------------------------
138138

139139
You can request custom attribute extraction by using either a
140-
:class:`scrapy_zyte_api.CustomAttributes` dependency (if you need both the
140+
:class:`zyte_common_items.CustomAttributes` dependency (if you need both the
141141
attribute values and the attribute extraction metadata) or a
142-
:class:`scrapy_zyte_api.CustomAttributesValues` dependency (if you only need
142+
:class:`zyte_common_items.CustomAttributesValues` dependency (if you only need
143143
the values). You need to annotate it with input data as a dictionary and, if
144144
needed, a dictionary with extraction options. You should use the
145145
:func:`scrapy_zyte_api.custom_attrs` function to create the annotation:
@@ -148,7 +148,8 @@ needed, a dictionary with extraction options. You should use the
148148
149149
from typing import Annotated
150150
151-
from scrapy_zyte_api import CustomAttributes, custom_attrs
151+
from scrapy_zyte_api import custom_attrs
152+
from zyte_common_items import CustomAttributes
152153
153154
154155
@attrs.define
@@ -168,7 +169,7 @@ You can then access the results as the dependency value:
168169
169170
def parse_page(self, response: DummyResponse, page: MyPageObject):
170171
...
171-
for k, v in page.custom_attributes.items():
172+
for k, v in page.custom_attributes.values.items():
172173
...
173174
174175

0 commit comments

Comments
 (0)