From 1553c8bf4b5c1f4e4abf4441a94bf9930ad0692e Mon Sep 17 00:00:00 2001 From: mattsb42-aws Date: Fri, 12 Jan 2018 13:46:27 -0800 Subject: [PATCH 1/2] updating pytest to >=3.3.1 since it addressed the 3.3.0 problem --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 92962b017..d5080473b 100644 --- a/tox.ini +++ b/tox.ini @@ -34,8 +34,7 @@ passenv = sitepackages = False deps = mock - pytest!=3.3.0 - pytest-catchlog + pytest>=3.3.1 pytest-cov pytest-mock coverage From e729279ee5bd08eaa59c358a31cbdb396e42c255 Mon Sep 17 00:00:00 2001 From: mattsb42-aws Date: Fri, 12 Jan 2018 13:47:55 -0800 Subject: [PATCH 2/2] updating attr to >=17.4.0 and changing all uses of attr.ib from deprecated "convert" to "converter" https://github.com/awslabs/aws-encryption-sdk-python/issues/39 --- requirements.txt | 2 +- src/aws_encryption_sdk/key_providers/base.py | 2 +- src/aws_encryption_sdk/key_providers/kms.py | 6 +++--- src/aws_encryption_sdk/key_providers/raw.py | 2 +- src/aws_encryption_sdk/materials_managers/caching.py | 2 +- src/aws_encryption_sdk/streaming_client.py | 2 +- src/aws_encryption_sdk/structures.py | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/requirements.txt b/requirements.txt index 32ee3866b..f04114485 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ boto3>=1.4.4 cryptography>=1.8.1 -attrs>=16.3.0 +attrs>=17.4.0 wrapt>=1.10.11 \ No newline at end of file diff --git a/src/aws_encryption_sdk/key_providers/base.py b/src/aws_encryption_sdk/key_providers/base.py index d7d8010a7..f3fa30f47 100644 --- a/src/aws_encryption_sdk/key_providers/base.py +++ b/src/aws_encryption_sdk/key_providers/base.py @@ -303,7 +303,7 @@ class MasterKeyConfig(object): key_id = attr.ib( hash=True, validator=attr.validators.instance_of((six.string_types, bytes)), - convert=to_bytes + converter=to_bytes ) def __attrs_post_init__(self): diff --git a/src/aws_encryption_sdk/key_providers/kms.py b/src/aws_encryption_sdk/key_providers/kms.py index b89b7e72a..c3621f290 100644 --- a/src/aws_encryption_sdk/key_providers/kms.py +++ b/src/aws_encryption_sdk/key_providers/kms.py @@ -52,13 +52,13 @@ class KMSMasterKeyProviderConfig(MasterKeyProviderConfig): hash=True, default=attr.Factory(tuple), validator=attr.validators.instance_of(tuple), - convert=tuple + converter=tuple ) region_names = attr.ib( hash=True, default=attr.Factory(tuple), validator=attr.validators.instance_of(tuple), - convert=tuple + converter=tuple ) @@ -179,7 +179,7 @@ class KMSMasterKeyConfig(MasterKeyConfig): hash=True, default=attr.Factory(tuple), validator=attr.validators.instance_of(tuple), - convert=tuple + converter=tuple ) diff --git a/src/aws_encryption_sdk/key_providers/raw.py b/src/aws_encryption_sdk/key_providers/raw.py index 221199301..9ba941620 100644 --- a/src/aws_encryption_sdk/key_providers/raw.py +++ b/src/aws_encryption_sdk/key_providers/raw.py @@ -43,7 +43,7 @@ class RawMasterKeyConfig(MasterKeyConfig): provider_id = attr.ib( hash=True, validator=attr.validators.instance_of((six.string_types, bytes)), - convert=aws_encryption_sdk.internal.str_ops.to_str + converter=aws_encryption_sdk.internal.str_ops.to_str ) wrapping_key = attr.ib(hash=True, validator=attr.validators.instance_of(WrappingKey)) diff --git a/src/aws_encryption_sdk/materials_managers/caching.py b/src/aws_encryption_sdk/materials_managers/caching.py index 109e373bd..ad8678fb7 100644 --- a/src/aws_encryption_sdk/materials_managers/caching.py +++ b/src/aws_encryption_sdk/materials_managers/caching.py @@ -89,7 +89,7 @@ class CachingCryptoMaterialsManager(CryptoMaterialsManager): ) partition_name = attr.ib( default=None, - convert=to_bytes, + converter=to_bytes, validator=attr.validators.optional(attr.validators.instance_of(bytes)) ) master_key_provider = attr.ib( diff --git a/src/aws_encryption_sdk/streaming_client.py b/src/aws_encryption_sdk/streaming_client.py index 3de3dae53..512801235 100644 --- a/src/aws_encryption_sdk/streaming_client.py +++ b/src/aws_encryption_sdk/streaming_client.py @@ -64,7 +64,7 @@ class _ClientConfig(object): will attempt to seek() to the end of the stream and tell() to find the length of source data. """ - source = attr.ib(hash=True, convert=aws_encryption_sdk.internal.utils.prep_stream_data) + source = attr.ib(hash=True, converter=aws_encryption_sdk.internal.utils.prep_stream_data) materials_manager = attr.ib( hash=True, default=None, diff --git a/src/aws_encryption_sdk/structures.py b/src/aws_encryption_sdk/structures.py index 77a1c1ed7..6ac24271c 100644 --- a/src/aws_encryption_sdk/structures.py +++ b/src/aws_encryption_sdk/structures.py @@ -70,12 +70,12 @@ class MasterKeyInfo(object): provider_id = attr.ib( hash=True, validator=attr.validators.instance_of((six.string_types, bytes)), - convert=to_str + converter=to_str ) key_info = attr.ib( hash=True, validator=attr.validators.instance_of((six.string_types, bytes)), - convert=to_bytes + converter=to_bytes )