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: adam
Date: Fri Aug 30 07:18:12 UTC 2024
Modified Files:
pkgsrc/devel/py-cattrs: Makefile PLIST distinfo
Log Message:
py-cattrs: updated to 24.1.0
24.1.0 (2024-08-28)
- **Potentially breaking**: Unstructuring hooks for `typing.Any` are consistent now: values are unstructured using their runtime type.
Previously this behavior was underspecified and inconsistent, but followed this rule in the majority of cases.
Reverting old behavior is very dependent on the actual case; ask on the issue tracker if in doubt.
- **Minor change**: Heterogeneous tuples are now unstructured into tuples instead of lists by default; this is significantly faster and widely supported by serialization libraries.
- **Minor change**: {py:func}`cattrs.gen.make_dict_structure_fn` will use the value for the `prefer_attrib_converters` parameter from the given converter by default now.
If you're using this function directly, the old behavior can be restored by passing in the desired values explicitly.
- Introduce {meth}`BaseConverter.get_structure_hook` and {meth}`BaseConverter.get_unstructure_hook` methods.
- {meth}`BaseConverter.register_structure_hook`, {meth}`BaseConverter.register_unstructure_hook`,
{meth}`BaseConverter.register_unstructure_hook_factory` and {meth}`BaseConverter.register_structure_hook_factory`
can now be used as decorators and have gained new features.
See [here](https://catt.rs/en/latest/customizing.html#use-as-decorators) and [here](https://catt.rs/en/latest/customizing.html#id1) for more details.
- Introduce and [document](https://catt.rs/en/latest/customizing.html#customizing-collections) the {mod}`cattrs.cols` module for better collection customizations.
- Enhance the {func}`cattrs.cols.is_mapping` predicate function to also cover virtual subclasses of `abc.Mapping`.
This enables map classes from libraries such as _immutables_ or _sortedcontainers_ to structure out-of-the-box.
- Introduce the [_msgspec_](https://jcristharif.com/msgspec/) {mod}`preconf converter <cattrs.preconf.msgspec>`.
Only JSON is supported for now, with other formats supported by _msgspec_ to come later.
- The default union handler now properly takes renamed fields into account.
- The default union handler now also handles dataclasses.
- Add support for [PEP 695](https://peps.python.org/pep-0695/) type aliases.
- Add support for [PEP 696](https://peps.python.org/pep-0696/) `TypeVar`s with defaults.
- Add support for named tuples with type metadata ([`typing.NamedTuple`](https://docs.python.org/3/library/typing.html#typing.NamedTuple)).
- Add support for optionally un/unstructuring named tuples using dictionaries.
- The `include_subclasses` strategy now fetches the member hooks from the converter (making use of converter defaults) if overrides are not provided, instead of generating new hooks with no overrides.
- The preconf `make_converter` factories are now correctly typed.
- The {class}`orjson preconf converter <cattrs.preconf.orjson.OrjsonConverter>` now passes through dates and datetimes to orjson while unstructuring, greatly improving speed.
- {mod}`cattrs.gen` generators now attach metadata to the generated functions, making them introspectable.
- Structure hook factories in {mod}`cattrs.gen` now handle recursive classes better.
- The [tagged union strategy](https://catt.rs/en/stable/strategies.html#tagged-unions-strategy) now leaves the tags in the payload unless `forbid_extra_keys` is set.
- More robust support for `Annotated` and `NotRequired` in TypedDicts.
- `typing_extensions.Literal` is now automatically structured, just like `typing.Literal`.
- `typing_extensions.Any` is now supported and handled like `typing.Any`.
- `Optional` types can now be consistently customized using `register_structure_hook` and `register_unstructure_hook`.
- The BaseConverter now properly generates detailed validation errors for mappings.
- [PEP 695](https://peps.python.org/pep-0695/) generics are now tested.
- Imports are now sorted using Ruff.
- Tests are run with the pytest-xdist plugin by default.
- Rework the introductory parts of the documentation, introducing the Basics section.
- The documentation has been significantly reworked.
- The docs now use the Inter font.
- Make type annotations for `include_subclasses` and `tagged_union` strategies more lenient.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/devel/py-cattrs/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/py-cattrs/PLIST
cvs rdiff -u -r1.5 -r1.6 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.7 pkgsrc/devel/py-cattrs/Makefile:1.8
--- pkgsrc/devel/py-cattrs/Makefile:1.7 Fri Dec 1 12:58:12 2023
+++ pkgsrc/devel/py-cattrs/Makefile Fri Aug 30 07:18:11 2024
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.7 2023/12/01 12:58:12 adam Exp $
+# $NetBSD: Makefile,v 1.8 2024/08/30 07:18:11 adam Exp $
-DISTNAME= cattrs-23.2.3
+DISTNAME= cattrs-24.1.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_PYPI:=c/cattrs/}
@@ -10,19 +10,25 @@ HOMEPAGE= https://github.com/python-attr
COMMENT= Composable complex class support for attrs and dataclasses
LICENSE= mit
-TOOL_DEPENDS+= ${PYPKGPREFIX}-hatchling>=0:../../devel/py-hatchling
-TOOL_DEPENDS+= ${PYPKGPREFIX}-hatch-vcs>=0:../../devel/py-hatch-vcs
-DEPENDS+= ${PYPKGPREFIX}-attrs>=20:../../devel/py-attrs
+TOOL_DEPENDS+= ${PYPKGPREFIX}-hatchling>0:../../devel/py-hatchling
+TOOL_DEPENDS+= ${PYPKGPREFIX}-hatch-vcs>0:../../devel/py-hatch-vcs
+DEPENDS+= ${PYPKGPREFIX}-attrs>=23.1.0:../../devel/py-attrs
# optional dependency
# https://github.com/py-bson/bson/issues/122
#TEST_DEPENDS+= ${PYPKGPREFIX}-bson>=0:../../wip/py-bson
-TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis>=0:../../devel/py-hypothesis
-TEST_DEPENDS+= ${PYPKGPREFIX}-immutables>=0:../../misc/py-immutables
-TEST_DEPENDS+= ${PYPKGPREFIX}-test-benchmark>=0:../../devel/py-test-benchmark
+TEST_DEPENDS+= ${PYPKGPREFIX}-coverage>=7.4.0:../../devel/py-coverage
+TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis>=6.79.4:../../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
USE_LANGUAGES= # none
-PYTHON_VERSIONS_INCOMPATIBLE= 27
+.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
@@ -30,12 +36,5 @@ PYTHON_VERSIONS_INCOMPATIBLE= 27
pre-test:
${RM} -f ${WRKSRC}/tests/test_preconf.py
-.include "../../lang/python/pyversion.mk"
-
-.if ${PYTHON_VERSION} < 311
-DEPENDS+= ${PYPKGPREFIX}-exceptiongroup>=0:../../devel/py-exceptiongroup
-DEPENDS+= ${PYPKGPREFIX}-typing-extensions>=4.1.0:../../devel/py-typing-extensions
-.endif
-
.include "../../lang/python/wheel.mk"
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/py-cattrs/PLIST
diff -u pkgsrc/devel/py-cattrs/PLIST:1.4 pkgsrc/devel/py-cattrs/PLIST:1.5
--- pkgsrc/devel/py-cattrs/PLIST:1.4 Sun Nov 19 14:09:31 2023
+++ pkgsrc/devel/py-cattrs/PLIST Fri Aug 30 07:18:11 2024
@@ -1,4 +1,8 @@
-@comment $NetBSD: PLIST,v 1.4 2023/11/19 14:09:31 wiz Exp $
+@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
${PYSITELIB}/cattr/__init__.py
${PYSITELIB}/cattr/__init__.pyc
${PYSITELIB}/cattr/__init__.pyo
@@ -42,10 +46,6 @@ ${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
@@ -55,6 +55,9 @@ ${PYSITELIB}/cattrs/_compat.pyo
${PYSITELIB}/cattrs/_generics.py
${PYSITELIB}/cattrs/_generics.pyc
${PYSITELIB}/cattrs/_generics.pyo
+${PYSITELIB}/cattrs/cols.py
+${PYSITELIB}/cattrs/cols.pyc
+${PYSITELIB}/cattrs/cols.pyo
${PYSITELIB}/cattrs/converters.py
${PYSITELIB}/cattrs/converters.pyc
${PYSITELIB}/cattrs/converters.pyo
@@ -103,6 +106,9 @@ ${PYSITELIB}/cattrs/preconf/json.pyo
${PYSITELIB}/cattrs/preconf/msgpack.py
${PYSITELIB}/cattrs/preconf/msgpack.pyc
${PYSITELIB}/cattrs/preconf/msgpack.pyo
+${PYSITELIB}/cattrs/preconf/msgspec.py
+${PYSITELIB}/cattrs/preconf/msgspec.pyc
+${PYSITELIB}/cattrs/preconf/msgspec.pyo
${PYSITELIB}/cattrs/preconf/orjson.py
${PYSITELIB}/cattrs/preconf/orjson.pyc
${PYSITELIB}/cattrs/preconf/orjson.pyo
Index: pkgsrc/devel/py-cattrs/distinfo
diff -u pkgsrc/devel/py-cattrs/distinfo:1.5 pkgsrc/devel/py-cattrs/distinfo:1.6
--- pkgsrc/devel/py-cattrs/distinfo:1.5 Fri Dec 1 12:58:12 2023
+++ pkgsrc/devel/py-cattrs/distinfo Fri Aug 30 07:18:11 2024
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.5 2023/12/01 12:58:12 adam Exp $
+$NetBSD: distinfo,v 1.6 2024/08/30 07:18:11 adam Exp $
-BLAKE2s (cattrs-23.2.3.tar.gz) = 9191150c13174bf163d3f6a1e7a49ee0e312ced25589f2e95e3ac40930b43261
-SHA512 (cattrs-23.2.3.tar.gz) = 1defa5b8f43eb0c585db09bbca54358ab9595e0842ace37b8980d8f3d48f2690675b0901d1cb9636fcd8cd81859b5c65df2034867a9b8b4ed4776ba9ed7945a3
-Size (cattrs-23.2.3.tar.gz) = 610215 bytes
+BLAKE2s (cattrs-24.1.0.tar.gz) = d149407e706da06f956ff821681dabecf81963a3d82614434d2d4dbbb1002866
+SHA512 (cattrs-24.1.0.tar.gz) = df2b8c79f0ca417e747a4eaca8c3179fb68cadb5a3e21ac5b31adbf6e23b2cb1c347e588ff6052d8c95429edc35fa46b008357bde83f975c1447abfcb2976477
+Size (cattrs-24.1.0.tar.gz) = 426198 bytes
Home |
Main Index |
Thread Index |
Old Index