Web-poet

Latest version: v0.18.0

Safety actively analyzes 706267 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 5

0.9.0

------------------

* Standardized :ref:`input validation <input-validation>`.
* :ref:`Field processors <field-processors>` can now also be defined through a
nested ``Processors`` class, so that field redefinitions in subclasses can
inherit them. See :ref:`default-processors`.
* :ref:`Field processors <field-processors>` can now opt in to receive the page
object whose field is being read.
* :class:`web_poet.fields.FieldsMixin` now keeps fields from all base classes
when using multiple inheritance.
* Fixed the documentation build.

0.8.1

------------------

* Fix the error when calling :meth:`.to_item() <web_poet.pages.ItemPage.to_item>`,
:func:`item_from_fields_sync() <web_poet.fields.item_from_fields_sync>`, or
:func:`item_from_fields() <web_poet.fields.item_from_fields>` on page objects
defined as slotted attrs classes, while setting ``skip_nonitem_fields=True``.

0.8.0

------------------

This release contains many improvements to the web-poet testing framework,
as well as some other improvements and bug fixes.

Backward-incompatible changes:

* :func:`~.cached_method` no longer caches exceptions for ``async def`` methods.
This makes the behavior the same for sync and async methods, and also makes
it consistent with Python's stdlib caching (i.e. :func:`functools.lru_cache`,
:func:`functools.cached_property`).
* The testing framework now uses the ``HttpResponse-info.json`` file name instead
of ``HttpResponse-other.json`` to store information about HttpResponse
instances. To make tests generated with older web-poet work, rename
these files on disk.

Testing framework improvements:

* Improved test reporting: better diffs and error messages.
* By default, the pytest plugin now generates a test per item attribute
(see :ref:`web-poet-testing-pytest`). There is also an option
(``--web-poet-test-per-item``) to run a test per item instead.
* Page objects with the :class:`~.HttpClient` dependency are now supported
(see :ref:`web-poet-testing-additional-requests`).
* Page objects with the :class:`~.PageParams` dependency are now supported.
* Added a new ``python -m web_poet.testing rerun`` command
(see :ref:`web-poet-testing-tdd`).
* Fixed support for nested (indirect) dependencies in page objects.
Previously they were not handled properly by the testing
framework.
* Non-ASCII output is now stored without escaping in the test fixtures,
for better readability.

Other changes:

* Testing and CI fixes.
* Fixed a packaging issue: ``tests`` and ``tests_extra`` packages were
installed, not just ``web_poet``.

0.7.2

------------------

* Restore the minimum version of ``itemadapter`` from 0.7.1 to 0.7.0, and
prevent a similar issue from happening again in the future.

0.7.1

------------------

* Updated the :ref:`tutorial <tutorial>` to cover recent features and focus on
best practices. Also, a new module was added, :mod:`web_poet.example`, that
allows using page objects while following the tutorial.

* :ref:`web-poet-testing` now covers :ref:`Git LFS <git-lfs>` and
:ref:`scrapy-poet <web-poet-testing-scrapy-poet>`, and recommends
``python -m pytest`` instead of ``pytest``.

* Improved the warning message when duplicate ``ApplyRule`` objects are found.

* ``HttpResponse-other.json`` content is now indented for better readability.

* Improved test coverage for :ref:`fields <fields>`.

0.7.0

------------------

* Add :ref:`a framework for creating tests and running them with pytest
<web-poet-testing>`.

* Support implementing fields in mixin classes.

* Introduce new methods for :class:`web_poet.rules.RulesRegistry`:

* :meth:`web_poet.rules.RulesRegistry.add_rule`
* :meth:`web_poet.rules.RulesRegistry.overrides_for`
* :meth:`web_poet.rules.RulesRegistry.page_cls_for_item`

* Improved the performance of :meth:`web_poet.rules.RulesRegistry.search` where
passing a single parameter of either ``instead_of`` or ``to_return`` results
in *O(1)* look-up time instead of *O(N)*. Additionally, having either
``instead_of`` or ``to_return`` present in multi-parameter search calls would
filter the initial candidate results resulting in a faster search.

* Support :ref:`page object dependency serialization <dep-serialization>`.

* Add new dependencies used in testing and serialization code: ``andi``,
``python-dateutil``, and ``time-machine``. Also ``backports.zoneinfo`` on
non-Windows platforms when the Python version is older than 3.9.

Page 3 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.