Skip to content

Commit 2019002

Browse files
authored
chore: Remove deprecated Python versions from CI (#447)
1 parent 69ee2fd commit 2019002

20 files changed

+87
-272
lines changed

.github/workflows/ci_tests.yaml

Lines changed: 0 additions & 61 deletions
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@v2
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:
@@ -65,8 +25,6 @@ jobs:
6525
- os: macos-latest
6626
architecture: x64
6727
python:
68-
- 3.5
69-
- 3.6
7028
- 3.7
7129
- 3.8
7230
- 3.9
@@ -111,22 +69,3 @@ jobs:
11169
env:
11270
TOXENV: ${{ matrix.category }}
11371
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

buildspec.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ version: 0.2
33
batch:
44
fast-fail: false
55
build-list:
6-
- identifier: python2_7
7-
buildspec: codebuild/python2.7.yml
8-
- identifier: python3_5
9-
buildspec: codebuild/python3.5.yml
10-
- identifier: python3_6
11-
buildspec: codebuild/python3.6.yml
126
- identifier: python3_7
137
buildspec: codebuild/python3.7.yml
148
- identifier: python3_8

codebuild/python2.7.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

codebuild/python3.5.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

codebuild/python3.6.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
bandit==1.7.0
2-
black==21.12b0
1+
bandit==1.7.2
2+
black==22.3.0
33
doc8==0.10.1
44
flake8==4.0.1
5-
flake8-bugbear==21.11.29
65
flake8-docstrings==1.6.0
76
flake8-isort==4.1.1
7+
# https://github.com/JBKahn/flake8-print/pull/30
88
flake8-print==4.0.0
99
isort==5.10.1
10-
pydocstyle==3.0.0
11-
pyflakes==2.4.0
1210
pylint==2.12.2
13-
readme_renderer==32.0
11+
pyflakes==2.4.0
12+
# https://github.com/PyCQA/pydocstyle/issues/375
13+
pydocstyle==3.0.0
14+
readme_renderer==34.0
1415
seed-isort-config==2.2.0
1516
vulture==2.3
16-
sphinx==4.4.0

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def get_version():
2929
return _release
3030

3131

32-
project = u"dynamodb-encryption-sdk-python" # pylint: disable=redundant-u-string-prefix
32+
project = "dynamodb-encryption-sdk-python"
3333
version = get_version()
3434
release = get_release()
3535

@@ -53,7 +53,7 @@ def get_version():
5353
source_suffix = ".rst" # The suffix of source filenames.
5454
master_doc = "index" # The master toctree document.
5555

56-
copyright = u"%s, Amazon" % datetime.now().year # pylint: disable=redefined-builtin,redundant-u-string-prefix
56+
copyright = "%s, Amazon" % datetime.now().year # pylint: disable=redefined-builtin
5757

5858
# List of directories, relative to source directory, that shouldn't be searched
5959
# for source files.

examples/src/pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
disable =
44
duplicate-code, # these examples often feature similar code
55
too-many-locals, # for these examples, we prioritize keeping everything together for simple readability
6+
consider-using-f-string, # Not supported in Python 3.5
67

78
[BASIC]
89
# Allow function names up to 50 characters

examples/test/examples_test_utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@
55
os.environ["AWS_ENCRYPTION_SDK_EXAMPLES_TESTING"] = "yes"
66
sys.path.extend([os.sep.join([os.path.dirname(__file__), "..", "..", "test", "integration"])])
77

8-
from integration_test_utils import cmk_arn, cmk_mrk_arn, ddb_table_name, second_cmk_mrk_arn # noqa pylint: disable=unused-import
8+
from integration_test_utils import ( # noqa pylint: disable=unused-import
9+
cmk_arn,
10+
cmk_mrk_arn,
11+
ddb_table_name,
12+
second_cmk_mrk_arn,
13+
)

examples/test/test_aws_kms_encrypted_examples.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@
2020
aws_kms_multi_region_key,
2121
)
2222

23-
from .examples_test_utils import cmk_arn, cmk_mrk_arn, ddb_table_name, second_cmk_mrk_arn # noqa pylint: disable=unused-import
23+
from .examples_test_utils import ( # noqa pylint: disable=unused-import
24+
cmk_arn,
25+
cmk_mrk_arn,
26+
ddb_table_name,
27+
second_cmk_mrk_arn,
28+
)
2429

2530
pytestmark = [pytest.mark.examples]
2631

0 commit comments

Comments
 (0)