pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/py-cattrs



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sat Jun  7 22:03:32 UTC 2025

Modified Files:
        pkgsrc/devel/py-cattrs: Makefile PLIST distinfo

Log Message:
py-cattrs: update to 25.1.1.

## 25.1.1 (2025-06-04)

- Fixed `AttributeError: no attribute '__parameters__'` while structuring attrs classes that inherit from parametrized generic aliases from `collections.abc`.

## 25.1.0 (2025-05-31)

- **Potentially breaking**: The converters raise {class}`StructureHandlerNotFoundError` more eagerly (on hook creation, instead of on hook use).
  This helps surfacing problems with missing hooks sooner.
  See [Migrations](https://catt.rs/en/latest/migrations.html#the-default-structure-hook-fallback-factory) for steps to restore legacy behavior.
- Add a [Migrations](https://catt.rs/en/latest/migrations.html) page, with instructions on migrating changed behavior for each version.
- [`typing.Self`](https://docs.python.org/3/library/typing.html#typing.Self) is now supported in _attrs_ classes, dataclasses, TypedDicts and the dict NamedTuple factories.
  See [`typing.Self`](https://catt.rs/en/latest/defaulthooks.html#typing-self) for details.
- PEP 695 type aliases can now be used with {meth}`BaseConverter.register_structure_hook` and {meth}`BaseConverter.register_unstructure_hook`.
  Previously, they required the use of {meth}`BaseConverter.register_structure_hook_func` (which is still supported).
- Expose {func}`cattrs.cols.mapping_unstructure_factory` through {mod}`cattrs.cols`.
- Some `defaultdicts` are now [supported by default](https://catt.rs/en/latest/defaulthooks.html#defaultdicts), and
  {func}`cattrs.cols.is_defaultdict` and {func}`cattrs.cols.defaultdict_structure_factory` are exposed through {mod}`cattrs.cols`.
- Generic PEP 695 type aliases are now supported.
- The [tagged union strategy](https://catt.rs/en/stable/strategies.html#tagged-unions-strategy) now also supports type aliases of unions.
- {meth}`Converter.copy` and {meth}`BaseConverter.copy` are correctly annotated as returning `Self`.
- Many preconf converters (_bson_, stdlib JSON, _cbor2_, _msgpack_, _msgspec_, _orjson_, _ujson_) skip unstructuring `int` and `str` enums,
  leaving them to the underlying libraries to handle with greater efficiency.
- The {class}`msgspec JSON preconf converter <cattrs.preconf.msgspec.MsgspecJsonConverter>` now handles dataclasses with private attributes more efficiently.
- Literals containing enums are now unstructured properly, and their unstructuring is greatly optimized in the _bson_, stdlib JSON, _cbor2_, _msgpack_, _msgspec_, _orjson_ and _ujson_ preconf 
converters.
- Preconf converters now handle dictionaries with literal keys properly.
- Structuring TypedDicts from invalid inputs now properly raises a {class}`ClassValidationError`.
- {func}`cattrs.strategies.include_subclasses` now properly works with generic parent classes.
- Replace `cattrs.gen.MappingStructureFn` with {class}`cattrs.SimpleStructureHook`.
- Python 3.13 is now supported.
- Python 3.8 is no longer supported, as it is end-of-life. Use previous versions on this Python version.
- Change type of `Converter.__init__.unstruct_collection_overrides` from `Callable` to `Mapping[type, UnstructureHook]`
- Adopt the Contributor Covenant Code of Conduct (just like _attrs_).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/devel/py-cattrs/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/py-cattrs/PLIST
cvs rdiff -u -r1.9 -r1.10 pkgsrc/devel/py-cattrs/distinfo

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

Modified files:

Index: pkgsrc/devel/py-cattrs/Makefile
diff -u pkgsrc/devel/py-cattrs/Makefile:1.11 pkgsrc/devel/py-cattrs/Makefile:1.12
--- pkgsrc/devel/py-cattrs/Makefile:1.11        Tue Apr  1 09:53:33 2025
+++ pkgsrc/devel/py-cattrs/Makefile     Sat Jun  7 22:03:32 2025
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.11 2025/04/01 09:53:33 adam Exp $
+# $NetBSD: Makefile,v 1.12 2025/06/07 22:03:32 wiz Exp $
 
-DISTNAME=      cattrs-24.1.3
+DISTNAME=      cattrs-25.1.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=c/cattrs/}
@@ -12,29 +12,37 @@ LICENSE=    mit
 
 TOOL_DEPENDS+= ${PYPKGPREFIX}-hatch-vcs>0:../../devel/py-hatch-vcs
 TOOL_DEPENDS+= ${PYPKGPREFIX}-hatchling>0:../../devel/py-hatchling
-DEPENDS+=      ${PYPKGPREFIX}-attrs>=23.1.0:../../devel/py-attrs
+DEPENDS+=      ${PYPKGPREFIX}-attrs>=24.3.0:../../devel/py-attrs
+DEPENDS+=      ${PYPKGPREFIX}-typing-extensions>=4.1.0:../../devel/py-typing-extensions
 # optional dependency
 # https://github.com/py-bson/bson/issues/122
 #TEST_DEPENDS+=        ${PYPKGPREFIX}-bson>=0:../../wip/py-bson
-TEST_DEPENDS+= ${PYPKGPREFIX}-coverage>=7.4.0:../../devel/py-coverage
-TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis>=6.79.4:../../devel/py-hypothesis
+TEST_DEPENDS+= ${PYPKGPREFIX}-coverage>=7.6.1:../../devel/py-coverage
+TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis>=6.111.2:../../devel/py-hypothesis
 TEST_DEPENDS+= ${PYPKGPREFIX}-immutables>=0.20:../../misc/py-immutables
 TEST_DEPENDS+= ${PYPKGPREFIX}-test-benchmark>=4.0.0:../../devel/py-test-benchmark
-TEST_DEPENDS+= ${PYPKGPREFIX}-test-xdist>=3.4.0:../../devel/py-test-xdist
+TEST_DEPENDS+= ${PYPKGPREFIX}-test-xdist>=3.6.1:../../devel/py-test-xdist
+# not listed in pyproject but used
+TEST_DEPENDS+= ${PYPKGPREFIX}-msgspec>=0:../../devel/py-msgspec
+TEST_DEPENDS+= ${PYPKGPREFIX}-yaml>=0:../../textproc/py-yaml
 
 USE_LANGUAGES= # none
 
 .include "../../lang/python/pyversion.mk"
 .if ${PYTHON_VERSION} < 311
 DEPENDS+=      ${PYPKGPREFIX}-exceptiongroup>=1.1.1:../../devel/py-exceptiongroup
-DEPENDS+=      ${PYPKGPREFIX}-typing-extensions>=4.1.0:../../devel/py-typing-extensions
 .endif
 
-# bson, see above
-# as of 23.2.1
-# 597 passed, 1 skipped, 15 xfailed
+# as of 25.1.1
+# 838 passed, 15 xfailed
+
+# bson, see above; leading to
+# tests/preconf/test_pyyaml.py:13: in <module>
+#     from ..test_preconf import Everything, everythings, native_unions
+# E   ModuleNotFoundError: No module named 'tests.test_preconf'
 pre-test:
        ${RM} -f ${WRKSRC}/tests/test_preconf.py
+       ${RM} -f ${WRKSRC}/tests/preconf/test_pyyaml.py
 
 .include "../../lang/python/wheel.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/devel/py-cattrs/PLIST
diff -u pkgsrc/devel/py-cattrs/PLIST:1.5 pkgsrc/devel/py-cattrs/PLIST:1.6
--- pkgsrc/devel/py-cattrs/PLIST:1.5    Fri Aug 30 07:18:11 2024
+++ pkgsrc/devel/py-cattrs/PLIST        Sat Jun  7 22:03:32 2025
@@ -1,8 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2024/08/30 07:18:11 adam Exp $
-${PYSITELIB}/${WHEEL_INFODIR}/METADATA
-${PYSITELIB}/${WHEEL_INFODIR}/RECORD
-${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
-${PYSITELIB}/${WHEEL_INFODIR}/licenses/LICENSE
+@comment $NetBSD: PLIST,v 1.6 2025/06/07 22:03:32 wiz Exp $
 ${PYSITELIB}/cattr/__init__.py
 ${PYSITELIB}/cattr/__init__.pyc
 ${PYSITELIB}/cattr/__init__.pyo
@@ -46,6 +42,10 @@ ${PYSITELIB}/cattr/preconf/ujson.py
 ${PYSITELIB}/cattr/preconf/ujson.pyc
 ${PYSITELIB}/cattr/preconf/ujson.pyo
 ${PYSITELIB}/cattr/py.typed
+${PYSITELIB}/${WHEEL_INFODIR}/METADATA
+${PYSITELIB}/${WHEEL_INFODIR}/RECORD
+${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
+${PYSITELIB}/${WHEEL_INFODIR}/licenses/LICENSE
 ${PYSITELIB}/cattrs/__init__.py
 ${PYSITELIB}/cattrs/__init__.pyc
 ${PYSITELIB}/cattrs/__init__.pyo
@@ -91,6 +91,9 @@ ${PYSITELIB}/cattrs/gen/_shared.pyo
 ${PYSITELIB}/cattrs/gen/typeddicts.py
 ${PYSITELIB}/cattrs/gen/typeddicts.pyc
 ${PYSITELIB}/cattrs/gen/typeddicts.pyo
+${PYSITELIB}/cattrs/literals.py
+${PYSITELIB}/cattrs/literals.pyc
+${PYSITELIB}/cattrs/literals.pyo
 ${PYSITELIB}/cattrs/preconf/__init__.py
 ${PYSITELIB}/cattrs/preconf/__init__.pyc
 ${PYSITELIB}/cattrs/preconf/__init__.pyo
@@ -134,6 +137,12 @@ ${PYSITELIB}/cattrs/strategies/_subclass
 ${PYSITELIB}/cattrs/strategies/_unions.py
 ${PYSITELIB}/cattrs/strategies/_unions.pyc
 ${PYSITELIB}/cattrs/strategies/_unions.pyo
+${PYSITELIB}/cattrs/typealiases.py
+${PYSITELIB}/cattrs/typealiases.pyc
+${PYSITELIB}/cattrs/typealiases.pyo
+${PYSITELIB}/cattrs/types.py
+${PYSITELIB}/cattrs/types.pyc
+${PYSITELIB}/cattrs/types.pyo
 ${PYSITELIB}/cattrs/v.py
 ${PYSITELIB}/cattrs/v.pyc
 ${PYSITELIB}/cattrs/v.pyo

Index: pkgsrc/devel/py-cattrs/distinfo
diff -u pkgsrc/devel/py-cattrs/distinfo:1.9 pkgsrc/devel/py-cattrs/distinfo:1.10
--- pkgsrc/devel/py-cattrs/distinfo:1.9 Tue Apr  1 09:53:33 2025
+++ pkgsrc/devel/py-cattrs/distinfo     Sat Jun  7 22:03:32 2025
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.9 2025/04/01 09:53:33 adam Exp $
+$NetBSD: distinfo,v 1.10 2025/06/07 22:03:32 wiz Exp $
 
-BLAKE2s (cattrs-24.1.3.tar.gz) = 4dd3fe9dc4d52f8021f628075a09de213444bda51c641f1c5aab58940ae6fccd
-SHA512 (cattrs-24.1.3.tar.gz) = 5b1901720133b5908798d544e95e88ebe4bb26b75e4bcb7701330b54617f604c57ec26e0476a7409a937d09d6b28b3e13f7585d16706db3f396eb086731b3755
-Size (cattrs-24.1.3.tar.gz) = 426684 bytes
+BLAKE2s (cattrs-25.1.1.tar.gz) = d0d74b95b4599e2db2dad6a092b3b71bd9fe529c193b610f9d9d46801ea342fa
+SHA512 (cattrs-25.1.1.tar.gz) = 1d503032e1fbd921cd28db02b05b0c6d3ec329317acc1493613ebc1fde2666727d3a57b917a6e786de3c504ad3081c21e66d47cdf38b58d695b80fb767c6fdcf
+Size (cattrs-25.1.1.tar.gz) = 435016 bytes



Home | Main Index | Thread Index | Old Index