Skip to content
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

feat: Py310 & Runtime Python Verison Check #368

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 17 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 .github/workflows/ci_decrypt-oracle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
# The oracle runs in a Python 3.6 Lamba
python-version: 3.6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- isort-check
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: 3.8
- run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci_test-vector-handler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
- macos-latest
python:
- 2.7
- 3.5
- 3.6
- 3.7
- 3.8
Expand All @@ -47,7 +46,7 @@ jobs:
aws-secret-access-key: ${{ secrets.INTEG_AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
- windows-latest
- macos-latest
python:
- 3.5
- 3.6
- 3.7
- 3.8
Expand All @@ -52,7 +51,7 @@ jobs:
architecture: x86
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
texastony marked this conversation as resolved.
Show resolved Hide resolved
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Getting Started
Required Prerequisites
======================

* Python 3.5+
* Python 3.6+
* cryptography >= 2.5.0
* boto3 >= 1.10.0
* attrs
Expand Down
15 changes: 8 additions & 7 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ version: 0.2
batch:
fast-fail: false
build-list:
- identifier: py35_integ
buildspec: codebuild/py35/integ.yml
- identifier: py35_examples
buildspec: codebuild/py35/examples.yml
- identifier: py35_awses_local
buildspec: codebuild/py35/awses_local.yml

- identifier: py36_integ
buildspec: codebuild/py36/integ.yml
- identifier: py36_examples
Expand Down Expand Up @@ -37,6 +30,14 @@ batch:
buildspec: codebuild/py39/examples.yml
- identifier: py39_awses_latest

- identifier: py310_integ
buildspec: codebuild/py310/integ.yml
- identifier: py310_examples
buildspec: codebuild/py310/examples.yml
- identifier: py310_awses_latest
buildspec: codebuild/py310/awses_local.yml


- identifier: code_coverage
buildspec: codebuild/coverage/coverage.yml

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 0.2

env:
variables:
TOXENV: "py35-awses_local"
TOXENV: "py310-awses_local"
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
Expand All @@ -20,8 +20,8 @@ phases:
python: latest
build:
commands:
- pyenv install 3.5.9
- pyenv local 3.5.9
- pyenv install 3.10.0
- pyenv local 3.10.0
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 0.2

env:
variables:
TOXENV: "py35-examples"
TOXENV: "py310-examples"
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
Expand All @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.5.9
- pyenv local 3.5.9
- pyenv install 3.10.0
- pyenv local 3.10.0
- pip install tox tox-pyenv
- tox
6 changes: 3 additions & 3 deletions codebuild/py35/integ.yml → codebuild/py310/integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 0.2

env:
variables:
TOXENV: "py35-integ"
TOXENV: "py310-integ"
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
Expand All @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.5.9
- pyenv local 3.5.9
- pyenv install 3.10.0
- pyenv local 3.10.0
- pip install tox tox-pyenv
- tox
4 changes: 3 additions & 1 deletion codebuild/py36/awses_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ phases:
python: latest
build:
commands:
- pip install tox
- pyenv install 3.6.15
- pyenv local 3.6.15
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 3 additions & 1 deletion codebuild/py36/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ phases:
python: latest
build:
commands:
- pip install tox
- pyenv install 3.6.15
- pyenv local 3.6.15
- pip install tox tox-pyenv
- tox
4 changes: 3 additions & 1 deletion codebuild/py36/integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ phases:
python: latest
build:
commands:
- pip install tox
- pyenv install 3.6.15
- pyenv local 3.6.15
- pip install tox tox-pyenv
- tox
4 changes: 2 additions & 2 deletions codebuild/py37/awses_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ phases:
python: latest
build:
commands:
- pyenv install 3.7.9
- pyenv local 3.7.9
- pyenv install 3.7.12
- pyenv local 3.7.12
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 2 additions & 2 deletions codebuild/py37/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.7.9
- pyenv local 3.7.9
- pyenv install 3.7.12
- pyenv local 3.7.12
- pip install tox tox-pyenv
- tox
4 changes: 2 additions & 2 deletions codebuild/py37/integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.7.9
- pyenv local 3.7.9
- pyenv install 3.7.12
- pyenv local 3.7.12
- pip install tox tox-pyenv
- tox
4 changes: 2 additions & 2 deletions codebuild/py38/awses_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ phases:
python: latest
build:
commands:
- pyenv install 3.8.6
- pyenv local 3.8.6
- pyenv install 3.8.12
- pyenv local 3.8.12
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 2 additions & 2 deletions codebuild/py38/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.8.6
- pyenv local 3.8.6
- pyenv install 3.8.12
- pyenv local 3.8.12
- pip install tox tox-pyenv
- tox
4 changes: 2 additions & 2 deletions codebuild/py38/integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.8.6
- pyenv local 3.8.6
- pyenv install 3.8.12
- pyenv local 3.8.12
- pip install tox tox-pyenv
- tox
4 changes: 2 additions & 2 deletions codebuild/py39/awses_1.7.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ phases:
python: latest
build:
commands:
- pyenv install 3.9.0
- pyenv local 3.9.0
- pyenv install 3.9.7
- pyenv local 3.9.7
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 2 additions & 2 deletions codebuild/py39/awses_2.0.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ phases:
python: latest
build:
commands:
- pyenv install 3.9.0
- pyenv local 3.9.0
- pyenv install 3.9.7
- pyenv local 3.9.7
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 2 additions & 2 deletions codebuild/py39/awses_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ phases:
python: latest
build:
commands:
- pyenv install 3.9.0
- pyenv local 3.9.0
- pyenv install 3.9.7
- pyenv local 3.9.7
- pip install tox tox-pyenv
- cd test_vector_handlers
- tox
4 changes: 2 additions & 2 deletions codebuild/py39/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.9.0
- pyenv local 3.9.0
- pyenv install 3.9.7
- pyenv local 3.9.7
- pip install tox tox-pyenv
- tox
4 changes: 2 additions & 2 deletions codebuild/py39/integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ phases:
python: latest
build:
commands:
- pyenv install 3.9.0
- pyenv local 3.9.0
- pyenv install 3.9.7
- pyenv local 3.9.7
- pip install tox tox-pyenv
- tox
1 change: 1 addition & 0 deletions decrypt_oracle/src/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
disable =
bad-continuation, # we let black handle this
ungrouped-imports, # we let isort handle this
consider-using-f-string # disable until 2022-05-05; 6 months after 3.5 deprecation

[FORMAT]
max-line-length = 120
Expand Down
1 change: 1 addition & 0 deletions decrypt_oracle/test/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ disable =
missing-docstring, # we don't write docstrings for tests
bad-continuation, # we let black handle this
ungrouped-imports, # we let isort handle this
consider-using-f-string # disable until 2022-05-05; 6 months after 3.5 deprecation

[FORMAT]
max-line-length = 120
Expand Down
2 changes: 1 addition & 1 deletion decrypt_oracle/tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{35,36,37,38,39}-{local,integ},
py{36,37,38,39}-{local,integ},
bandit, doc8, readme, docs,
{flake8,pylint}{,-tests},
# prone to false positives
Expand Down
1 change: 1 addition & 0 deletions examples/src/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ disable =
attribute-defined-outside-init, # breaks with attrs_post_init
abstract-method, # throws false positives on io.BaseIO grandchildren
redefined-outer-name, # we do this on purpose in multiple places
consider-using-f-string # disable until 2022-05-05; 6 months after 3.5 deprecation

[BASIC]
# Allow function names up to 50 characters
Expand Down
1 change: 1 addition & 0 deletions examples/test/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ disable =
# unknown modules as non-standard-library. flake8 tests for this as well
# and does treat them properly
duplicate-code, # tests for similar things tend to be similar
consider-using-f-string # disable until 2022-05-05; 6 months after 3.5 deprecation

[VARIABLES]
additional-builtins = raw_input
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def get_requirements():
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
Expand Down
4 changes: 3 additions & 1 deletion src/aws_encryption_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# language governing permissions and limitations under the License.
"""High level AWS Encryption SDK client functions."""
# Below are imported for ease of use by implementors

import warnings

import attr

from aws_encryption_sdk.caches.local import LocalCryptoMaterialsCache # noqa
from aws_encryption_sdk.caches.null import NullCryptoMaterialsCache # noqa
from aws_encryption_sdk.compatability import _warn_deprecated_python
from aws_encryption_sdk.exceptions import AWSEncryptionSDKClientError # noqa
from aws_encryption_sdk.identifiers import Algorithm, CommitmentPolicy, __version__ # noqa
from aws_encryption_sdk.internal.utils.signature import SignaturePolicy # noqa
Expand All @@ -36,6 +36,8 @@
StreamEncryptor,
)

_warn_deprecated_python()


@attr.s(hash=True)
class EncryptionSDKClientConfig(object):
Expand Down
Loading