Skip to content

Commit

Permalink
Merge pull request #40 from mattsb42-aws/dev-39
Browse files Browse the repository at this point in the history
updating attr to >=17.4.0 and changing all uses of attr.ib from deprecated "convert" to "converter"
  • Loading branch information
mattsb42-aws committed Jan 12, 2018
2 parents f98382a + e729279 commit 5d7160a
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
boto3>=1.4.4
cryptography>=1.8.1
attrs>=16.3.0
attrs>=17.4.0
wrapt>=1.10.11
2 changes: 1 addition & 1 deletion src/aws_encryption_sdk/key_providers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions src/aws_encryption_sdk/key_providers/kms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)


Expand Down Expand Up @@ -179,7 +179,7 @@ class KMSMasterKeyConfig(MasterKeyConfig):
hash=True,
default=attr.Factory(tuple),
validator=attr.validators.instance_of(tuple),
convert=tuple
converter=tuple
)


Expand Down
2 changes: 1 addition & 1 deletion src/aws_encryption_sdk/key_providers/raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
2 changes: 1 addition & 1 deletion src/aws_encryption_sdk/materials_managers/caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/aws_encryption_sdk/streaming_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/aws_encryption_sdk/structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)


Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ passenv =
sitepackages = False
deps =
mock
pytest!=3.3.0
pytest-catchlog
pytest>=3.3.1
pytest-cov
pytest-mock
coverage
Expand Down

0 comments on commit 5d7160a

Please sign in to comment.