Skip to content

Commit 1332086

Browse files
chore: Remove support for py2 (#355)
1 parent 2f4773f commit 1332086

File tree

12 files changed

+11
-140
lines changed

12 files changed

+11
-140
lines changed

.github/workflows/ci_tests.yaml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
- windows-latest
2929
- macos-latest
3030
python:
31-
- 2.7
3231
- 3.5
3332
- 3.6
3433
- 3.7
@@ -84,22 +83,3 @@ jobs:
8483
env:
8584
TOXENV: ${{ matrix.category }}
8685
run: tox -- -vv
87-
upstream-py2:
88-
runs-on: ubuntu-latest
89-
strategy:
90-
fail-fast: true
91-
matrix:
92-
category:
93-
- test-upstream-requirements-py27
94-
steps:
95-
- uses: actions/checkout@v2
96-
- uses: actions/setup-python@v1
97-
with:
98-
python-version: 2.7
99-
- run: |
100-
python -m pip install --upgrade pip
101-
pip install --upgrade -r ci-requirements.txt
102-
- name: run test
103-
env:
104-
TOXENV: ${{ matrix.category }}
105-
run: tox -- -vv

README.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ Getting Started
3434
Required Prerequisites
3535
======================
3636

37-
* Python 2.7+ or 3.4+
38-
39-
**NOTE: 2.x is the last major version of this library that will
40-
support Python 2. Future major versions will begin to adopt changes
41-
known to break Python 2. Python 3.4 support will also be removed
42-
in future major versions; Python 3.5+ will be required.**
37+
* Python 3.5+
4338
* cryptography >= 2.5.0
4439
* boto3 >= 1.10.0
4540
* attrs

buildspec.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ version: 0.2
33
batch:
44
fast-fail: false
55
build-list:
6-
- identifier: py27_integ
7-
buildspec: codebuild/py27/integ.yml
8-
- identifier: py27_examples
9-
buildspec: codebuild/py27/examples.yml
10-
- identifier: py27_awses_local
11-
buildspec: codebuild/py27/awses_local.yml
12-
136
- identifier: py35_integ
147
buildspec: codebuild/py35/integ.yml
158
- identifier: py35_examples

codebuild/py27/awses_local.yml

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

codebuild/py27/examples.yml

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

codebuild/py27/integ.yml

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

decrypt_oracle/setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ def get_requirements():
4646
"License :: OSI Approved :: Apache Software License",
4747
"Programming Language :: Python",
4848
"Programming Language :: Python :: 3.6",
49+
"Programming Language :: Python :: 3.7",
50+
"Programming Language :: Python :: 3.8",
51+
"Programming Language :: Python :: 3.9",
4952
"Programming Language :: Python :: Implementation :: CPython",
5053
"Topic :: Security",
5154
"Topic :: Security :: Cryptography",

decrypt_oracle/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{27,34,35,36,37}-{local,integ},
3+
py{35,36,37,38,39}-{local,integ},
44
bandit, doc8, readme, docs,
55
{flake8,pylint}{,-tests},
66
# prone to false positives

src/aws_encryption_sdk/internal/crypto/elliptic_curve.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from cryptography.hazmat.backends import default_backend
1919
from cryptography.hazmat.primitives.asymmetric import ec
2020
from cryptography.hazmat.primitives.asymmetric.utils import Prehashed, decode_dss_signature, encode_dss_signature
21-
from cryptography.utils import InterfaceNotImplemented, int_from_bytes, int_to_bytes, verify_interface
21+
from cryptography.utils import InterfaceNotImplemented, int_to_bytes, verify_interface
2222

2323
from ...exceptions import NotSupportedError
2424
from ..str_ops import to_bytes
@@ -123,8 +123,7 @@ def _ecc_decode_compressed_point(curve, compressed_point):
123123
y_order_map = {b"\x02": 0, b"\x03": 1}
124124
raw_x = compressed_point[1:]
125125
raw_x = to_bytes(raw_x)
126-
# pylint gives a false positive that int_from_bytes is not callable
127-
x = int_from_bytes(raw_x, "big") # pylint: disable=not-callable
126+
x = int.from_bytes(raw_x, "big")
128127
raw_y = compressed_point[0]
129128
# In Python3, bytes index calls return int values rather than strings
130129
if isinstance(raw_y, six.integer_types):

test_vector_handlers/setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,12 @@ def get_requirements():
4545
"Natural Language :: English",
4646
"License :: OSI Approved :: Apache Software License",
4747
"Programming Language :: Python",
48-
"Programming Language :: Python :: 2",
49-
"Programming Language :: Python :: 2.7",
5048
"Programming Language :: Python :: 3",
51-
"Programming Language :: Python :: 3.4",
5249
"Programming Language :: Python :: 3.5",
5350
"Programming Language :: Python :: 3.6",
5451
"Programming Language :: Python :: 3.7",
52+
"Programming Language :: Python :: 3.8",
53+
"Programming Language :: Python :: 3.9",
5554
"Programming Language :: Python :: Implementation :: CPython",
5655
"Topic :: Security",
5756
"Topic :: Security :: Cryptography",

0 commit comments

Comments
 (0)