Skip to content

Commit

Permalink
chore: Remove support for python 2 (aws#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
farleyb-amazon authored Jul 15, 2021
1 parent 9a5ab65 commit 8d82ed7
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 124 deletions.
59 changes: 0 additions & 59 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/aws/aws-dynamodb-encryption-python/blob/master/SUPPORT_POLICY.rst>`__.


2.1.0 -- 2021-07-15
===================

Expand Down
7 changes: 1 addition & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions SUPPORT_POLICY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 0 additions & 18 deletions codebuild/python2.7.yml

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
boto3>=1.4.4
cryptography>=1.8.1
attrs>=17.4.0
enum34; python_version < '3.4'
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/dynamodb_encryption_sdk/identifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
31 changes: 1 addition & 30 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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},
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8d82ed7

Please sign in to comment.