From 3076a57d53e597cc83a35bcfca31de7390085c4c Mon Sep 17 00:00:00 2001 From: Ilya Konstantinov Date: Thu, 17 Oct 2019 17:45:11 -0400 Subject: [PATCH] v4.1.0: bump version and update release notes (#709) --- docs/release_notes.rst | 32 ++++++++++++++++++++++++++++++++ pynamodb/__init__.py | 2 +- tests/test_attributes.py | 2 +- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/release_notes.rst b/docs/release_notes.rst index b93c2104f..90ab91ec4 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -1,6 +1,38 @@ Release Notes ============= +v4.1.0 +------ + +:date: 2019-10-17 + +This is a backwards compatible, minor release. + +* In the Model's Meta, you may now provide an AWS session token, which is mostly useful for assumed roles (#700):: + + sts_client = boto3.client("sts") + role_object = sts_client.assume_role(RoleArn=role_arn, RoleSessionName="role_name", DurationSeconds=BOTO3_CLIENT_DURATION) + role_credentials = role_object["Credentials"] + + class MyModel(Model): + class Meta: + table_name = "table_name" + aws_access_key_id = role_credentials["AccessKeyId"] + aws_secret_access_key = role_credentials["SecretAccessKey"] + aws_session_token = role_credentials["SessionToken"] + + hash = UnicodeAttribute(hash_key=True) + range = UnicodeAttribute(range_key=True) + +* Fix warning about `inspect.getargspec` (#701) +* Fix provisioning GSIs when using pay-per-request billing (#690) +* Suppress Python 3 exception chaining when "re-raising" botocore errors as PynamoDB model exceptions (#705) + +Contributors to this release: + +* @asottile +* @julienduchesne + v4.0.0 -------- diff --git a/pynamodb/__init__.py b/pynamodb/__init__.py index 83d665b06..f8e207c96 100644 --- a/pynamodb/__init__.py +++ b/pynamodb/__init__.py @@ -7,4 +7,4 @@ """ __author__ = 'Jharrod LaFon' __license__ = 'MIT' -__version__ = '4.0.0' +__version__ = '4.1.0' diff --git a/tests/test_attributes.py b/tests/test_attributes.py index 035df2723..0e24c824e 100644 --- a/tests/test_attributes.py +++ b/tests/test_attributes.py @@ -744,7 +744,7 @@ def test_raw_map_iter(self): } attr = MapAttribute(**raw) - assert list(iter(raw)) == list(iter(attr)) + assert sorted(iter(raw)) == sorted(iter(attr)) def test_raw_map_json_serialize(self): raw = {