forked from pool/python-cattrs
Compare commits
8 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 2c96a04e2a | |||
| 44b2c79ae8 | |||
| 7d20680956 | |||
| cf71db5484 | |||
| 116e91a3ab | |||
| dd2c4d5779 | |||
| 31ca8d3ec6 | |||
| e9d5696d18 |
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a934090d95abaa9e911dac357e3a8699e0b4b14f8529bcc7d2b1ad9d51672b9f
|
||||
size 610215
|
||||
3
cattrs-25.3.0.tar.gz
Normal file
3
cattrs-25.3.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1ac88d9e5eda10436c4517e390a4142d88638fe682c436c93db7ce4a277b884a
|
||||
size 509321
|
||||
@@ -1,3 +1,107 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 17 02:10:39 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 25.3.0:
|
||||
* Potentially breaking: Abstract sets are now structured into frozensets.
|
||||
* Python 3.14 is now supported and part of the test matrix.
|
||||
* Fix unstructuring NewTypes with the {class}BaseConverter.
|
||||
* Make some Hypothesis tests more robust.
|
||||
* {func}cattrs.strategies.include_subclasses now works with generic parent
|
||||
classes and the tagged union strategy.
|
||||
* Potentially breaking: Sequences are now structured into tuples.
|
||||
* Add a use_alias parameter to cattrs.Converter.
|
||||
* The union passthrough strategy now by default accepts ints for unions
|
||||
that contain floats but not ints, when configured to be able to handle
|
||||
both ints and floats. This more closely matches the current typing
|
||||
behavior.
|
||||
* Fix unstructuring of generic classes with stringified annotations.
|
||||
* The default disambiguation hook factory is now only enabled for
|
||||
converters with unstructure_strat=AS_DICT (the default).
|
||||
* Switch to uv and just in lieu of PDM, tox and Make.
|
||||
* Fixed AttributeError: no attribute '__parameters__' while structuring
|
||||
attrs classes that inherit from parametrized generic aliases from
|
||||
collections.abc.
|
||||
* Potentially breaking: The converters raise StructureHandlerNotFoundError
|
||||
more eagerly (on hook creation, instead of on hook use). This helps
|
||||
surfacing problems with missing hooks sooner.
|
||||
* typing.Self is now supported in attrs classes, dataclasses, TypedDicts
|
||||
and the dict NamedTuple factories. See typing.Self for details.
|
||||
* PEP 695 type aliases can now be used with
|
||||
BaseConverter.register_structure_hook and
|
||||
BaseConverter.register_unstructure_hook. Previously, they required the
|
||||
use of BaseConverter.register_structure_hook_func.
|
||||
* Some defaultdicts are now supported by default, and
|
||||
cattrs.cols.is_defaultdict and cattrs.cols.defaultdict_structure_factory
|
||||
are exposed through cattrs.cols.
|
||||
* Generic PEP 695 type aliases are now supported.
|
||||
* The tagged union strategy now also supports type aliases of unions.
|
||||
* Converter.copy and 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 msgspec JSON preconf converter now handles dataclasses with private
|
||||
attributes more efficiently.
|
||||
* Preconf converters now handle dictionaries with literal keys properly.
|
||||
* Structuring TypedDicts from invalid inputs now properly raises a
|
||||
ClassValidationError.
|
||||
* cattrs.strategies.include_subclasses now properly works with generic
|
||||
parent classes.
|
||||
* Python 3.13 is now supported.
|
||||
* Python 3.8 is no longer supported, as it is end-of-life.
|
||||
- Dropped patches, no longer required:
|
||||
* fix-test-no-nans.patch
|
||||
* support-python-3.13.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 7 11:21:09 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 24.1.3
|
||||
* Fix structuring of keyword-only dataclass fields when not
|
||||
using detailed validation. (#637)
|
||||
- Refresh support-python-3.13.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 15 14:19:05 UTC 2024 - Yunus Acar <yunus.acar@suse.com>
|
||||
|
||||
- add fix-test-no-nans.patch to get the tests to work with the
|
||||
latest attrs
|
||||
- add support-python-3.13.patch to add python-3.13 support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 28 22:38:02 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 24.1.2:
|
||||
* Fix {meth}`BaseConverter.register_structure_hook` and
|
||||
{meth}`BaseConverter.register_unstructure_hook` type hints.
|
||||
* Fix {meth}`BaseConverter.register_structure_hook_factory` and
|
||||
{meth}`BaseConverter.register_unstructure_hook_factory` type
|
||||
hints.
|
||||
* **Potentially breaking**: Unstructuring hooks for
|
||||
`typing.Any` are consistent now: values are unstructured
|
||||
using their runtime type.
|
||||
* Introduce {meth}`BaseConverter.get_structure_hook` and
|
||||
{meth}`BaseConverter.get_unstructure_hook` methods.
|
||||
* Enhance the {func}`cattrs.cols.is_mapping` predicate function
|
||||
to also cover virtual subclasses of `abc.Mapping`.
|
||||
* Introduce the _msgspec_ {mod}`preconf converter
|
||||
<cattrs.preconf.msgspec>`.
|
||||
* Add support for PEP 695 type aliases.
|
||||
* Add support for PEP 696 `TypeVar`s with defaults.
|
||||
* Add support for named tuples with type metadata
|
||||
(`typing.NamedTuple`).
|
||||
* Add support for optionally un/unstructuring named tuples
|
||||
using dictionaries.
|
||||
* PEP 695 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.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 8 10:41:21 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-cattrs
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,37 +18,40 @@
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-cattrs
|
||||
Version: 23.2.3
|
||||
Version: 25.3.0
|
||||
Release: 0
|
||||
Summary: Composable complex class support for attrs and dataclasses
|
||||
License: MIT
|
||||
URL: https://github.com/python-attrs/cattrs
|
||||
Source: https://files.pythonhosted.org/packages/source/c/cattrs/cattrs-%{version}.tar.gz
|
||||
Requires: python-exceptiongroup
|
||||
BuildRequires: %{python_module base >= 3.9}
|
||||
BuildRequires: %{python_module hatch-vcs}
|
||||
BuildRequires: %{python_module hatchling}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module poetry-core >= 1.1}
|
||||
BuildRequires: python-rpm-macros
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module attrs >= 20}
|
||||
BuildRequires: %{python_module attrs >= 25.4}
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
BuildRequires: %{python_module cbor2}
|
||||
BuildRequires: %{python_module hypothesis}
|
||||
BuildRequires: %{python_module immutables}
|
||||
BuildRequires: %{python_module msgpack >= 1.0.2}
|
||||
BuildRequires: %{python_module msgspec}
|
||||
BuildRequires: %{python_module orjson}
|
||||
BuildRequires: %{python_module pymongo}
|
||||
BuildRequires: %{python_module pytest-benchmark}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module tomlkit}
|
||||
BuildRequires: %{python_module typing_extensions}
|
||||
BuildRequires: %{python_module typing_extensions >= 4.14}
|
||||
BuildRequires: %{python_module ujson}
|
||||
# /SECTION
|
||||
BuildRequires: fdupes
|
||||
Requires: python-attrs >= 20
|
||||
Requires: python-cbor2
|
||||
Requires: python-typing_extensions
|
||||
Requires: python-attrs >= 25.4
|
||||
%if %python_version_nodots < 311
|
||||
Requires: python-exceptiongroup >= 1.1.1
|
||||
%endif
|
||||
Requires: python-typing_extensions >= 4.14
|
||||
Suggests: python-cbor2
|
||||
Suggests: python-ujson
|
||||
Suggests: python-orjson
|
||||
Suggests: python-msgpack
|
||||
|
||||
Reference in New Issue
Block a user