Skip to content

Commit

Permalink
Update release_notes.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
ikonst authored Feb 2, 2024
1 parent 5532c1b commit 191988f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ Breaking changes:
* `pynamodb.util.attribute_value_to_json` was removed (:pr:`1126`)

* :py:class:`~pynamodb.attributes.Attribute`'s :code:`default` parameter must be either an immutable value (of one of the built-in
immutable types) or a callable. This prevents a common class of errors caused by unintentionally mutating
the default value. A simple workaround is to pass an initializer (e.g. change :code:`default={}` to
:code:`default=dict`) or wrap in a lambda (e.g. change :code:`default={'foo': 'bar'}` to
:code:`default=lambda: {'foo': 'bar'}`).
immutable types) or a callable. This prevents a common class of errors caused by unintentionally mutating
the default value. A simple workaround is to pass an initializer (e.g. change :code:`default={}` to
:code:`default=dict`) or wrap in a lambda (e.g. change :code:`default={'foo': 'bar'}` to
:code:`default=lambda: {'foo': 'bar'}`).

* :meth:`~pynamodb.indexes.Index.count`, :meth:`~pynamodb.indexes.Index.query`,
and :meth:`~pynamodb.indexes.Index.scan` are now instance methods.
Expand Down

0 comments on commit 191988f

Please sign in to comment.