Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update attrs to 19.1.0 #427

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Mar 3, 2019

This PR updates attrs from 18.2.0 to 19.1.0.

Changelog

19.1.0

-------------------

Backward-incompatible Changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Fixed a bug where deserialized objects with ``cache_hash=True`` could have incorrect hash code values.
This change breaks classes with ``cache_hash=True`` when a custom ``__setstate__`` is present.
An exception will be thrown when applying the ``attrs`` annotation to such a class.
This limitation is tracked in issue `494 <https://github.com/python-attrs/attrs/issues/494>`_.
`482 <https://github.com/python-attrs/attrs/issues/482>`_


Changes
^^^^^^^

- Add ``is_callable``, ``deep_iterable``, and ``deep_mapping`` validators.

* ``is_callable``: validates that a value is callable
* ``deep_iterable``: Allows recursion down into an iterable,
 applying another validator to every member in the iterable
 as well as applying an optional validator to the iterable itself.
* ``deep_mapping``: Allows recursion down into the items in a mapping object,
 applying a key validator and a value validator to the key and value in every item.
 Also applies an optional validator to the mapping object itself.

You can find them in the ``attr.validators`` package.
`425 <https://github.com/python-attrs/attrs/issues/425>`_
- Fixed stub files to prevent errors raised by mypy's ``disallow_any_generics = True`` option.
`443 <https://github.com/python-attrs/attrs/issues/443>`_
- Attributes with ``init=False`` now can follow after ``kw_only=True`` attributes.
`450 <https://github.com/python-attrs/attrs/issues/450>`_
- ``attrs`` now has first class support for defining exception classes.

If you define a class using ``attr.s(auto_exc=True)`` and subclass an exception, the class will behave like a well-behaved exception class including an appropriate ``__str__`` method, and all attributes additionally available in an ``args`` attribute.
`500 <https://github.com/python-attrs/attrs/issues/500>`_
- Clarified documentation for hashing to warn that hashable objects should be deeply immutable (in their usage, even if this is not enforced).
`503 <https://github.com/python-attrs/attrs/issues/503>`_


----
Links

@codecov
Copy link

codecov bot commented Mar 3, 2019

Codecov Report

Merging #427 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #427   +/-   ##
=======================================
  Coverage   98.57%   98.57%           
=======================================
  Files           8        8           
  Lines         702      702           
  Branches      125      125           
=======================================
  Hits          692      692           
  Misses          2        2           
  Partials        8        8

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52b7d72...1d527bd. Read the comment docs.

2 similar comments
@codecov
Copy link

codecov bot commented Mar 3, 2019

Codecov Report

Merging #427 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #427   +/-   ##
=======================================
  Coverage   98.57%   98.57%           
=======================================
  Files           8        8           
  Lines         702      702           
  Branches      125      125           
=======================================
  Hits          692      692           
  Misses          2        2           
  Partials        8        8

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52b7d72...1d527bd. Read the comment docs.

@codecov
Copy link

codecov bot commented Mar 3, 2019

Codecov Report

Merging #427 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #427   +/-   ##
=======================================
  Coverage   98.57%   98.57%           
=======================================
  Files           8        8           
  Lines         702      702           
  Branches      125      125           
=======================================
  Hits          692      692           
  Misses          2        2           
  Partials        8        8

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52b7d72...1d527bd. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant