You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and :meth:`Indexn.scan <pynamodb.indexes.Index.scan>` are now instance methods.
25
-
* :py:class:`~pynamodb.settings.OperationSettings` has been removed
23
+
* PynamoDB no longer has a default AWS region (used to be us-east-1) (:pr:`1003`).
24
+
If needed, update your models' `Meta` or set the `AWS_DEFAULT_REGION` environment variable.
25
+
* :py:class:`~pynamodb.models.Model`'s JSON serialization helpers were changed:
26
+
27
+
* :code:`to_json` was renamed to :meth:`~pynamodb.attributes.AttributeContainer.to_simple_dict` (:pr:`1126`). Additionally, :meth:`~pynamodb.attributes.AttributeContainer.to_dynamodb_dict`
28
+
and :meth:`~pynamodb.attributes.AttributeContainer.from_dynamodb_dict` were added for round-trip JSON serialization.
29
+
* :code:`pynamodb.util.attribute_value_to_json` was removed (:pr:`1126`)
30
+
31
+
* :py:class:`~pynamodb.attributes.Attribute`'s :code:`default` parameter must be either an immutable value
32
+
(of one of the built-in immutable types) or a callable.
33
+
This prevents a common class of errors caused by unintentionally mutating the default value.
34
+
A simple workaround is to pass an initializer (e.g. change :code:`default={}` to
35
+
:code:`default=dict`) or wrap in a lambda (e.g. change :code:`default={'foo': 'bar'}` to
0 commit comments