pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/py-itemadapter



Module Name:    pkgsrc
Committed By:   adam
Date:           Thu Oct 29 13:29:49 UTC 2026

Modified Files:
        pkgsrc/textproc/py-itemadapter: Makefile PLIST distinfo

Log Message:
py-itemadapter: updated to 0.14.0

0.14.0 (2026-10-29)

Removed support for Python 3.9 and 3.10, and added support for Python 3.15

Raised the minimum supported versions of optional dependencies: `attrs` 22.1.0
(was 20.1.0), `pydantic` 2.7 (was 1.8) and `scrapy` 2.7 (was 2.2)

Removed support for Pydantic 1 models, including `pydantic.v1` models from
Pydantic 2, and for `scrapy.item.BaseItem` subclasses that are not
`scrapy.Item` subclasses

`ItemAdapter.ADAPTER_CLASSES` is now a `tuple` instead of a
`collections.deque`, so it no longer supports `appendleft()` and other
in-place changes. To register an adapter class, reassign it instead, e.g.
`ItemAdapter.ADAPTER_CLASSES = (MyAdapter, *ItemAdapter.ADAPTER_CLASSES)`

Which adapter class handles each item class is now cached, making
`ItemAdapter()` and `is_item()` faster. As a result, the `is_item_class()`
class method of adapter classes must return the same result every time it is
called with the same item class

Overriding the `is_item()` class method in an adapter class is deprecated,
override `is_item_class()` instead. Adapter classes that override `is_item()`
still work, but trigger a `DeprecationWarning` and disable the cache above

Added support for
[`TypedDict`](https://docs.python.org/3/library/typing.html#typing.TypedDict)
item classes, including `typing_extensions.TypedDict` ones: field names, field
metadata from the first mapping in
[`Annotated`](https://docs.python.org/3/library/typing.html#typing.Annotated)
type hints, and `get_json_schema()` support, which honors `Required` and
`NotRequired`

`get_json_schema()` is much faster on repeated calls, as field docstrings read
from source code are now cached

`get_json_schema()` no longer fails on unions of 2 or more non-simple types,
e.g. 2 item classes

`get_json_schema()` now maps `int | float` to `number` regardless of the order
of the union members; `float | int` already did

`get_json_schema()` now handles `attrs.validators.matches_re()` validators
better: patterns are anchored to match their match function (`re.fullmatch()`
by default), and patterns with flags that JSON Schema cannot express, e.g.
`re.IGNORECASE`, are left out

Improved type hints


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 pkgsrc/textproc/py-itemadapter/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/textproc/py-itemadapter/PLIST
cvs rdiff -u -r1.12 -r1.13 pkgsrc/textproc/py-itemadapter/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/py-itemadapter/Makefile
diff -u pkgsrc/textproc/py-itemadapter/Makefile:1.14 pkgsrc/textproc/py-itemadapter/Makefile:1.15
--- pkgsrc/textproc/py-itemadapter/Makefile:1.14        Fri Jan  9 06:56:47 2026
+++ pkgsrc/textproc/py-itemadapter/Makefile     Thu Oct 29 13:29:49 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.14 2026/01/09 06:56:47 adam Exp $
+# $NetBSD: Makefile,v 1.15 2026/10/29 13:29:49 adam Exp $
 
-DISTNAME=      itemadapter-0.13.1
+DISTNAME=      itemadapter-0.14.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    textproc python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=i/itemadapter/}
@@ -10,7 +10,7 @@ HOMEPAGE=     https://github.com/scrapy/item
 COMMENT=       Wrapper providing a common interface for objects of different types
 LICENSE=       modified-bsd
 
-TOOL_DEPENDS+= ${PYPKGPREFIX}-hatchling>0:../../devel/py-hatchling
+TOOL_DEPENDS+= ${PYPKGPREFIX}-hatchling>=0:../../devel/py-hatchling
 
 USE_LANGUAGES= # none
 

Index: pkgsrc/textproc/py-itemadapter/PLIST
diff -u pkgsrc/textproc/py-itemadapter/PLIST:1.6 pkgsrc/textproc/py-itemadapter/PLIST:1.7
--- pkgsrc/textproc/py-itemadapter/PLIST:1.6    Sat Aug 16 06:51:15 2025
+++ pkgsrc/textproc/py-itemadapter/PLIST        Thu Oct 29 13:29:49 2026
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.6 2025/08/16 06:51:15 adam Exp $
+@comment $NetBSD: PLIST,v 1.7 2026/10/29 13:29:49 adam Exp $
 ${PYSITELIB}/${WHEEL_INFODIR}/METADATA
 ${PYSITELIB}/${WHEEL_INFODIR}/RECORD
 ${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
@@ -12,6 +12,9 @@ ${PYSITELIB}/itemadapter/_imports.pyo
 ${PYSITELIB}/itemadapter/_json_schema.py
 ${PYSITELIB}/itemadapter/_json_schema.pyc
 ${PYSITELIB}/itemadapter/_json_schema.pyo
+${PYSITELIB}/itemadapter/_utils.py
+${PYSITELIB}/itemadapter/_utils.pyc
+${PYSITELIB}/itemadapter/_utils.pyo
 ${PYSITELIB}/itemadapter/adapter.py
 ${PYSITELIB}/itemadapter/adapter.pyc
 ${PYSITELIB}/itemadapter/adapter.pyo

Index: pkgsrc/textproc/py-itemadapter/distinfo
diff -u pkgsrc/textproc/py-itemadapter/distinfo:1.12 pkgsrc/textproc/py-itemadapter/distinfo:1.13
--- pkgsrc/textproc/py-itemadapter/distinfo:1.12        Fri Jan  9 06:56:47 2026
+++ pkgsrc/textproc/py-itemadapter/distinfo     Thu Oct 29 13:29:49 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.12 2026/01/09 06:56:47 adam Exp $
+$NetBSD: distinfo,v 1.13 2026/10/29 13:29:49 adam Exp $
 
-BLAKE2s (itemadapter-0.13.1.tar.gz) = 54286c1127c3e61194622e18e06ea3c4ce59a5ae8dd5b9fb38d438ae0bb936d4
-SHA512 (itemadapter-0.13.1.tar.gz) = 78ace1051e1c949619f0a64c6c0063b019196959f75bd53c2ca204be1b287c2c6fbb03e8ca126d6386a670f632c18e944ed5ce8272a151400820a42ee028c04c
-Size (itemadapter-0.13.1.tar.gz) = 32343 bytes
+BLAKE2s (itemadapter-0.14.0.tar.gz) = 4aae304c8938920031f4d3d435f4c50eecb22beb584a25c87691b09c5a4b2bc4
+SHA512 (itemadapter-0.14.0.tar.gz) = 758585bdd6e8ad9218144d72e3261d37724629fbb769b905da1ff5103eb92a69238e73a12b101d4d37f287f4ab5f8fc78c8dafb62ff1e35ad1668f4e1cf379aa
+Size (itemadapter-0.14.0.tar.gz) = 40551 bytes



Home | Main Index | Thread Index | Old Index