BSD Ports

devel/py-cattrs 26.2.0 NetBSD

Composable complex class support for attrs and dataclasses

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
Last update
Commit
2274490a43
License
mit
Categories
devel, python
Package size
134.6 KiB, 920.0 KiB installed

Description

cattrs is an open source Python library for structuring and unstructuring data. cattrs works best with attrs classes, dataclasses and the usual Python collections, but other kinds of classes are supported by manually registering converters.

Python has a rich set of powerful, easy to use, built-in data types like dictionaries, lists and tuples. These data types are also the lingua franca of most data serialization libraries, for formats like json, msgpack, yaml or toml.

Data types like this, and mappings like dict s in particular, represent unstructured data. Your data is, in all likelihood, structured: not all combinations of field names or values are valid inputs to your programs. In Python, structured data is better represented with classes and enumerations. attrs is an excellent library for declaratively describing the structure of your data, and validating it.

When you're handed unstructured data (by your network, file system, database...), cattrs helps to convert this data into structured data. When you have to convert your structured data into data types other libraries can handle, cattrs turns your classes and enumerations into dictionaries, integers and strings.

In the other systems

The newest version among them is 26.2.1, as upstream numbers it.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
NetBSDdevel/py-cattrs26.2.0none known-[email protected]2026-10-16
FreeBSDdevel/py-cattrs26.2.0none known-[email protected]2026-09-12
OpenBSDdevel/py-cattrs26.2.1 newestno data-The OpenBSD ports mailing-list <[email protected]>2026-10-16
DragonFlydevel/py-cattrs24.1.2none known-[email protected]-
MidnightBSDdevel/py-cattrs23.2.3_1no data-[email protected]-
HardenedBSDdevel/py-cattrs26.2.0no data-[email protected]-
GhostBSDdevel/py-cattrs26.2.0no data-[email protected]-

Compare across BSDs

Install

Binary package:

pkgin install py311-cattrs

From pkgsrc:

cd /usr/pkgsrc/devel/py-cattrs && make install clean

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

RepositoryVersion
NetBSD 10.1 x86_6426.2.0
NetBSD 10.1 aarch6426.1.0
SmartOS / illumos x86_6426.2.1
macOS 15 arm6426.2.1

Dependencies

Run dependencies 3

Configuration

No options to configure.

Service scripts
none
Flavors
py312-cattrs-26.2.0, py313-cattrs-26.2.0, py314-cattrs-26.2.0

Commit history 3

DateCommitCreditsLog message
2274490a43 adam py-cattrs: forget Python 3.10
80df226c28 wiz py-cattrs: update to 26.2.1.
## 26.2.1 (2026-09-26) - Fix heterogeneous tuples and `NamedTuple`s with a member type containing a quote in its `repr`, like `tuple[Literal["a"], int]`, crashing structuring code generation with `SyntaxError`; the index note is now embedded with `repr`. - Fix {func}`transform_error <cattrs.transform_error>` listing the extra keys of a `ForbiddenExtraKeysError` in set iteration order, which made the message differ between runs; the keys are now sorted, like the error's own `__str__` already sorts them.
34686975a3 adam py-cattrs: updated to 26.2.0
26.2.0 (2026-09-08) - Fix the `msgpack` and `cbor2` converters unstructuring naive datetimes as local time, which made the serialized value depend on the timezone of the machine doing the unstructuring; naive datetimes are now assumed to be UTC, matching what the structure hooks already read back. - Fix `override(rename=...)` targets containing a quote (or other characters not safe in a bare string literal) crashing code generation with `SyntaxError`; the rename key is now embedded with `repr`. - Fix `Counter` keys not being unstructured with the key type's own hook; the single-type-arg branch passed the whole type-args tuple to the key hook lookup instead of the key type. …