Skip to content

Commit e729279

Browse files
committed
updating attr to >=17.4.0 and changing all uses of attr.ib from deprecated "convert" to "converter" #39
1 parent 1553c8b commit e729279

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
boto3>=1.4.4
22
cryptography>=1.8.1
3-
attrs>=16.3.0
3+
attrs>=17.4.0
44
wrapt>=1.10.11

src/aws_encryption_sdk/key_providers/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ class MasterKeyConfig(object):
303303
key_id = attr.ib(
304304
hash=True,
305305
validator=attr.validators.instance_of((six.string_types, bytes)),
306-
convert=to_bytes
306+
converter=to_bytes
307307
)
308308

309309
def __attrs_post_init__(self):

src/aws_encryption_sdk/key_providers/kms.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ class KMSMasterKeyProviderConfig(MasterKeyProviderConfig):
5252
hash=True,
5353
default=attr.Factory(tuple),
5454
validator=attr.validators.instance_of(tuple),
55-
convert=tuple
55+
converter=tuple
5656
)
5757
region_names = attr.ib(
5858
hash=True,
5959
default=attr.Factory(tuple),
6060
validator=attr.validators.instance_of(tuple),
61-
convert=tuple
61+
converter=tuple
6262
)
6363

6464

@@ -179,7 +179,7 @@ class KMSMasterKeyConfig(MasterKeyConfig):
179179
hash=True,
180180
default=attr.Factory(tuple),
181181
validator=attr.validators.instance_of(tuple),
182-
convert=tuple
182+
converter=tuple
183183
)
184184

185185

src/aws_encryption_sdk/key_providers/raw.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class RawMasterKeyConfig(MasterKeyConfig):
4343
provider_id = attr.ib(
4444
hash=True,
4545
validator=attr.validators.instance_of((six.string_types, bytes)),
46-
convert=aws_encryption_sdk.internal.str_ops.to_str
46+
converter=aws_encryption_sdk.internal.str_ops.to_str
4747
)
4848
wrapping_key = attr.ib(hash=True, validator=attr.validators.instance_of(WrappingKey))
4949

src/aws_encryption_sdk/materials_managers/caching.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class CachingCryptoMaterialsManager(CryptoMaterialsManager):
8989
)
9090
partition_name = attr.ib(
9191
default=None,
92-
convert=to_bytes,
92+
converter=to_bytes,
9393
validator=attr.validators.optional(attr.validators.instance_of(bytes))
9494
)
9595
master_key_provider = attr.ib(

src/aws_encryption_sdk/streaming_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class _ClientConfig(object):
6464
will attempt to seek() to the end of the stream and tell() to find the length of source data.
6565
"""
6666

67-
source = attr.ib(hash=True, convert=aws_encryption_sdk.internal.utils.prep_stream_data)
67+
source = attr.ib(hash=True, converter=aws_encryption_sdk.internal.utils.prep_stream_data)
6868
materials_manager = attr.ib(
6969
hash=True,
7070
default=None,

src/aws_encryption_sdk/structures.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ class MasterKeyInfo(object):
7070
provider_id = attr.ib(
7171
hash=True,
7272
validator=attr.validators.instance_of((six.string_types, bytes)),
73-
convert=to_str
73+
converter=to_str
7474
)
7575
key_info = attr.ib(
7676
hash=True,
7777
validator=attr.validators.instance_of((six.string_types, bytes)),
78-
convert=to_bytes
78+
converter=to_bytes
7979
)
8080

8181

0 commit comments

Comments
 (0)