Skip to content

Commit 8d82ed7

Browse files
chore: Remove support for python 2 (#173)
1 parent 9a5ab65 commit 8d82ed7

File tree

10 files changed

+19
-124
lines changed

10 files changed

+19
-124
lines changed

Diff for: .github/workflows/ci_tests.yaml

-59
Original file line numberDiff line numberDiff line change
@@ -9,46 +9,6 @@ on:
99
- cron: '0 0 * * *'
1010

1111
jobs:
12-
# Hypothesis no longer supports Python 2 and
13-
# there is a bug that appears with our slow tests
14-
# only on Python 2.
15-
# Until we also drop Python 2 support,
16-
# the workaround is just that we don't run the slow tests
17-
# on Python 2.
18-
py2-tests:
19-
runs-on: ${{ matrix.platform.os }}
20-
strategy:
21-
fail-fast: true
22-
matrix:
23-
platform:
24-
- os: ubuntu-latest
25-
architecture: x64
26-
- os: windows-latest
27-
architecture: x64
28-
# x86 builds are only meaningful for Windows
29-
- os: windows-latest
30-
architecture: x86
31-
- os: macos-latest
32-
architecture: x64
33-
category:
34-
- local-fast
35-
# These require credentials.
36-
# Enable them once we sort how to provide them.
37-
# - integ-fast
38-
# - examples
39-
steps:
40-
- uses: actions/checkout@v2
41-
- uses: actions/setup-python@v1
42-
with:
43-
python-version: 2.7
44-
architecture: ${{ matrix.platform.architecture }}
45-
- run: |
46-
python -m pip install --upgrade pip
47-
pip install --upgrade -r ci-requirements.txt
48-
- name: run test
49-
env:
50-
TOXENV: ${{ matrix.category }}
51-
run: tox -- -vv
5212
tests:
5313
runs-on: ${{ matrix.platform.os }}
5414
strategy:
@@ -111,22 +71,3 @@ jobs:
11171
env:
11272
TOXENV: ${{ matrix.category }}
11373
run: tox -- -vv
114-
upstream-py2:
115-
runs-on: ubuntu-latest
116-
strategy:
117-
fail-fast: true
118-
matrix:
119-
category:
120-
- test-upstream-requirements-py27
121-
steps:
122-
- uses: actions/checkout@v2
123-
- uses: actions/setup-python@v1
124-
with:
125-
python-version: 2.7
126-
- run: |
127-
python -m pip install --upgrade pip
128-
pip install --upgrade -r ci-requirements.txt
129-
- name: run test
130-
env:
131-
TOXENV: ${{ matrix.category }}
132-
run: tox -- -vv

Diff for: CHANGELOG.rst

+12
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
Changelog
33
*********
44

5+
3.0.0 -- 2021-07-15
6+
===================
7+
8+
Deprecation
9+
-----------
10+
The AWS DynamoDB Encryption Client for Python no longer supports Python 2 or Python 3.4
11+
as of major version 3.x; only Python 3.5+ is supported. Customers using Python 2
12+
or Python 3.4 can still use the 2.x line of the DynamoDB Encryption Client,
13+
which will continue to receive security updates for the next 12 months, in accordance
14+
with our `Support Policy <https://github.com/aws/aws-dynamodb-encryption-python/blob/master/SUPPORT_POLICY.rst>`__.
15+
16+
517
2.1.0 -- 2021-07-15
618
===================
719

Diff for: README.rst

+1-6
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,7 @@ Getting Started
4747
Required Prerequisites
4848
======================
4949

50-
* Python 2.7 or 3.4+
51-
52-
**NOTE: 2.x is the last major version of this library that will
53-
support Python 2. Future major versions will begin to adopt changes
54-
known to break Python 2. Python 3.4 support will also be removed
55-
in future major versions; Python 3.5+ will be required.**
50+
* Python 3.5+
5651

5752

5853
Installation

Diff for: SUPPORT_POLICY.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ This table describes the current support status of each major version of the AWS
2626
- End of Support
2727
- 2022-07-08
2828
* - 2.x
29-
- Generally Available
3029
- Maintenance
31-
- 2021-07-13
30+
- End of Support
31+
- 2022-07-15
3232
* - 3.x
33-
-
3433
- Generally Available
35-
- 2021-07-13
34+
-
35+
-
3636

3737
.. _AWS SDKs and Tools Maintenance Policy: https://docs.aws.amazon.com/sdkref/latest/guide/maint-policy.html#version-life-cycle

Diff for: buildspec.yml

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ version: 0.2
33
batch:
44
fast-fail: false
55
build-list:
6-
- identifier: python2_7
7-
buildspec: codebuild/python2.7.yml
86
- identifier: python3_5
97
buildspec: codebuild/python3.5.yml
108
- identifier: python3_6

Diff for: codebuild/python2.7.yml

-18
This file was deleted.

Diff for: requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
boto3>=1.4.4
22
cryptography>=1.8.1
33
attrs>=17.4.0
4-
enum34; python_version < '3.4'

Diff for: setup.py

-3
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ def get_requirements():
4747
"Natural Language :: English",
4848
"License :: OSI Approved :: Apache Software License",
4949
"Programming Language :: Python",
50-
"Programming Language :: Python :: 2",
51-
"Programming Language :: Python :: 2.7",
5250
"Programming Language :: Python :: 3",
53-
"Programming Language :: Python :: 3.4",
5451
"Programming Language :: Python :: 3.5",
5552
"Programming Language :: Python :: 3.6",
5653
"Programming Language :: Python :: 3.7",

Diff for: src/dynamodb_encryption_sdk/identifiers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from enum import Enum
1515

1616
__all__ = ("LOGGER_NAME", "CryptoAction", "EncryptionKeyType", "KeyEncodingType")
17-
__version__ = "2.1.0"
17+
__version__ = "3.0.0"
1818

1919
LOGGER_NAME = "dynamodb_encryption_sdk"
2020
USER_AGENT_SUFFIX = "DynamodbEncryptionSdkPython/{}".format(__version__)

Diff for: tox.ini

+1-30
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{27,35,36,37,38,39}-{local,integ,ddb,examples}-fast,
3+
py{35,36,37,38,39}-{local,integ,ddb,examples}-fast,
44
nocmk, sourcebuildcheck,
55
docs, bandit, doc8, readme,
66
flake8{,-tests,-examples}, pylint{,-tests,-examples},
@@ -117,15 +117,6 @@ recreate = True
117117
deps =
118118
commands = {toxinidir}/test/freeze-upstream-requirements.sh
119119

120-
# Freeze for Python 2.7
121-
[testenv:freeze-upstream-requirements-py27]
122-
basepython = python2.7
123-
sitepackages = {[testenv:freeze-upstream-requirements-base]sitepackages}
124-
skip_install = {[testenv:freeze-upstream-requirements-base]skip_install}
125-
recreate = {[testenv:freeze-upstream-requirements-base]recreate}
126-
deps = {[testenv:freeze-upstream-requirements-base]deps}
127-
commands = {[testenv:freeze-upstream-requirements-base]commands} test/upstream-requirements-py27.txt
128-
129120
# Freeze for Python 3.7
130121
[testenv:freeze-upstream-requirements-py37]
131122
basepython = python3.7
@@ -142,15 +133,6 @@ recreate = True
142133
passenv =
143134
commands = {[testenv:base-command]commands} -m "local and not slow and not veryslow and not nope" --ignore=examples
144135

145-
# Test frozen upstream requirements for Python 2.7
146-
[testenv:test-upstream-requirements-py27]
147-
basepython = python2.7
148-
passenv =
149-
deps = -rtest/upstream-requirements-py27.txt
150-
sitepackages = {[testenv:test-upstream-requirements-base]sitepackages}
151-
recreate = {[testenv:test-upstream-requirements-base]recreate}
152-
commands = {[testenv:test-upstream-requirements-base]commands}
153-
154136
# Test frozen upstream requirements for Python 3.7
155137
[testenv:test-upstream-requirements-py37]
156138
basepython = python3.7
@@ -201,17 +183,6 @@ commands =
201183
{posargs}
202184
{[testenv:mypy-coverage]commands}
203185

204-
[testenv:mypy-py2]
205-
basepython = python2.7
206-
deps = {[testenv:mypy-common]deps}
207-
commands =
208-
python -m mypy \
209-
--py2 \
210-
--linecoverage-report build \
211-
src/dynamodb_encryption_sdk/ \
212-
{posargs}
213-
{[testenv:mypy-coverage]commands}
214-
215186
# Linters
216187
[testenv:flake8]
217188
basepython = python3

0 commit comments

Comments
 (0)