* 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/package/show/devel:languages:python/python-attrs?expand=0&rev=40
- Update to 22.1.0:
* Backwards-incompatible Changes
* Python 2.7 is not supported anymore.
* Dealing with Python 2.7 tooling has become too difficult for a
volunteer-run project.
* We have supported Python 2 more than 2 years after it was officially
discontinued and feel that we have paid our dues. All version up to 21.4.0
from December 2021 remain fully functional, of course. #936
* The deprecated cmp attribute of attrs.Attribute has been removed. This
does not affect the cmp argument to attr.s that can be used as a shortcut
to set eq and order at the same time. #939
* Changes
* Instantiation of frozen slotted classes is now faster. #898
* If an eq key is defined, it is also used before hashing the attribute. #909
* Added attrs.validators.min_len(). #916
* attrs.validators.deep_iterable()'s member_validator argument now also
accepts a list of validators and wraps them in an attrs.validators.and_(). #925
* Added missing type stub re-imports for attrs.converters and attrs.filters. #931
* Added missing stub for attr(s).cmp_using(). #949
* attrs.validators._in()'s ValueError is not missing the attribute, expected
options, and the value it got anymore. #951
* Python 3.11 is now officially supported. #969
OBS-URL: https://build.opensuse.org/request/show/992744
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-attrs?expand=0&rev=36
* 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/package/show/devel:languages:python/python-attrs?expand=0&rev=35
* We had to revert the recursive feature for ``attr.evolve()`` because it
broke some use-cases -- sorry!
* Python 3.4 is now blocked using packaging metadata because ``attrs`` can't
be imported on it anymore.
* The long-awaited, much-talked-about, little-delivered ``import attrs`` is
finally upon us!
* The *cmp* argument to ``attr.s()`` and `attr.ib()` has been **undeprecated**
It will continue to be supported as syntactic sugar to set *eq* and *order* in one go.
* Further smaller changes, see included Changelog.md
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-attrs?expand=0&rev=33
- Python 3.4 is not supported anymore.
- ``attr.define()``, ``attr.frozen()``, ``attr.mutable()``, and ``attr.field()`` remain **provisional**.
This release fixes a bunch of bugs and ergonomics but they remain mostly unchanged.
Further changes see included CHANGELOG.rst
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-attrs?expand=0&rev=29
* 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/package/show/devel:languages:python/python-attrs?expand=0&rev=20
- update to 17.2.0:
- Validators are hashable again.
- ``attrs`` will set the ``__hash__()`` method to ``None`` by default now.
The way hashes were handled before was in conflict with `Python's
specification
This *may* break some software although this breakage is most likely just
surfacing of latent bugs.
You can always make ``attrs`` create the ``__hash__()`` method using
``@attr.s(hash=True)``. See `#136`_ for the rationale of this change.
- Correspondingly, ``attr.ib``'s ``hash`` argument is ``None`` by default too
and mirrors the ``cmp`` argument as it should.
- ``attr.assoc()`` is now deprecated in favor of ``attr.evolve()`` and will
stop working in 2018.
- Fix default hashing behavior.
Now *hash* mirrors the value of *cmp* and classes are unhashable by default.
- Added ``attr.evolve()`` that, given an instance of an ``attrs`` class and
field changes as keyword arguments, will instantiate a copy of the given
instance with the changes applied.
- ``FrozenInstanceError`` is now raised when trying to delete an attribute
from a frozen class.
- Frozen-ness of classes is now inherited.
- ``__attrs_post_init__()`` is now run if validation is disabled.
- Added ``attr.validators.in_(options)`` that, given the allowed `options`,
checks whether the attribute value is in it.
This can be used to check constants, enums, mappings, etc.
- Added ``attr.validators.and_()`` that composes multiple validators into one.
- For convenience, the ``validator`` argument of ``@attr.s`` now can take a
``list`` of validators that are wrapped using ``and_()``.
- Accordingly, ``attr.validators.optional()`` now can take a ``list`` of
validators too.
OBS-URL: https://build.opensuse.org/request/show/507963
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-attrs?expand=0&rev=6
- update to 16.0.0
Backward-incompatible changes:
* Python 3.3 and 2.6 aren’t supported anymore. They may work by chance but
any effort to keep them working has ceased.
The last Python 2.6 release was on October 29, 2013 and isn’t supported by
the CPython core team anymore. Major Python packages like Django and Twisted
dropped Python 2.6 a while ago already.
Python 3.3 never had a significant user base and wasn’t part of any
distribution’s LTS release.
Changes:
* __slots__ have arrived! Classes now can automatically be slots-style (and
save your precious memory) just by passing slots=True. #35
* Allow the case of initializing attributes that are set to init=False. This
allows for clean initializer parameter lists while being able to initialize
attributes to default values. #32
* attr.asdict can now produce arbitrary mappings instead of Python dicts when
provided with a dict_factory argument. #40 Multiple performance improvements.
OBS-URL: https://build.opensuse.org/request/show/406822
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-attrs?expand=0&rev=3