Revisions of python-attrs
Ana Guerrero (anag+factory)
accepted
request 1221445
from
Matej Cepl (mcepl)
(revision 25)
- 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
Ana Guerrero (anag+factory)
accepted
request 1137517
from
Dirk Mueller (dirkmueller)
(revision 23)
- 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
Dominique Leuenberger (dimstar_suse)
accepted
request 1095918
from
Factory Maintainer (factory-maintainer)
(revision 22)
Automatic submission by obs-autosubmit
Dominique Leuenberger (dimstar_suse)
accepted
request 1085487
from
Daniel Garcia (dgarcia)
(revision 21)
- 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
Dominique Leuenberger (dimstar_suse)
accepted
request 1081990
from
Dirk Mueller (dirkmueller)
(revision 20)
Dominique Leuenberger (dimstar_suse)
accepted
request 1046288
from
Dirk Mueller (dirkmueller)
(revision 19)
- 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.
Dominique Leuenberger (dimstar_suse)
accepted
request 1004944
from
Dirk Mueller (dirkmueller)
(revision 18)
Dominique Leuenberger (dimstar_suse)
accepted
request 945429
from
Dirk Mueller (dirkmueller)
(revision 16)
- 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.
Dominique Leuenberger (dimstar_suse)
accepted
request 897252
from
Factory Maintainer (factory-maintainer)
(revision 15)
Automatic submission by obs-autosubmit
Dominique Leuenberger (dimstar_suse)
accepted
request 850938
from
Dirk Mueller (dirkmueller)
(revision 14)
- update to 20.3.0: - ``attr.define()``, ``attr.frozen()``, ``attr.mutable()``, and ``attr.field()`` remain **provisional**.
Dominique Leuenberger (dimstar_suse)
accepted
request 837189
from
Factory Maintainer (factory-maintainer)
(revision 13)
Automatic submission by obs-autosubmit
Yuchen Lin (maxlin_factory)
accepted
request 807115
from
Tomáš Chvátal (scarabeus_iv)
(revision 12)
- Do not restrict us to new setuptools, we generate stuff even with the older variants
Dominique Leuenberger (dimstar_suse)
accepted
request 741439
from
Ondřej Súkup (mimi_vx)
(revision 11)
- 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
Dominique Leuenberger (dimstar_suse)
accepted
request 722713
from
Tomáš Chvátal (scarabeus_iv)
(revision 10)
- Switch to multibuild to enable tests
Dominique Leuenberger (dimstar_suse)
accepted
request 681547
from
Ondřej Súkup (mimi_vx)
(revision 9)
- 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
Dominique Leuenberger (dimstar_suse)
accepted
request 655564
from
Tomáš Chvátal (scarabeus_iv)
(revision 8)
- Fix fdupes call
Dominique Leuenberger (dimstar_suse)
accepted
request 632660
from
Tomáš Chvátal (scarabeus_iv)
(revision 7)
Dominique Leuenberger (dimstar_suse)
accepted
request 605119
from
Tomáš Chvátal (scarabeus_iv)
(revision 6)
Displaying revisions 1 - 20 of 25