@@ -61,61 +61,67 @@ in page objects and spider callbacks. The following is now possible:
6161
6262 In line with this, the following changes were made:
6363
64- * Added a new ``scrapy_poet.page_input_providers.ItemProvider `` which makes
65- the usage above possible.
66- * Multiple changes to the ``scrapy_poet.PageObjectInputProvider `` base class
67- which are backward incompatible:
68-
69- * It now accepts an instance of ``scrapy_poet.injection.Injector `` in its
70- constructor instead of ``scrapy.crawler.Crawler ``. Although you can
71- still access the ``scrapy.crawler.Crawler `` via the ``Injector.crawler ``
72- attribute.
73- * ``is_provided() `` is now an instance method instead of a class
74- method.
75-
76- * The ``scrapy_poet.injection.Injector ``'s attribute and constructor parameter
77- called ``overrides_registry `` is now simply called ``registry ``.
64+ * Added a new :class: `scrapy_poet.page_input_providers.ItemProvider ` which
65+ makes the usage above possible.
66+ * Multiple changes to the
67+ :class: `scrapy_poet.page_input_providers.PageObjectInputProvider ` base
68+ class which are backward incompatible:
69+
70+ * It now accepts an instance of :class: `scrapy_poet.injection.Injector `
71+ in its constructor instead of :class: `scrapy.crawler.Crawler `. Although
72+ you can still access the :class: `scrapy.crawler.Crawler ` via the
73+ ``Injector.crawler `` attribute.
74+ * :meth: `scrapy_poet.page_input_providers.PageObjectInputProvider.is_provided `
75+ is now an instance method instead of a class method.
76+
77+ * The :class: `scrapy_poet.injection.Injector `'s attribute and constructor
78+ parameter called ``overrides_registry `` is now simply called ``registry ``.
7879 This is backwards incompatible.
79- * An item class is now supported by ``scrapy_poet.callback_for `` alongside
80- the usual page objects. This means that it won't raise a ``TypeError ``
81- anymore when not passing a subclass of ``web_poet.ItemPage ``.
82- * ``scrapy_poet.overrides.OverridesRegistry `` has been deprecated and
83- overhauled into ``scrapy_poet.registry.OverridesAndItemRegistry ``:
84-
85- * It is now subclassed from ``web_poet.RulesRegistry `` which allows
86- outright access to its registry methods.
87- * It now allows retrieval of rules based on the returned item class.
88- * The registry doesn't accept tuples as rules anymore. Only
89- ``web_poet.ApplyRule `` instances are allowed. The same goes for
90- ``SCRAPY_POET_RULES `` (and the deprecated ``SCRAPY_POET_OVERRIDES ``).
91-
92- * As a result, the following type aliases have been removed:
93- ``scrapy_poet.overrides.RuleAsTuple `` and
94- ``scrapy_poet.overrides.RuleFromUser ``
95- * These changes are backward incompatible.
96-
97- * New exception: ``scrapy_poet.injector_error.ProviderDependencyDeadlockError ``.
80+ * An item class is now supported by :func: `scrapy_poet.callback_for `
81+ alongside the usual page objects. This means that it won't raise a
82+ :class: `TypeError ` anymore when not passing a subclass of
83+ :class: `web_poet.pages.ItemPage `.
84+ * New exception: :class: `scrapy_poet.injection_errors.ProviderDependencyDeadlockError `.
9885 This is raised when it's not possible to create the dependencies due to
9986 a deadlock in their sub-dependencies, e.g. due to a circular dependency
10087 between page objects.
10188
10289Other changes:
10390
91+ * Now requires ``web-poet >= 0.7.0 ``.
92+ * In line with web-poet's new features, the ``scrapy_poet.overrides `` module
93+ which contained ``OverridesRegistryBase `` and ``OverridesRegistry `` has now
94+ been removed. Instead, scrapy-poet directly uses
95+ :class: `web_poet.rules.RulesRegistry `.
96+
97+ Everything should pretty much the same except for
98+ :meth: `web_poet.rules.RulesRegistry.overrides_for ` now accepts :class: `str `,
99+ :class: `web_poet.page_inputs.http.RequestUrl `, or
100+ :class: `web_poet.page_inputs.http.ResponseUrl ` instead of
101+ :class: `scrapy.http.Request `.
102+
103+ * This also means that the registry doesn't accept tuples as rules anymore.
104+ Only :class: `web_poet.rules.ApplyRule ` instances are allowed. The same goes
105+ for ``SCRAPY_POET_RULES `` (and the deprecated ``SCRAPY_POET_OVERRIDES ``).
106+ As a result, the following type aliases have been removed:
107+
108+ * ``scrapy_poet.overrides.RuleAsTuple ``
109+ * ``scrapy_poet.overrides.RuleFromUser ``
110+
111+ These changes are backward incompatible.
112+
104113 * Moved some of the utility functions from the test module into
105114 ``scrapy_poet.utils.testing ``.
106115 * Documentation improvements.
116+ * Official support for Python 3.11
107117
108118Deprecations:
109119
110- * The ``scrapy_poet.overrides `` module has been replaced by
111- ``scrapy_poet.registry ``.
112- * The ``scrapy_poet.overrides.OverridesRegistry `` class is now replaced by
113- ``scrapy_poet.registry.OverridesAndItemRegistry ``.
114120 * The ``SCRAPY_POET_OVERRIDES_REGISTRY `` setting has been replaced by
115121 ``SCRAPY_POET_REGISTRY ``.
116122 * The ``SCRAPY_POET_OVERRIDES `` setting has been replaced by
117123 ``SCRAPY_POET_RULES ``.
118- * Official support for Python 3.11
124+
119125
1201260.6.0 (2022-11-24)
121127------------------
0 commit comments