{"ecosystem":"pypi","package":"attrs","from_version":null,"to_version":null,"changes":[{"from_version":"21.2.0","to_version":"21.3.0","change_type":"behavior","description":"When using `@define`, converters are now run by default when setting an attribute on an instance -- additionally to validators.","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"behavior","description":"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.","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"behavior","description":"`attr.asdict(retain_collection_types=False)` (default) dumps collection-esque keys as tuples.","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"breaking","description":"`attrs.resolve_types()` now resolves types of subclasses after the parents are resolved.","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"breaking","description":"`__match_args__` are now generated to support Python 3.10's","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"breaking","description":"The generated `__repr__` is significantly faster on Pythons with f-strings.","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"breaking","description":"Attributes transformed via `field_transformer` are wrapped with `AttrsClass` again.","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"breaking","description":"Generated source code is now cached more efficiently for identical classes.","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"breaking","description":"Added `attrs.converters.to_bool()`.","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"breaking","description":"Added new validators: `lt(val)` (\\< val), `le(va)` (≤ val), `ge(val)` (≥ val), `gt(val)` (> val), and `maxlen(n)`.","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"breaking","description":"`attrs` classes are now fully compatible with [cloudpickle](https://github.com/cloudpipe/cloudpickle) (no need to disable `repr` anymore).","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"breaking","description":"Added new context manager `attrs.validators.disabled()` and functions `attrs.validators.(set|get)_disabled()`.","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"breaking","description":"`attrs.validators.matches_re()` now accepts pre-compiled regular expressions in addition to pattern strings.","migration_hint":null},{"from_version":"21.2.0","to_version":"21.3.0","change_type":"breaking","description":"`import attrs` has finally landed!","migration_hint":null},{"from_version":"21.1.0","to_version":"21.2.0","change_type":"breaking","description":"Python 3.4 is now blocked using packaging metadata because `attrs` can't be imported on it anymore.","migration_hint":null},{"from_version":"21.1.0","to_version":"21.2.0","change_type":"breaking","description":"We had to revert the recursive feature for `attr.evolve()` because it broke some use-cases -- sorry!","migration_hint":null},{"from_version":"20.2.0","to_version":"20.3.0","change_type":"api","description":"The type stubs for `attr.s()` and `attr.make_class()` are not missing the *collect_by_mro* argument anymore.","migration_hint":null},{"from_version":"20.2.0","to_version":"20.3.0","change_type":"api","description":"`attr.asdict()` and `attr.astuple()` now treat `frozenset`s like `set`s with regards to the *retain_collection_types* argument.","migration_hint":null},{"from_version":"20.2.0","to_version":"20.3.0","change_type":"breaking","description":"`attr.s()` now has a *field_transformer* hook that is called for all `Attribute`s and returns a (modified or updated) list of `Attribute` instances.","migration_hint":null},{"from_version":"20.2.0","to_version":"20.3.0","change_type":"breaking","description":"`attr.define()`, `attr.frozen()`, `attr.mutable()`, and `attr.field()` remain **provisional**.","migration_hint":null},{"from_version":"20.2.0","to_version":"20.3.0","change_type":"breaking","description":"`kw_only=True` now works on Python 2.","migration_hint":null},{"from_version":"20.2.0","to_version":"20.3.0","change_type":"breaking","description":"`raise from` now works on frozen classes on PyPy.","migration_hint":null},{"from_version":"20.1.0","to_version":"20.2.0","change_type":"api","description":"`attr.define()` et al's hybrid behavior now also works correctly when arguments are passed.","migration_hint":null},{"from_version":"20.1.0","to_version":"20.2.0","change_type":"breaking","description":"The ergonomics of creating frozen classes using `@define(frozen=True)` and sub-classing frozen classes has been improved:","migration_hint":null},{"from_version":"20.1.0","to_version":"20.2.0","change_type":"breaking","description":"`attr.define()`, `attr.frozen()`, `attr.mutable()`, and `attr.field()` remain **provisional**.","migration_hint":null},{"from_version":"20.1.0","to_version":"20.2.0","change_type":"breaking","description":"`attr.define()` et al now correctly detect `__eq__` and `__ne__`.","migration_hint":null},{"from_version":"20.1.0","to_version":"20.2.0","change_type":"breaking","description":"It's possible to define custom `__setattr__` methods on slotted classes again.","migration_hint":null},{"from_version":"20.1.0","to_version":"20.2.0","change_type":"breaking","description":"In 20.1.0 we introduced the `inherited` attribute on the `attr.Attribute` class to differentiate attributes that have been inherited and those that have been defined directly on the class.","migration_hint":null},{"from_version":"20.1.0","to_version":"20.2.0","change_type":"breaking","description":"`zope.interface` is now a \"soft dependency\" when running the test suite; if `zope.interface` is not installed when running the test suite, the interface-related tests will be automatically skipped.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"api","description":"**Provisional** APIs called `attr.define()`, `attr.mutable()`, and `attr.frozen()` have been added.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"api","description":"Added `@attr.s(collect_by_mro=False)` argument that if set to `True` fixes the collection of attributes from base classes.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"behavior","description":"Fixed serialization behavior of non-slots classes with `cache_hash=True`.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"breaking","description":"It is now possible to prevent `attrs` from auto-generating the `__setstate__` and `__getstate__` methods that are required for pickling of slotted classes.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"breaking","description":"Fixed a `ValueError: Cell is empty` bug that could happen in some rare edge cases.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"breaking","description":"`attrs` can now automatically detect your own implementations and infer `init=False`, `repr=False`, `eq=False`, `order=False`, and `hash=False` if you set `@attr.s(auto_detect=True)`.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"breaking","description":"Added `attr.converters.pipe()`.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"breaking","description":"It is now possible to specify hooks that are called whenever an attribute is set **after** a class has been instantiated.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"breaking","description":"We have also provisionally added `attr.field()` that supplants `attr.ib()`.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"breaking","description":"Added `attr.resolve_types()`.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"breaking","description":"On Python 3, all generated methods now have a docstring explaining that they have been created by `attrs`.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"breaking","description":"Python 3.4 is not supported anymore.","migration_hint":null},{"from_version":"19.3.0","to_version":"20.1.0","change_type":"deprecated","description":"Less of a deprecation and more of a heads up: the next release of `attrs` will introduce an `attrs` namespace.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"breaking","description":"Added `attr.__version_info__` that can be used to reliably check the version of `attrs` and write forward- and backward-compatible code.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"breaking","description":"`__lt__`, `__le__`, `__gt__`, and `__ge__` do not consider subclasses comparable anymore.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"breaking","description":"Keyword-only attributes (`kw_only=True`) and attributes that are excluded from the `attrs`'s `__init__` (`init=False`) now can appear before mandatory attributes.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"breaking","description":"The fake filename for generated methods is now more stable.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"breaking","description":"The value passed to `@attr.ib(repr=…)` can now be either a boolean (as before) or a callable.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"breaking","description":"Updated `attr.validators.__all__` to include new validators added in [#425].","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"breaking","description":"Slotted classes now use a pure Python mechanism to rewrite the `__class__` cell when rebuilding the class, so `super()` works even on environments where `ctypes` is not installed.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"breaking","description":"Fixed `attr.validators.deep_iterable()` and `attr.validators.deep_mapping()` type stubs.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"breaking","description":"`attr.validators.is_callable()` validator now raises an exception `attr.exceptions.NotCallableError`, a subclass of `TypeError`, informing the received value.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"breaking","description":"`@attr.s(auto_exc=True)` now generates classes that are hashable by ID, as the documentation always claimed it would.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"breaking","description":"Added `attr.validators.matches_re()` that checks string attributes whether they match a regular expression.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"deprecated","description":"The `cmp` argument to `attr.s()` and `attr.ib()` is now deprecated.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"removed","description":"When collecting attributes using `@attr.s(auto_attribs=True)`, attributes with a default of `None` are now deleted too.","migration_hint":null},{"from_version":"19.1.0","to_version":"19.2.0","change_type":"removed","description":"Removed deprecated `Attribute` attribute `convert` per scheduled removal on 2019/1.","migration_hint":null},{"from_version":"18.2.0","to_version":"19.1.0","change_type":"breaking","description":"Add `is_callable`, `deep_iterable`, and `deep_mapping` validators.","migration_hint":null},{"from_version":"18.2.0","to_version":"19.1.0","change_type":"breaking","description":"Fixed a bug where deserialized objects with `cache_hash=True` could have incorrect hash code values.","migration_hint":null},{"from_version":"18.2.0","to_version":"19.1.0","change_type":"breaking","description":"`is_callable`: validates that a value is callable","migration_hint":null},{"from_version":"18.2.0","to_version":"19.1.0","change_type":"breaking","description":"`deep_iterable`: Allows recursion down into an iterable,","migration_hint":null},{"from_version":"18.2.0","to_version":"19.1.0","change_type":"breaking","description":"`deep_mapping`: Allows recursion down into the items in a mapping object,","migration_hint":null},{"from_version":"18.2.0","to_version":"19.1.0","change_type":"breaking","description":"Fixed stub files to prevent errors raised by mypy's `disallow_any_generics = True` option.","migration_hint":null},{"from_version":"18.2.0","to_version":"19.1.0","change_type":"breaking","description":"Attributes with `init=False` now can follow after `kw_only=True` attributes.","migration_hint":null},{"from_version":"18.2.0","to_version":"19.1.0","change_type":"breaking","description":"`attrs` now has first class support for defining exception classes.","migration_hint":null},{"from_version":"18.2.0","to_version":"19.1.0","change_type":"breaking","description":"Clarified documentation for hashing to warn that hashable objects should be deeply immutable (in their usage, even if this is not enforced).","migration_hint":null},{"from_version":"17.3.0","to_version":"17.4.0","change_type":"api","description":"`attr.ib`’s *metadata* argument now defaults to a unique empty `dict` instance instead of sharing a common empty `dict` for all.","migration_hint":null},{"from_version":"17.3.0","to_version":"17.4.0","change_type":"breaking","description":"Generated `__hash__` methods now hash the class type along with the attribute values.","migration_hint":null},{"from_version":"17.3.0","to_version":"17.4.0","change_type":"breaking","description":"`ctypes` is optional now however if it's missing, a bare `super()` will not work in slotted classes.","migration_hint":null},{"from_version":"17.3.0","to_version":"17.4.0","change_type":"breaking","description":"The traversal of MROs when using multiple inheritance was backward:","migration_hint":null},{"from_version":"17.3.0","to_version":"17.4.0","change_type":"breaking","description":"All generated methods now have correct `__module__`, `__name__`, and (on Python 3) `__qualname__` attributes.","migration_hint":null},{"from_version":"17.3.0","to_version":"17.4.0","change_type":"breaking","description":"The attribute redefinition feature introduced in 17.3.0 now takes into account if an attribute is redefined via multiple inheritance.","migration_hint":null},{"from_version":"17.3.0","to_version":"17.4.0","change_type":"breaking","description":"Equality tests are *much* faster now.","migration_hint":null},{"from_version":"17.3.0","to_version":"17.4.0","change_type":"breaking","description":"Subclasses of `auto_attribs=True` can be empty now.","migration_hint":null},{"from_version":"17.3.0","to_version":"17.4.0","change_type":"deprecated","description":"The `attr.ib(convert=callable)` option is now deprecated in favor of `attr.ib(converter=callable)`.","migration_hint":null},{"from_version":"17.3.0","to_version":"17.4.0","change_type":"removed","description":"The `__repr__` set by `attrs` no longer produces an `AttributeError` when the instance is missing some of the specified attributes (either through deleting or after using `init=False` on some attributes).","migration_hint":null},{"from_version":"17.2.0","to_version":"17.3.0","change_type":"api","description":"Added *type* argument to `attr.ib()` and corresponding `type` attribute to `attr.Attribute`.","migration_hint":null},{"from_version":"17.2.0","to_version":"17.3.0","change_type":"breaking","description":"`super()` and `__class__` now work with slotted classes on Python 3.","migration_hint":null},{"from_version":"17.2.0","to_version":"17.3.0","change_type":"breaking","description":"The combination of `str=True` and `slots=True` now works on Python 2.","migration_hint":null},{"from_version":"17.2.0","to_version":"17.3.0","change_type":"breaking","description":"`attr.Factory` is hashable again.","migration_hint":null},{"from_version":"17.2.0","to_version":"17.3.0","change_type":"breaking","description":"Subclasses now can overwrite attribute definitions of their base classes.","migration_hint":null},{"from_version":"17.2.0","to_version":"17.3.0","change_type":"breaking","description":"Added new option *auto_attribs* to `@attr.s` that allows to collect annotated fields without setting them to `attr.ib()`.","migration_hint":null},{"from_version":"17.2.0","to_version":"17.3.0","change_type":"breaking","description":"Instances of classes created using `attr.make_class()` can now be pickled.","migration_hint":null},{"from_version":"17.2.0","to_version":"17.3.0","change_type":"breaking","description":"Attributes are no longer defined on the class body.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"api","description":"For convenience, the *validator* argument of `@attr.s` now can take a list of validators that are wrapped using `and_()`.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"api","description":"Correspondingly, `attr.ib`'s *hash* argument is `None` by default too and mirrors the *cmp* argument as it should.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"api","description":"`attr.make_class()` now accepts the keyword argument `bases` which allows for subclassing.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"api","description":"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.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"api","description":"`attr.Factory()` now has a *takes_self* argument that makes the initializer to pass the partially initialized instance into the factory.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"behavior","description":"Default factories can now also be defined inline using decorators.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"behavior","description":"Fix default hashing behavior.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"behavior","description":"`attrs` will set the `__hash__()` method to `None` by default now.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"breaking","description":"Validators can now be defined conveniently inline by using the attribute as a decorator.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"breaking","description":"Frozen-ness of classes is now inherited.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"breaking","description":"`__attrs_post_init__()` is now run if validation is disabled.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"breaking","description":"Added `attr.validators.in_(options)` that, given the allowed `options`, checks whether the attribute value is in it.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"breaking","description":"Added `attr.validators.and_()` that composes multiple validators into one.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"breaking","description":"Accordingly, `attr.validators.optional()` now can take a list of validators too.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"breaking","description":"Conversion can now be made optional using `attr.converters.optional()`.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"breaking","description":"Metaclasses are now preserved with `slots=True`.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"deprecated","description":"`attr.assoc()` is now deprecated in favor of `attr.evolve()` and will stop working in 2018.","migration_hint":null},{"from_version":"16.3.0","to_version":"17.1.0","change_type":"removed","description":"`FrozenInstanceError` is now raised when trying to delete an attribute from a frozen class.","migration_hint":null},{"from_version":"16.0.0","to_version":"16.1.0","change_type":"api","description":"`attr.asdict()`'s `dict_factory` arguments is now propagated on recursion.","migration_hint":null},{"from_version":"16.0.0","to_version":"16.1.0","change_type":"api","description":"All instances where function arguments were called `cl` have been changed to the more Pythonic `cls`.","migration_hint":null},{"from_version":"16.0.0","to_version":"16.1.0","change_type":"api","description":"`attr.asdict()` now takes `retain_collection_types` as an argument.","migration_hint":null},{"from_version":"16.0.0","to_version":"16.1.0","change_type":"breaking","description":"Add `attr.attrs` and `attr.attrib` as a more consistent aliases for `attr.s` and `attr.ib`.","migration_hint":null},{"from_version":"16.0.0","to_version":"16.1.0","change_type":"breaking","description":"`attr.asdict()`, `attr.has()` and `attr.fields()` are significantly faster.","migration_hint":null},{"from_version":"16.0.0","to_version":"16.1.0","change_type":"breaking","description":"Add *frozen* option to `attr.s` that will make instances best-effort immutable.","migration_hint":null},{"from_version":"16.0.0","to_version":"16.1.0","change_type":"deprecated","description":"Accessing `Attribute` instances on class objects is now deprecated and will stop working in 2017.","migration_hint":null},{"from_version":"16.0.0","to_version":"16.1.0","change_type":"deprecated","description":"The serious-business aliases `attr.attributes` and `attr.attr` have been deprecated in favor of `attr.attrs` and `attr.attrib` which are much more consistent and frankly obvious in hindsight.","migration_hint":null},{"from_version":"15.2.0","to_version":"16.0.0","change_type":"api","description":"`attr.asdict()` can now produce arbitrary mappings instead of Python `dict`s when provided with a `dict_factory` argument.","migration_hint":null},{"from_version":"15.2.0","to_version":"16.0.0","change_type":"breaking","description":"Multiple performance improvements.","migration_hint":null},{"from_version":"15.2.0","to_version":"16.0.0","change_type":"breaking","description":"`__slots__` have arrived!","migration_hint":null},{"from_version":"15.2.0","to_version":"16.0.0","change_type":"breaking","description":"Python 3.3 and 2.6 are no longer supported.","migration_hint":null},{"from_version":"15.2.0","to_version":"16.0.0","change_type":"breaking","description":"Allow the case of initializing attributes that are set to `init=False`.","migration_hint":null}],"total":114,"note":"Curated major-version breaking changes. Always verify against the package's official changelog before migrating.","_cache":"miss"}