Skip to content

Commit 17430c0

Browse files
chore: Fix CI (#380)
1 parent 2f4773f commit 17430c0

36 files changed

+65
-43
lines changed

.github/workflows/ci_decrypt-oracle.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v2
15-
- uses: actions/setup-python@v1
15+
- uses: actions/setup-python@v2
1616
with:
1717
# The oracle runs in a Python 3.6 Lamba
1818
python-version: 3.6

.github/workflows/ci_static-analysis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- isort-check
2929
steps:
3030
- uses: actions/checkout@v2
31-
- uses: actions/setup-python@v1
31+
- uses: actions/setup-python@v2
3232
with:
3333
python-version: 3.8
3434
- run: |

.github/workflows/ci_test-vector-handler.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
aws-secret-access-key: ${{ secrets.INTEG_AWS_SECRET_ACCESS_KEY }}
4848
aws-region: us-west-2
4949
- uses: actions/checkout@v2
50-
- uses: actions/setup-python@v1
50+
- uses: actions/setup-python@v2
5151
with:
5252
python-version: ${{ matrix.python }}
5353
architecture: ${{ matrix.architecture }}

.github/workflows/ci_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
architecture: x86
5454
steps:
5555
- uses: actions/checkout@v2
56-
- uses: actions/setup-python@v1
56+
- uses: actions/setup-python@v2
5757
with:
5858
python-version: ${{ matrix.python }}
5959
architecture: ${{ matrix.architecture }}

codebuild/py35/awses_local.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ phases:
2020
python: latest
2121
build:
2222
commands:
23-
- pyenv install 3.5.9
24-
- pyenv local 3.5.9
23+
- pyenv install 3.5.10
24+
- pyenv local 3.5.10
2525
- pip install tox tox-pyenv
2626
- cd test_vector_handlers
2727
- tox

codebuild/py35/examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ phases:
1818
python: latest
1919
build:
2020
commands:
21-
- pyenv install 3.5.9
22-
- pyenv local 3.5.9
21+
- pyenv install 3.5.10
22+
- pyenv local 3.5.10
2323
- pip install tox tox-pyenv
2424
- tox

codebuild/py35/integ.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ phases:
1818
python: latest
1919
build:
2020
commands:
21-
- pyenv install 3.5.9
22-
- pyenv local 3.5.9
21+
- pyenv install 3.5.10
22+
- pyenv local 3.5.10
2323
- pip install tox tox-pyenv
2424
- tox

codebuild/py36/awses_local.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ phases:
2020
python: latest
2121
build:
2222
commands:
23-
- pip install tox
23+
- pyenv install 3.6.15
24+
- pyenv local 3.6.15
25+
- pip install tox tox-pyenv
2426
- cd test_vector_handlers
2527
- tox

codebuild/py36/examples.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ phases:
1818
python: latest
1919
build:
2020
commands:
21-
- pip install tox
21+
- pyenv install 3.6.15
22+
- pyenv local 3.6.15
23+
- pip install tox tox-pyenv
2224
- tox

codebuild/py36/integ.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ phases:
1818
python: latest
1919
build:
2020
commands:
21-
- pip install tox
21+
- pyenv install 3.6.15
22+
- pyenv local 3.6.15
23+
- pip install tox tox-pyenv
2224
- tox

codebuild/py37/awses_local.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ phases:
2020
python: latest
2121
build:
2222
commands:
23-
- pyenv install 3.7.9
24-
- pyenv local 3.7.9
23+
- pyenv install 3.7.12
24+
- pyenv local 3.7.12
2525
- pip install tox tox-pyenv
2626
- cd test_vector_handlers
2727
- tox

codebuild/py37/examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ phases:
1818
python: latest
1919
build:
2020
commands:
21-
- pyenv install 3.7.9
22-
- pyenv local 3.7.9
21+
- pyenv install 3.7.12
22+
- pyenv local 3.7.12
2323
- pip install tox tox-pyenv
2424
- tox

codebuild/py37/integ.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ phases:
1818
python: latest
1919
build:
2020
commands:
21-
- pyenv install 3.7.9
22-
- pyenv local 3.7.9
21+
- pyenv install 3.7.12
22+
- pyenv local 3.7.12
2323
- pip install tox tox-pyenv
2424
- tox

codebuild/py38/awses_local.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ phases:
2020
python: latest
2121
build:
2222
commands:
23-
- pip install tox
23+
- pyenv install 3.8.12
24+
- pyenv local 3.8.12
25+
- pip install tox tox-pyenv
2426
- cd test_vector_handlers
2527
- tox

codebuild/py38/examples.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ phases:
1818
python: latest
1919
build:
2020
commands:
21-
- pip install tox
21+
- pyenv install 3.8.12
22+
- pyenv local 3.8.12
23+
- pip install tox tox-pyenv
2224
- tox

codebuild/py38/integ.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ phases:
1818
python: latest
1919
build:
2020
commands:
21-
- pip install tox
21+
- pyenv install 3.8.12
22+
- pyenv local 3.8.12
23+
- pip install tox tox-pyenv
2224
- tox

codebuild/py39/awses_1.7.1.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ phases:
2020
python: latest
2121
build:
2222
commands:
23-
- pyenv install 3.9.0
24-
- pyenv local 3.9.0
23+
- pyenv install 3.9.7
24+
- pyenv local 3.9.7
2525
- pip install tox tox-pyenv
2626
- cd test_vector_handlers
2727
- tox

codebuild/py39/awses_2.0.0.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ phases:
2020
python: latest
2121
build:
2222
commands:
23-
- pyenv install 3.9.0
24-
- pyenv local 3.9.0
23+
- pyenv install 3.9.7
24+
- pyenv local 3.9.7
2525
- pip install tox tox-pyenv
2626
- cd test_vector_handlers
2727
- tox

codebuild/py39/awses_latest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ phases:
2020
python: latest
2121
build:
2222
commands:
23-
- pyenv install 3.9.0
24-
- pyenv local 3.9.0
23+
- pyenv install 3.9.7
24+
- pyenv local 3.9.7
2525
- pip install tox tox-pyenv
2626
- cd test_vector_handlers
2727
- tox

codebuild/py39/examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ phases:
1818
python: latest
1919
build:
2020
commands:
21-
- pyenv install 3.9.0
22-
- pyenv local 3.9.0
21+
- pyenv install 3.9.7
22+
- pyenv local 3.9.7
2323
- pip install tox tox-pyenv
2424
- tox

codebuild/py39/integ.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ phases:
1818
python: latest
1919
build:
2020
commands:
21-
- pyenv install 3.9.0
22-
- pyenv local 3.9.0
21+
- pyenv install 3.9.7
22+
- pyenv local 3.9.7
2323
- pip install tox tox-pyenv
2424
- tox

decrypt_oracle/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
def read(*args):
1212
"""Read complete file contents."""
13-
return open(os.path.join(HERE, *args)).read() # pylint: disable=consider-using-with
13+
return open(os.path.join(HERE, *args)).read() # pylint: disable=consider-using-with, unspecified-encoding
1414

1515

1616
def get_version():

decrypt_oracle/src/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
disable =
44
bad-continuation, # we let black handle this
55
ungrouped-imports, # we let isort handle this
6+
consider-using-f-string
67

78
[FORMAT]
89
max-line-length = 120

decrypt_oracle/test/integration/integration_test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_vectors_filename() -> Text:
100100
def all_test_vectors() -> Iterable[Any]:
101101
"""Collect and iterate through all test vectors."""
102102

103-
with open(test_vectors_filename(), "r") as vectors_file:
103+
with open(test_vectors_filename(), "r") as vectors_file: # pylint: disable=unspecified-encoding
104104
raw_vectors = json.load(vectors_file)
105105

106106
for vector in raw_vectors:

decrypt_oracle/test/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ disable =
55
missing-docstring, # we don't write docstrings for tests
66
bad-continuation, # we let black handle this
77
ungrouped-imports, # we let isort handle this
8+
consider-using-f-string
89

910
[FORMAT]
1011
max-line-length = 120

examples/src/one_kms_cmk_streaming_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def encrypt_decrypt_stream(key_arn, source_plaintext_filename, botocore_session=
2525
:param botocore_session: existing botocore session instance
2626
:type botocore_session: botocore.session.Session
2727
"""
28-
kwargs = dict()
28+
kwargs = {}
2929

3030
kwargs["key_ids"] = [key_arn]
3131

examples/src/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ disable =
1414
attribute-defined-outside-init, # breaks with attrs_post_init
1515
abstract-method, # throws false positives on io.BaseIO grandchildren
1616
redefined-outer-name, # we do this on purpose in multiple places
17+
consider-using-f-string
1718

1819
[BASIC]
1920
# Allow function names up to 50 characters

examples/test/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ disable =
77
# unknown modules as non-standard-library. flake8 tests for this as well
88
# and does treat them properly
99
duplicate-code, # tests for similar things tend to be similar
10+
consider-using-f-string
1011

1112
[VARIABLES]
1213
additional-builtins = raw_input

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
def read(*args):
1212
"""Reads complete file contents."""
13-
return open(os.path.join(HERE, *args)).read() # pylint: disable=consider-using-with
13+
return open(os.path.join(HERE, *args)).read() # pylint: disable=consider-using-with, unspecified-encoding
1414

1515

1616
def get_version():

src/aws_encryption_sdk/internal/formatting/deserialize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def deserialize_header(stream, max_encrypted_data_keys=None):
344344
tee_stream = TeeStream(stream, tee)
345345
(version_id,) = unpack_values(">B", tee_stream)
346346
version = _verified_version_from_id(version_id)
347-
header = dict()
347+
header = {}
348348
header["version"] = version
349349

350350
if version == SerializationVersion.V1:

src/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ disable =
1414
useless-object-inheritance,
1515
raise-missing-from,
1616
super-with-arguments,
17+
consider-using-f-string
1718

1819
[BASIC]
1920
# Allow function names up to 50 characters

test/pylintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ disable =
1818
abstract-method, # we do this on purpose to test that they are enforced
1919
redefined-outer-name, # raised when using decorators
2020
unused-argument, # raised when patches are needed but not called
21+
unspecified-encoding, # we use open() in binary mode which doesn't support encoding
2122
# All below are disabled because we need to support Python 2
2223
useless-object-inheritance,
2324
raise-missing-from,
2425
super-with-arguments,
26+
consider-using-f-string,
27+
redundant-u-string-prefix,
2528

2629
[VARIABLES]
2730
additional-builtins = raw_input

test/unit/test_encryption_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def test_client_encrypt(mocker):
5959
commitment_policy=CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT, max_encrypted_data_keys=3
6060
)
6161

62-
kwargs = dict()
62+
kwargs = {}
6363
kwargs["source"] = b"plaintext"
6464
kwargs["materials_manager"] = cmm
6565
client.encrypt(**kwargs)
@@ -77,7 +77,7 @@ def test_client_decrypt(mocker):
7777
commitment_policy=CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT, max_encrypted_data_keys=3
7878
)
7979

80-
kwargs = dict()
80+
kwargs = {}
8181
kwargs["source"] = b"ciphertext"
8282
kwargs["materials_manager"] = cmm
8383
client.decrypt(**kwargs)
@@ -94,7 +94,7 @@ def test_client_stream_encrypt(mocker, mode_string):
9494
cmm = MagicMock(__class__=CryptoMaterialsManager)
9595
client = aws_encryption_sdk.EncryptionSDKClient(commitment_policy=CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
9696

97-
kwargs = dict()
97+
kwargs = {}
9898
kwargs["mode"] = mode_string
9999
kwargs["source"] = b"plaintext"
100100
kwargs["materials_manager"] = cmm
@@ -113,7 +113,7 @@ def test_client_stream_decrypt(mocker, mode_string):
113113
cmm = MagicMock(__class__=CryptoMaterialsManager)
114114
client = aws_encryption_sdk.EncryptionSDKClient(commitment_policy=CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
115115

116-
kwargs = dict()
116+
kwargs = {}
117117
kwargs["mode"] = mode_string
118118
kwargs["source"] = b"ciphertext"
119119
kwargs["materials_manager"] = cmm
@@ -132,7 +132,7 @@ def test_client_bad_kwargs(mocker, method, key):
132132
mocker.patch.object(aws_encryption_sdk, "StreamEncryptor")
133133

134134
cmm = MagicMock(__class__=CryptoMaterialsManager)
135-
kwargs = dict()
135+
kwargs = {}
136136
kwargs[key] = "foobar"
137137
kwargs["source"] = b"ciphertext"
138138
kwargs["materials_manager"] = cmm

test_vector_handlers/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
def read(*args):
1212
"""Read complete file contents."""
13-
return open(os.path.join(HERE, *args)).read() # pylint: disable=consider-using-with
13+
return open(os.path.join(HERE, *args)).read() # pylint: disable=consider-using-with, unspecified-encoding
1414

1515

1616
def get_version():

test_vector_handlers/src/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ disable =
88
useless-object-inheritance,
99
raise-missing-from,
1010
super-with-arguments,
11+
consider-using-f-string
1112

1213
[FORMAT]
1314
max-line-length = 120

test_vector_handlers/test/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ disable =
1111
useless-object-inheritance,
1212
raise-missing-from,
1313
super-with-arguments,
14+
consider-using-f-string
1415

1516
[FORMAT]
1617
max-line-length = 120

0 commit comments

Comments
 (0)