From cfb12578612aa82bcdd5f88ea3d57e3eb27c2c27 Mon Sep 17 00:00:00 2001 From: Benjamin Farley Date: Wed, 14 Jul 2021 11:32:38 -0600 Subject: [PATCH 1/3] chore: Remove support for python 2 --- CHANGELOG.rst | 12 +++++++++ README.rst | 7 +---- SUPPORT_POLICY.rst | 8 +++--- buildspec.yml | 2 -- codebuild/python2.7.yml | 18 ------------- setup.py | 3 --- src/dynamodb_encryption_sdk/identifiers.py | 2 +- tox.ini | 31 +--------------------- 8 files changed, 19 insertions(+), 64 deletions(-) delete mode 100644 codebuild/python2.7.yml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fd602e43..8a500867 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,18 @@ Changelog ********* +3.0.0 -- 2021-07-15 +=================== + +Deprecation +----------- +The AWS DynamoDB Encryption Client for Python no longer supports Python 2 or Python 3.4 +as of major version 3.x; only Python 3.5+ is supported. Customers using Python 2 +or Python 3.4 can still use the 2.x line of the DynamoDB Encryption Client, +which will continue to receive security updates for the next 12 months, in accordance +with our `Support Policy `__. + + 2.1.0 -- 2021-07-15 =================== diff --git a/README.rst b/README.rst index 42b8ce42..6881c2e1 100644 --- a/README.rst +++ b/README.rst @@ -47,12 +47,7 @@ Getting Started Required Prerequisites ====================== -* Python 2.7 or 3.4+ - - **NOTE: 2.x is the last major version of this library that will - support Python 2. Future major versions will begin to adopt changes - known to break Python 2. Python 3.4 support will also be removed - in future major versions; Python 3.5+ will be required.** +* Python 3.5+ Installation diff --git a/SUPPORT_POLICY.rst b/SUPPORT_POLICY.rst index 26667e42..26b126fa 100644 --- a/SUPPORT_POLICY.rst +++ b/SUPPORT_POLICY.rst @@ -26,12 +26,12 @@ This table describes the current support status of each major version of the AWS - End of Support - 2022-07-08 * - 2.x - - Generally Available - Maintenance - - 2021-07-13 + - End of Support + - 2022-07-15 * - 3.x - - - Generally Available - - 2021-07-13 + - + - .. _AWS SDKs and Tools Maintenance Policy: https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle diff --git a/buildspec.yml b/buildspec.yml index 82f32b41..b83ff440 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -3,8 +3,6 @@ version: 0.2 batch: fast-fail: false build-list: - - identifier: python2_7 - buildspec: codebuild/python2.7.yml - identifier: python3_5 buildspec: codebuild/python3.5.yml - identifier: python3_6 diff --git a/codebuild/python2.7.yml b/codebuild/python2.7.yml deleted file mode 100644 index fd688d77..00000000 --- a/codebuild/python2.7.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 0.2 - -env: - variables: - TOXENV: "py27-integ-slow" - 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 - -phases: - install: - runtime-versions: - python: latest - build: - commands: - - pip install tox - - tox diff --git a/setup.py b/setup.py index 8b50e8dc..5ae2a7ef 100644 --- a/setup.py +++ b/setup.py @@ -47,10 +47,7 @@ def get_requirements(): "Natural Language :: English", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", diff --git a/src/dynamodb_encryption_sdk/identifiers.py b/src/dynamodb_encryption_sdk/identifiers.py index e7a0fcfd..c9b33016 100644 --- a/src/dynamodb_encryption_sdk/identifiers.py +++ b/src/dynamodb_encryption_sdk/identifiers.py @@ -14,7 +14,7 @@ from enum import Enum __all__ = ("LOGGER_NAME", "CryptoAction", "EncryptionKeyType", "KeyEncodingType") -__version__ = "2.1.0" +__version__ = "3.0.0" LOGGER_NAME = "dynamodb_encryption_sdk" USER_AGENT_SUFFIX = "DynamodbEncryptionSdkPython/{}".format(__version__) diff --git a/tox.ini b/tox.ini index 9f752505..d0aa06da 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{27,35,36,37,38,39}-{local,integ,ddb,examples}-fast, + py{35,36,37,38,39}-{local,integ,ddb,examples}-fast, nocmk, sourcebuildcheck, docs, bandit, doc8, readme, flake8{,-tests,-examples}, pylint{,-tests,-examples}, @@ -117,15 +117,6 @@ recreate = True deps = commands = {toxinidir}/test/freeze-upstream-requirements.sh -# Freeze for Python 2.7 -[testenv:freeze-upstream-requirements-py27] -basepython = python2.7 -sitepackages = {[testenv:freeze-upstream-requirements-base]sitepackages} -skip_install = {[testenv:freeze-upstream-requirements-base]skip_install} -recreate = {[testenv:freeze-upstream-requirements-base]recreate} -deps = {[testenv:freeze-upstream-requirements-base]deps} -commands = {[testenv:freeze-upstream-requirements-base]commands} test/upstream-requirements-py27.txt - # Freeze for Python 3.7 [testenv:freeze-upstream-requirements-py37] basepython = python3.7 @@ -142,15 +133,6 @@ recreate = True passenv = commands = {[testenv:base-command]commands} -m "local and not slow and not veryslow and not nope" --ignore=examples -# Test frozen upstream requirements for Python 2.7 -[testenv:test-upstream-requirements-py27] -basepython = python2.7 -passenv = -deps = -rtest/upstream-requirements-py27.txt -sitepackages = {[testenv:test-upstream-requirements-base]sitepackages} -recreate = {[testenv:test-upstream-requirements-base]recreate} -commands = {[testenv:test-upstream-requirements-base]commands} - # Test frozen upstream requirements for Python 3.7 [testenv:test-upstream-requirements-py37] basepython = python3.7 @@ -201,17 +183,6 @@ commands = {posargs} {[testenv:mypy-coverage]commands} -[testenv:mypy-py2] -basepython = python2.7 -deps = {[testenv:mypy-common]deps} -commands = - python -m mypy \ - --py2 \ - --linecoverage-report build \ - src/dynamodb_encryption_sdk/ \ - {posargs} - {[testenv:mypy-coverage]commands} - # Linters [testenv:flake8] basepython = python3 From 2eaecca7d9146b58440664f390b9ed0bdb7e2a8c Mon Sep 17 00:00:00 2001 From: Benjamin Farley Date: Thu, 15 Jul 2021 15:35:51 -0600 Subject: [PATCH 2/3] Also remove py2 from GHA --- .github/workflows/ci_tests.yaml | 59 --------------------------------- 1 file changed, 59 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index b8e72507..9cf5a738 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -9,46 +9,6 @@ on: - cron: '0 0 * * *' jobs: - # Hypothesis no longer supports Python 2 and - # there is a bug that appears with our slow tests - # only on Python 2. - # Until we also drop Python 2 support, - # the workaround is just that we don't run the slow tests - # on Python 2. - py2-tests: - runs-on: ${{ matrix.platform.os }} - strategy: - fail-fast: true - matrix: - platform: - - os: ubuntu-latest - architecture: x64 - - os: windows-latest - architecture: x64 - # x86 builds are only meaningful for Windows - - os: windows-latest - architecture: x86 - - os: macos-latest - architecture: x64 - category: - - local-fast - # These require credentials. - # Enable them once we sort how to provide them. - # - integ-fast - # - examples - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: 2.7 - architecture: ${{ matrix.platform.architecture }} - - run: | - python -m pip install --upgrade pip - pip install --upgrade -r ci-requirements.txt - - name: run test - env: - TOXENV: ${{ matrix.category }} - run: tox -- -vv tests: runs-on: ${{ matrix.platform.os }} strategy: @@ -111,22 +71,3 @@ jobs: env: TOXENV: ${{ matrix.category }} run: tox -- -vv - upstream-py2: - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - category: - - test-upstream-requirements-py27 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: 2.7 - - run: | - python -m pip install --upgrade pip - pip install --upgrade -r ci-requirements.txt - - name: run test - env: - TOXENV: ${{ matrix.category }} - run: tox -- -vv From f3e3aa256872002c2fca4c41abea5e2dda27d91a Mon Sep 17 00:00:00 2001 From: Benjamin Farley Date: Thu, 15 Jul 2021 15:54:50 -0600 Subject: [PATCH 3/3] One more reference to py2 --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b10f60f4..a8a5c1a3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ boto3>=1.4.4 cryptography>=1.8.1 attrs>=17.4.0 -enum34; python_version < '3.4' \ No newline at end of file