All objects from `attrs.filters` are also available in ``attr.filters``.
----
..currentmodule:: attr
..function:: evolve
Same as `attrs.evolve`.
..function:: validate
Same as `attrs.validate`.
Validators
----------
..module:: attr.validators
All objects from `attrs.validators` are also available in ``attr.validators``.
Please refer to the former for details.
Converters
----------
..module:: attr.converters
All objects from `attrs.converters` are also available from ``attr.converters``.
Please refer to the former for details.
Setters
-------
..module:: attr.setters
All objects from `attrs.setters` are also available in ``attr.setters``.
Please refer to the former for details.
Deprecated APIs
---------------
..currentmodule:: attr
To help you write backward compatible code that doesn't throw warnings on modern releases, the ``attr`` module has an ``__version_info__`` attribute as of version 19.2.0.
It behaves similarly to `sys.version_info` and is an instance of `attr.VersionInfo`:
..autoclass:: VersionInfo
With its help you can write code like this:
>>> if getattr(attr, "__version_info__", (0,)) >= (19, 2):
... cmp_off = {"eq": False}
... else:
... cmp_off = {"cmp": False}
>>> cmp_off == {"eq": False}
True
>>> @attr.s(**cmp_off)
... class C:
... pass
----
..autofunction:: assoc
Before *attrs* got `attrs.validators.set_disabled` and `attrs.validators.set_disabled`, it had the following APIs to globally enable and disable validators.
They won't be removed, but are discouraged to use:
..autofunction:: set_run_validators
..autofunction:: get_run_validators
----
The serious-business aliases used to be called ``attr.attributes`` and ``attr.attr``.
There are no plans to remove them but they shouldn't be used in new code.