Skip to content

Commit

Permalink
Merge branch 'master' into 6.0-breaking-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ikonst authored Jan 31, 2024
2 parents fb09962 + 06c3a32 commit fa70301
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Breaking changes:
If your codebase uses :py:class:`~pynamodb.attributes.BinaryAttribute` or :py:class:`~pynamodb.attributes.BinarySetAttribute`,
go over the attribute declarations and mark them accordingly.
* When using binary attributes, the return value of :meth:`~pynamodb.models.Model.serialize` will no longer be JSON-serializable
since it will contain :code:`bytes` objects. Use :meth:`~pynamodb.models.Model.to_dynamodb_dict`
since it will contain :code:`bytes` objects. Use :meth:`~pynamodb.attributes.AttributeContainer.to_dynamodb_dict` and :meth:`~pynamodb.attributes.AttributeContainer.to_simple_dict` for JSON-serializable mappings.
for a safe JSON-serializable representation.

* Python 3.6 is no longer supported.
Expand Down
2 changes: 1 addition & 1 deletion pynamodb/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ class MapAttribute(Attribute[Mapping[_KT, _VT]], AttributeContainer, metaclass=M
For example, below we define "MyModel" which contains a MapAttribute "my_map":
class MyModel(Model):
my_map = MapAttribute(attr_name="dynamo_name", default={})
my_map = MapAttribute(attr_name="dynamo_name", default=dict)
When instantiated in this manner (as a class attribute of an AttributeContainer class), the MapAttribute
class acts as an instance of the Attribute class. The instance stores data about the attribute (in this
Expand Down

0 comments on commit fa70301

Please sign in to comment.