Skip to content

updating attr to >=17.4.0 and changing all uses of attr.ib from deprecated "convert" to "converter" #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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