From 2ce5c80ae9f308701647f2cea74cad069d54b330 Mon Sep 17 00:00:00 2001 From: Tony Knapp <5892063+texastony@users.noreply.github.com> Date: Tue, 9 Apr 2024 12:27:04 -0700 Subject: [PATCH] feat: Deprecate Python 3.7 Support (#416) Advertise 3.11 & 3.12 on PyPi via setup.py --- .github/workflows/ci_tests.yaml | 5 +++-- .github/workflows/install.yaml | 2 +- README.rst | 2 +- buildspec.yml | 23 +++++++++++++++++----- codebuild/py311/examples.yml | 20 +++++++++++++++++++ codebuild/py311/integ.yml | 18 +++++++++++++++++ codebuild/py312/examples.yml | 20 +++++++++++++++++++ codebuild/py312/integ.yml | 18 +++++++++++++++++ codebuild/py37/examples.yml | 34 --------------------------------- codebuild/py37/integ.yml | 32 ------------------------------- setup.py | 3 ++- tox.ini | 2 +- 12 files changed, 102 insertions(+), 77 deletions(-) create mode 100644 codebuild/py311/examples.yml create mode 100644 codebuild/py311/integ.yml create mode 100644 codebuild/py312/examples.yml create mode 100644 codebuild/py312/integ.yml delete mode 100644 codebuild/py37/examples.yml delete mode 100644 codebuild/py37/integ.yml diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index a55291c..59cbb91 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -25,10 +25,11 @@ jobs: - os: macos-latest architecture: x64 python: - - 3.7 - 3.8 - 3.9 - - 3.x + - "3.10" + - "3.11" + - "3.12" category: - local # These require credentials. diff --git a/.github/workflows/install.yaml b/.github/workflows/install.yaml index 21256dd..7463680 100644 --- a/.github/workflows/install.yaml +++ b/.github/workflows/install.yaml @@ -25,7 +25,7 @@ jobs: - os: macos-latest architecture: x64 python: - - 3.x + - "3.12" category: - local # These require credentials. diff --git a/README.rst b/README.rst index dc5e6ba..f978a19 100644 --- a/README.rst +++ b/README.rst @@ -44,7 +44,7 @@ Getting Started Required Prerequisites ====================== -* Python 3.7+ +* Python 3.8+ * aws-encryption-sdk >= 3.1.0 Installation diff --git a/buildspec.yml b/buildspec.yml index 1764b9c..80cbd6d 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -3,11 +3,6 @@ version: 0.2 batch: fast-fail: false build-list: - - identifier: py37_integ - buildspec: codebuild/py37/integ.yml - - identifier: py37_examples - buildspec: codebuild/py37/examples.yml - - identifier: py38_integ buildspec: codebuild/py38/integ.yml - identifier: py38_examples @@ -23,5 +18,23 @@ batch: - identifier: py310_examples buildspec: codebuild/py310/examples.yml + - identifier: py311_integ + buildspec: codebuild/py311/integ.yml + env: + image: aws/codebuild/standard:7.0 + - identifier: py311_examples + buildspec: codebuild/py311/examples.yml + env: + image: aws/codebuild/standard:7.0 + + - identifier: py312_integ + buildspec: codebuild/py312/integ.yml + env: + image: aws/codebuild/standard:7.0 + - identifier: py312_examples + buildspec: codebuild/py312/examples.yml + env: + image: aws/codebuild/standard:7.0 + - identifier: code_coverage buildspec: codebuild/coverage.yml diff --git a/codebuild/py311/examples.yml b/codebuild/py311/examples.yml new file mode 100644 index 0000000..f4c04e3 --- /dev/null +++ b/codebuild/py311/examples.yml @@ -0,0 +1,20 @@ +version: 0.2 + +env: + variables: + TOXENV: "py311-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: >- + arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2 + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >- + arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 + +phases: + install: + runtime-versions: + python: 3.11 + build: + commands: + - pip install -r dev_requirements/ci-requirements.txt + - tox diff --git a/codebuild/py311/integ.yml b/codebuild/py311/integ.yml new file mode 100644 index 0000000..f7c7f74 --- /dev/null +++ b/codebuild/py311/integ.yml @@ -0,0 +1,18 @@ +version: 0.2 + +env: + variables: + TOXENV: "py311-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_MRK_KEY_ID_1: >- + arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 + +phases: + install: + runtime-versions: + python: 3.11 + build: + commands: + - pip install -r dev_requirements/ci-requirements.txt + - tox diff --git a/codebuild/py312/examples.yml b/codebuild/py312/examples.yml new file mode 100644 index 0000000..4e41cdb --- /dev/null +++ b/codebuild/py312/examples.yml @@ -0,0 +1,20 @@ +version: 0.2 + +env: + variables: + TOXENV: "py312-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: >- + arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2 + AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >- + arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 + +phases: + install: + runtime-versions: + python: 3.12 + build: + commands: + - pip install -r dev_requirements/ci-requirements.txt + - tox diff --git a/codebuild/py312/integ.yml b/codebuild/py312/integ.yml new file mode 100644 index 0000000..f7470b0 --- /dev/null +++ b/codebuild/py312/integ.yml @@ -0,0 +1,18 @@ +version: 0.2 + +env: + variables: + TOXENV: "py312-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_MRK_KEY_ID_1: >- + arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 + +phases: + install: + runtime-versions: + python: 3.12 + build: + commands: + - pip install -r dev_requirements/ci-requirements.txt + - tox diff --git a/codebuild/py37/examples.yml b/codebuild/py37/examples.yml deleted file mode 100644 index 713ba56..0000000 --- a/codebuild/py37/examples.yml +++ /dev/null @@ -1,34 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py37-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: >- - arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2 - AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >- - arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 - -phases: - install: - runtime-versions: - python: latest - build: - commands: - # The specific versions are manually installed - # because they are not installed - # by default in CodeBuild containers. - # `pyenv` does not have - # a nice way to just install - # the latest patch version. - # I have selected the current latest patch - # rather than try - # and manage a one-liner or script. - # Testing every minor version - # is too extreme at this time. - # The choice of versions should be reviewed. - - pyenv install 3.7.12 - - pyenv local 3.7.12 - - pip install "tox < 4.0" - - tox diff --git a/codebuild/py37/integ.yml b/codebuild/py37/integ.yml deleted file mode 100644 index 66d4ca2..0000000 --- a/codebuild/py37/integ.yml +++ /dev/null @@ -1,32 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py37-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_MRK_KEY_ID_1: >- - arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 - -phases: - install: - runtime-versions: - python: latest - build: - commands: - # The specific versions are manually installed - # because they are not installed - # by default in CodeBuild containers. - # `pyenv` does not have - # a nice way to just install - # the latest patch version. - # I have selected the current latest patch - # rather than try - # and manage a one-liner or script. - # Testing every minor version - # is too extreme at this time. - # The choice of versions should be reviewed. - - pyenv install 3.7.12 - - pyenv local 3.7.12 - - pip install "tox < 4.0" - - tox diff --git a/setup.py b/setup.py index 7f929cd..258c1c8 100644 --- a/setup.py +++ b/setup.py @@ -49,10 +49,11 @@ def get_requirements(): "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Security", "Topic :: Security :: Cryptography", diff --git a/tox.ini b/tox.ini index 8f86c8d..3a215c9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{36,37,38,39,310,311,312}-{local,integ,examples}, + py{38,39,310,311,312}-{local,integ,examples}, mypy-py{3}, bandit, doc8, readme, docs, flake8{,-tests,-examples}, pylint{,-tests,-examples},