15
0
forked from pool/python-attrs

32 Commits

Author SHA256 Message Date
a327706da3 Accepting request 1318118 from devel:languages:python
- Update to 25.4.0:
  * Class-level kw_only=True behavior is now consistent with dataclasses.
  * Values passed to the __init__() method of attrs classes are now correctly
    passed to __attrs_pre_init__() instead of their default values (in cases
    where kw_only was not specified).
  * Added support for Python 3.14 and PEP 749.
  * attrs.validators.deep_mapping() now allows to leave out either
    key_validator xor value_validator.
  * attrs.validators.deep_iterator() and attrs.validators.deep_mapping() now
    accept lists and tuples for all validators and wrap them into a
    attrs.validators.and_().
  * Added a new experimental way to inspect classes.
  * Fixed annotations for attrs.field(converter=...). Previously, a tuple of
    converters was only accepted if it had exactly one element.
  * The performance of attrs.asdict() has been improved by 45–260%.
  * The performance of attrs.astuple() has been improved by 49–270%.
  * The type annotation for attrs.validators.or_() now allows for different
    types of validators.

OBS-URL: https://build.opensuse.org/request/show/1318118
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=28
2025-11-18 14:28:28 +00:00
b0db76addf - Update to 25.4.0:
* Class-level kw_only=True behavior is now consistent with dataclasses.
  * Values passed to the __init__() method of attrs classes are now correctly
    passed to __attrs_pre_init__() instead of their default values (in cases
    where kw_only was not specified).
  * Added support for Python 3.14 and PEP 749.
  * attrs.validators.deep_mapping() now allows to leave out either
    key_validator xor value_validator.
  * attrs.validators.deep_iterator() and attrs.validators.deep_mapping() now
    accept lists and tuples for all validators and wrap them into a
    attrs.validators.and_().
  * Added a new experimental way to inspect classes.
  * Fixed annotations for attrs.field(converter=...). Previously, a tuple of
    converters was only accepted if it had exactly one element.
  * The performance of attrs.asdict() has been improved by 45–260%.
  * The performance of attrs.astuple() has been improved by 49–270%.
  * The type annotation for attrs.validators.or_() now allows for different
    types of validators.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-attrs?expand=0&rev=59
2025-11-17 02:11:14 +00:00
199d582044 Accepting request 1304694 from devel:languages:python
- update to 25.3.0:
  * Restore support for generator-based `field_transformer`s.
  * Checking mandatory vs non-mandatory attribute order is now
    performed after the field transformer, since the field
    transformer may change attributes and/or their order.
  * `attrs.make_class()` now allows for Unicode class names.
  * Speed up class creation by 30%-50% by compiling methods only
    once and using a variety of other techniques.
  * The error message if an attribute has both an annotation and
    a type argument will now disclose _what_ attribute seems to
    be the problem.

OBS-URL: https://build.opensuse.org/request/show/1304694
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=27
2025-09-15 17:50:32 +00:00
0addb8c61b - update to 25.3.0:
* Restore support for generator-based `field_transformer`s.
  * Checking mandatory vs non-mandatory attribute order is now
    performed after the field transformer, since the field
    transformer may change attributes and/or their order.
  * `attrs.make_class()` now allows for Unicode class names.
  * Speed up class creation by 30%-50% by compiling methods only
    once and using a variety of other techniques.
  * The error message if an attribute has both an annotation and
    a type argument will now disclose _what_ attribute seems to
    be the problem.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-attrs?expand=0&rev=57
2025-07-12 11:37:36 +00:00
00cbfa2860 Accepting request 1234568 from devel:languages:python
- update to 24.3.0:
  * Python 3.7 has been dropped.
  * Introduce `attrs.NothingType`, for annotating types
    consistent with `attrs.NOTHING`.
  * Allow mutating `__suppress_context__` and `__notes__` on
    frozen exceptions.
  * `attrs.converters.optional()` works again when taking
    `attrs.converters.pipe()` or another Converter as its
    argument.
  * *attrs* instances now support `copy.replace()`.
  * `attrs.validators.instance_of()`'s type hints now allow for
    union types.
  * For example: `instance_of(str | int)`

