-
-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
If the class-level *on_setattr* is set to ``attr.setters.validate`` (default in ``@attr.define`` and ``@attr.mutable``) but no field defines a validator, pretend that it's not set. | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
The generated ``__repr__`` is significantly faster on Pythons with F-strings. | ||
The generated ``__repr__`` is significantly faster on Pythons with f-strings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Added ``attr.converters.to_bool()``. | ||
Added ``attrs.converters.to_bool()``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
When using ``@attr.define``, converters are now run by default when setting an attribute on an instance -- additionally to validators. | ||
I.e. the new default is ``on_setattr=[attr.setters.convert, attr.setters.validate]``. | ||
When using ``@define``, converters are now run by default when setting an attribute on an instance -- additionally to validators. | ||
I.e. the new default is ``on_setattr=[attrs.setters.convert, attrs.setters.validate]``. | ||
|
||
This is unfortunately a breaking change, but it was an oversight, impossible to raise a ``DeprecationWarning`` about, and it's better to fix it now while the APIs are very fresh with few users. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
``attr.resolve_types()`` now resolves types of subclasses after the parents are resolved. | ||
``attrs.resolve_types()`` now resolves types of subclasses after the parents are resolved. | ||
`#842 <https://github.com/python-attrs/attrs/issues/842>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
``attrs`` classes are now fully compatible with `cloudpickle <https://github.com/cloudpipe/cloudpickle>`_ (no need to disabled ``repr`` anymore). | ||
``attrs`` classes are now fully compatible with `cloudpickle <https://github.com/cloudpipe/cloudpickle>`_ (no need to disable ``repr`` anymore). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Added new context manager ``attr.validators.disabled()`` and functions ``attr.validators.(set|get)_disabled()``. | ||
They deprecate ``attr.(set|get)_run_validators()``. | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
``attr.validators.matches_re()`` now accepts pre-compiled regular expressions in addition to pattern strings. | ||
``attrs.validators.matches_re()`` now accepts pre-compiled regular expressions in addition to pattern strings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
When using ``@attr.define``, converters are now run by default when setting an attribute on an instance -- additionally to validators. | ||
I.e. the new default is ``on_setattr=[attr.setters.convert, attr.setters.validate]``. | ||
When using ``@define``, converters are now run by default when setting an attribute on an instance -- additionally to validators. | ||
I.e. the new default is ``on_setattr=[attrs.setters.convert, attrs.setters.validate]``. | ||
|
||
This is unfortunately a breaking change, but it was an oversight, impossible to raise a ``DeprecationWarning`` about, and it's better to fix it now while the APIs are very fresh with few users. |