OBS-URL: https://build.opensuse.org/request/show/1234568
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=26
2025-01-06 15:04:53 +00:00
c1a34be66e - update to 24.3.0:
* Python 3.7 has been dropped.
  * Introduce `attrs.NothingType`, for annotating types
    consistent with `attrs.NOTHING`.
  * Allow mutating `__suppress_context__` and `__notes__` on
    frozen exceptions.
  * `attrs.converters.optional()` works again when taking
    `attrs.converters.pipe()` or another Converter as its
    argument.
  * *attrs* instances now support `copy.replace()`.
  * `attrs.validators.instance_of()`'s type hints now allow for
    union types.
  * For example: `instance_of(str | int)`

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-attrs?expand=0&rev=55
2025-01-02 14:13:19 +00:00
2ec451b24f Accepting request 1221445 from devel:languages:python
- Upgrade to 24.2.0:
  - Big releases always carry the risk of regressions, but never
    did I expect to break Python 3.14’s CI! On the plus side,
    attrs runs on 3.14 now.
- Upgrade to 24.1.0:
  - The most notable is probably the possibility to receive self
    and field definitions in your converters by wrapping them
    into a attrs.Converter.
  - The other big thing is our own replacement
    for __init_subclass__ called (you guessed it)
    __attrs_init_subclass__. Check out the docs, if you're not
    sure what this is good for.
  - Finally, we've made more important steps to promote our "new"
    APIs (can you believe they're 4 years old!?) in the docs. If
    we missed anything, please let us know.
- Remove upstreamed patch:
  - pytest8.patch

OBS-URL: https://build.opensuse.org/request/show/1221445
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=25
2024-11-07 15:23:48 +00:00
789d7e9f41 Fix %%files
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-attrs?expand=0&rev=53
2024-11-05 13:16:42 +00:00
ae5cd6f616 - Upgrade to 24.2.0:
- Big releases always carry the risk of regressions, but never
    did I expect to break Python 3.14’s CI! On the plus side,
    attrs runs on 3.14 now.
- Upgrade to 24.1.0:
  - The most notable is probably the possibility to receive self
    and field definitions in your converters by wrapping them
    into a attrs.Converter.
  - The other big thing is our own replacement
    for __init_subclass__ called (you guessed it)
    __attrs_init_subclass__. Check out the docs, if you're not
    sure what this is good for.
  - Finally, we've made more important steps to promote our "new"
    APIs (can you believe they're 4 years old!?) in the docs. If
    we missed anything, please let us know.
- Remove upstreamed patch:
  - pytest8.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-attrs?expand=0&rev=52
2024-11-05 13:09:50 +00:00
7a55b8459b Accepting request 1175271 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1175271
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=24
2024-05-21 16:34:31 +00:00
95121a381a Accepting request 1137517 from devel:languages:python
- update to 23.2.0:
  * The type annotation for `attrs.resolve_types()` is now
    correct.
  * Type stubs now use `typing.dataclass_transform` to decorate
    dataclass-like decorators, instead of the non-standard
    `__dataclass_transform__` special form, which is only
    supported by Pyright.
  * Fixed serialization of namedtuple fields using
    `attrs.asdict/astuple()` with `retain_collection_types=True`.
  * `attrs.AttrsInstance` is now a `typing.Protocol` in both type
    hints and code.
  * This allows you to subclass it along with another `Protocol`.
  * If *attrs* detects that `__attrs_pre_init__` accepts more
    than just `self`, it will call it with the same arguments as
    `__init__` was called.
  * This allows you to, for example, pass arguments to
    `super().__init__()`.
  * Slotted classes now transform `functools.cached_property`
    decorated methods to support equivalent semantics.
  * Added *class_body* argument to `attrs.make_class()` to
    provide additional attributes for newly created classes.
  * It is, for example, now possible to attach methods.

    be deeply immutable
- Initial version

OBS-URL: https://build.opensuse.org/request/show/1137517
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=23
2024-01-09 19:48:35 +00:00
4aa59c3a49 Accepting request 1095918 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1095918
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=22
2023-06-30 17:57:58 +00:00
6cab853594 Accepting request 1085487 from devel:languages:python
- Update to 23.1.0:
  # Backwards-incompatible Changes
  * Python 3.6 has been dropped and packaging switched to static
    package data using Hatch. #993
  # Deprecations
  * The support for zope-interface via the attrs.validators.provides
    validator is now deprecated and will be removed in, or after,
    April 2024.
  * The presence of a C-based package in our developement dependencies
    has caused headaches and we're not under the impression it's used
    a lot.
  * Let us know if you're using it and we might publish it as a
    separate package. #1120
  # Changes
  * attrs.filters.exclude() and attrs.filters.include() now support
    the passing of attribute names as strings. #1068
  * attrs.has() and attrs.fields() now handle generic classes
    correctly. #1079
  * Fix frozen exception classes when raised within e.g.
    contextlib.contextmanager, which mutates their __traceback__
    attributes. #1081
  * @frozen now works with type checkers that implement PEP-681 (ex.
    pyright). #1084
  * Restored ability to unpickle instances pickled before 22.2.0.
    #1085
  * attrs.asdict()'s and attrs.astuple()'s type stubs now accept the
    attrs.AttrsInstance protocol. #1090
  * Fix slots class cellvar updating closure in CPython 3.8+ even when
    __code__ introspection is unavailable. #1092
  * attrs.resolve_types() can now pass include_extras to
    typing.get_type_hints() on Python 3.9+, and does so by default.
    #1099
  * Added instructions for pull request workflow to CONTRIBUTING.md.
    #1105
  * Added type parameter to attrs.field() function for use with
    attrs.make_class().
  * Please note that type checkers ignore type metadata passed into
    make_class(), but it can be useful if you're wrapping attrs. #1107
  * It is now possible for attrs.evolve() (and attr.evolve()) to
    change fields named inst if the instance is passed as a positional
    argument.
  * Passing the instance using the inst keyword argument is now
    deprecated and will be removed in, or after, April 2024. #1117
  * attrs.validators.optional() now also accepts a tuple of validators
    (in addition to lists of validators). #1122

OBS-URL: https://build.opensuse.org/request/show/1085487
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=21
2023-05-19 09:55:08 +00:00
636b32d578 Accepting request 1081990 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1081990
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=20
2023-04-22 20:01:56 +00:00
aa049511b2 Accepting request 1046288 from devel:languages:python
- update to 22.2.0:
  * Python 3.5 is not supported anymore.
  * Python 3.6 is now deprecated and support will be removed in the next
    release.
  * `attrs.field()` now supports an *alias* option for explicit `__init__`
    argument names.
  * `attrs.NOTHING` is now an enum value, making it possible to use with
    e.g. `typing.Literal`.
  * Added missing re-import of `attr.AttrsInstance` to the `attrs`
    namespace.
  * Fix slight performance regression in classes with custom `__setattr__`
    and speedup even more.
  * Class-creation performance improvements by switching performance-
    sensitive templating operations to f-strings.

OBS-URL: https://build.opensuse.org/request/show/1046288
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=19
2023-01-04 16:50:55 +00:00
cddc260e02 Accepting request 1004944 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1004944
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=18
2022-09-21 12:41:46 +00:00
f0557ef664 Accepting request 993244 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/993244
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=17
2022-08-07 16:33:45 +00:00
cb55f111ee Accepting request 945429 from devel:languages:python
- update to 21.4.0:
  * Fixed the test suite on PyPy3.8 where ``cloudpickle`` does not work.
  * Fixed ``coverage report`` for projects that use ``attrs`` and don't
    set a ``--source``.
  * When using ``@define``, converters are now run by default when
    setting an attribute on an instance -- additionally to validators.
  * ``import attrs`` has finally landed!
  * ``attr.asdict(retain_collection_types=False)`` (default)
    dumps collection-esque keys as tuples.
  * ``__match_args__`` are now generated to support Python 3.10's
  * If the class-level *on_setattr* is set to ``attrs.setters.validate``
    (default in ``@define`` and ``@mutable``) but no field defines
    a validator, pretend that it's not set.
  * The generated ``__repr__`` is significantly faster on Pythons with
    f-strings.
  * Attributes transformed via ``field_transformer`` are wrapped with
    ``AttrsClass`` again.
  * Generated source code is now cached more efficiently for identical classes.
  * Added ``attrs.converters.to_bool()``.
  * ``attrs.resolve_types()`` now resolves types of subclasses after
    the parents are resolved.
  * Added new validators: ``lt(val)`` (< val), ``le(va)`` (≤ val),
    ``ge(val)`` (≥ val), ``gt(val)`` (> val), and ``maxlen(n)``.
  * ``attrs`` classes are now fully compatible with cloudpickle
  * Added new context manager ``attrs.validators.disabled()`` and
    functions ``attrs.validators.(set|get)_disabled()``.
    They deprecate ``attrs.(set|get)_run_validators()``.
    All functions are interoperable and modify the same internal state.
    They are not – and never were – thread-safe, though.

OBS-URL: https://build.opensuse.org/request/show/945429
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=16
2022-01-11 20:17:11 +00:00
e0674ec618 Accepting request 897252 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/897252
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=15
2021-06-11 20:29:52 +00:00
3985c2b1bd Accepting request 850938 from devel:languages:python
- update to 20.3.0:
  - ``attr.define()``, ``attr.frozen()``, ``attr.mutable()``, and ``attr.field()`` remain **provisional**.

OBS-URL: https://build.opensuse.org/request/show/850938
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=14
2020-11-29 11:19:29 +00:00
590805b1e5 Accepting request 837189 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/837189
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=13
2020-09-29 16:58:47 +00:00
5adfbf9efe Accepting request 807115 from devel:languages:python
- Do not restrict us to new setuptools, we generate stuff
  even with the older variants

OBS-URL: https://build.opensuse.org/request/show/807115
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=12
2020-05-28 07:07:40 +00:00
9c78b76da1 Accepting request 741439 from devel:languages:python
- update to 19.3.0
 * Fixed auto_attribs usage when default values cannot be compared directly
     with ==, such as numpy arrays.

- update to version 19.2.0:
  * Backward-incompatible Changes
    + Removed deprecated "Attribute" attribute "convert" per scheduled
      removal on 2019/1.  This planned deprecation is tracked in issue
      `#307 <https://github.com/python-attrs/attrs/issues/307>`_.
      `#504 <https://github.com/python-attrs/attrs/issues/504>`_
    + "__lt__", "__le__", "__gt__", and "__ge__" do not consider
      subclasses comparable anymore.  This has been deprecated since
      18.2.0 and was raising a "DeprecationWarning" for over a year.
      `#570 <https://github.com/python-attrs/attrs/issues/570>`_
  * Deprecations
    + The "cmp" argument to "attr.s()" and "attr.ib()" is now
      deprecated.  Please use "eq" to add equality methods ("__eq__"
      and "__ne__") and "order" to add ordering methods ("__lt__",
      "__le__", "__gt__", and "__ge__") instead – just like with
      `dataclasses
      <https://docs.python.org/3/library/dataclasses.html>`_.  Both
      are effectively "True" by default but it's enough to set
      "eq=False" to disable both at once.  Passing "eq=False,
      order=True" explicitly will raise a "ValueError" though.  Since
      this is arguably a deeper backward-compatibility break, it will
      have an extended deprecation period until 2021-06-01.  After
      that day, the "cmp" argument will be removed.  "attr.Attribute"
      also isn't orderable anymore.  `#574
      <https://github.com/python-attrs/attrs/issues/574>`_
  * Changes

OBS-URL: https://build.opensuse.org/request/show/741439
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=11
2019-11-04 16:08:06 +00:00
c90ed5f02c Accepting request 722713 from devel:languages:python
- Switch to multibuild to enable tests

OBS-URL: https://build.opensuse.org/request/show/722713
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=10
2019-08-14 09:37:22 +00:00
a540737d99 Accepting request 681547 from devel:languages:python
- update to 19.1.0
 * Fixed a bug where deserialized objects with cache_hash=True could have
    incorrect hash code values
 * Add is_callable, deep_iterable, and deep_mapping validators.
 * Fixed stub files to prevent errors raised by mypy's
    disallow_any_generics = True option.
 * Attributes with init=False now can follow after kw_only=True attributes.
 * attrs now has first class support for defining exception classes.
 * Clarified documentation for hashing to warn that hashable objects should
    be deeply immutable

OBS-URL: https://build.opensuse.org/request/show/681547
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=9
2019-03-08 12:28:37 +00:00
a51b334a37 Accepting request 655564 from devel:languages:python
- Fix fdupes call

OBS-URL: https://build.opensuse.org/request/show/655564
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=8
2018-12-14 19:45:26 +00:00
011afeab78 Accepting request 632660 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/632660
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=7
2018-09-05 11:47:07 +00:00
c6e6d37ab8 Accepting request 605119 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/605119
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=6
2018-05-11 09:25:55 +00:00
85ba436391 Accepting request 561518 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/561518
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=5
2018-01-16 08:34:45 +00:00
5895cc3d09 Accepting request 559130 from devel:languages:python
- add test requirements, run tests conditionally
  (not BuildRequiring pytest fixes bsc#1073845)

OBS-URL: https://build.opensuse.org/request/show/559130
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=4
2017-12-23 11:11:40 +00:00
71da1019d5 Accepting request 540454 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/540454
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=3
2017-11-12 16:59:28 +00:00
cb2f083518 Accepting request 507971 from devel:languages:python
1

OBS-URL: https://build.opensuse.org/request/show/507971
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-attrs?expand=0&rev=2
2017-07-11 06:25:02 +00:00
5 changed files with 84 additions and 51 deletions

Binary file not shown.

3
attrs-25.4.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:16d5969b87f0859ef33a48b35d55ac1be6e42ae49d5e853b597db70c35c57e11
size 934251

View File

@@ -1,41 +0,0 @@
From b9084fab02c009a593b604562a69f36a5915c8e5 Mon Sep 17 00:00:00 2001
From: Denis Laxalde <denis@laxalde.org>
Date: Sat, 2 Mar 2024 07:40:36 +0100
Subject: [PATCH] Remove pytest.deprecated_call() in TestAssoc::test_unknown
(#1249)
assoc() no longer raises a deprecation warning since commit
22ae8473fb88d6e585b05c709e81e1a46398a649 but the 'with
pytest.deprecated_call():' in that test was not removed then (in
contrast with other test cases).
Maybe this got unnoticed due to a pytest bug?
In any case, using pytest 8+ (and keeping deprecated_call()) shows that
no warning is raised and the test fails.
Removing the upper bound on pytest in dev dependencies as tests now
pass with pytest 8.0.
Fix #1233.
Co-authored-by: Hynek Schlawack <hs@ox.cx>
---
pyproject.toml | 3 +--
tests/test_funcs.py | 4 +---
2 files changed, 2 insertions(+), 5 deletions(-)
Index: attrs-23.2.0/tests/test_funcs.py
===================================================================
--- attrs-23.2.0.orig/tests/test_funcs.py
+++ attrs-23.2.0/tests/test_funcs.py
@@ -600,9 +600,7 @@ class TestAssoc:
AttrsAttributeNotFoundError.
"""
# No generated class will have a four letter attribute.
- with pytest.raises(
- AttrsAttributeNotFoundError
- ) as e, pytest.deprecated_call():
+ with pytest.raises(AttrsAttributeNotFoundError) as e:
assoc(C(), aaaa=2)
assert (f"aaaa is not an attrs attribute on {C!r}.",) == e.value.args

View File

@@ -1,3 +1,78 @@
-------------------------------------------------------------------
Mon Nov 17 02:10:33 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 25.4.0:
* Class-level kw_only=True behavior is now consistent with dataclasses.
* Values passed to the __init__() method of attrs classes are now correctly
passed to __attrs_pre_init__() instead of their default values (in cases
where kw_only was not specified).
* Added support for Python 3.14 and PEP 749.
* attrs.validators.deep_mapping() now allows to leave out either
key_validator xor value_validator.
* attrs.validators.deep_iterator() and attrs.validators.deep_mapping() now
accept lists and tuples for all validators and wrap them into a
attrs.validators.and_().
* Added a new experimental way to inspect classes.
* Fixed annotations for attrs.field(converter=...). Previously, a tuple of
converters was only accepted if it had exactly one element.
* The performance of attrs.asdict() has been improved by 45260%.
* The performance of attrs.astuple() has been improved by 49270%.
* The type annotation for attrs.validators.or_() now allows for different
types of validators.
-------------------------------------------------------------------
Sat Jul 12 11:37:13 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 25.3.0:
* Restore support for generator-based `field_transformer`s.
* Checking mandatory vs non-mandatory attribute order is now
performed after the field transformer, since the field
transformer may change attributes and/or their order.
* `attrs.make_class()` now allows for Unicode class names.
* Speed up class creation by 30%-50% by compiling methods only
once and using a variety of other techniques.
* The error message if an attribute has both an annotation and
a type argument will now disclose _what_ attribute seems to
be the problem.
-------------------------------------------------------------------
Thu Jan 2 14:12:53 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 24.3.0:
* Python 3.7 has been dropped.
* Introduce `attrs.NothingType`, for annotating types
consistent with `attrs.NOTHING`.
* Allow mutating `__suppress_context__` and `__notes__` on
frozen exceptions.
* `attrs.converters.optional()` works again when taking
`attrs.converters.pipe()` or another Converter as its
argument.
* *attrs* instances now support `copy.replace()`.
* `attrs.validators.instance_of()`'s type hints now allow for
union types.
* For example: `instance_of(str | int)`
-------------------------------------------------------------------
Tue Nov 5 13:03:04 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Upgrade to 24.2.0:
- Big releases always carry the risk of regressions, but never
did I expect to break Python 3.14s CI! On the plus side,
attrs runs on 3.14 now.
- Upgrade to 24.1.0:
- The most notable is probably the possibility to receive self
and field definitions in your converters by wrapping them
into a attrs.Converter.
- The other big thing is our own replacement
for __init_subclass__ called (you guessed it)
__attrs_init_subclass__. Check out the docs, if you're not
sure what this is good for.
- Finally, we've made more important steps to promote our "new"
APIs (can you believe they're 4 years old!?) in the docs. If
we missed anything, please let us know.
- Remove upstreamed patch:
- pytest8.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri May 17 09:51:39 UTC 2024 - Markéta Machová <mmachova@suse.com> Fri May 17 09:51:39 UTC 2024 - Markéta Machová <mmachova@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-attrs # spec file for package python-attrs
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -26,15 +26,13 @@
%endif %endif
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-attrs%{psuffix} Name: python-attrs%{psuffix}
Version: 23.2.0 Version: 25.4.0
Release: 0 Release: 0
Summary: Attributes without boilerplate Summary: Attributes without boilerplate
License: MIT License: MIT
Group: Development/Languages/Python
URL: https://github.com/hynek/attrs/ URL: https://github.com/hynek/attrs/
Source: https://files.pythonhosted.org/packages/source/a/attrs/attrs-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/a/attrs/attrs-%{version}.tar.gz
#PATCH-FIX-UPSTREAM https://github.com/python-attrs/attrs/pull/1249 Remove pytest.deprecated_call() in TestAssoc::test_unknown BuildRequires: %{python_module base >= 3.8}
Patch: pytest8.patch
BuildRequires: %{python_module hatch-fancy-pypi-readme} BuildRequires: %{python_module hatch-fancy-pypi-readme}
BuildRequires: %{python_module hatch-vcs} BuildRequires: %{python_module hatch-vcs}
BuildRequires: %{python_module hatchling} BuildRequires: %{python_module hatchling}
@@ -92,8 +90,9 @@ python-attrs is the successor to python-characterstic
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE
%doc CHANGELOG.md README.md %doc CHANGELOG.md README.md
%{python_sitelib}/attr* %{python_sitelib}/attr
%{python_sitelib}/attrs-%{version}*-info %{python_sitelib}/attrs
%{python_sitelib}/attrs-%{version}.dist-info
%endif %endif
%changelog %changelog