Skip to content

Commit 65aca1f

Browse files
authored
Merge pull request #216 from asherf/compat
Remove python 2.7 & 3.5 from test matrix. remove pycrypto backend
2 parents 8572088 + 2152ccc commit 65aca1f

16 files changed

+29
-699
lines changed

.travis.yml

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -14,39 +14,15 @@ jobs:
1414
matrix:
1515
include:
1616
# Linting
17-
- python: 3.6
17+
- python: 3.9
1818
env: TOXENV=flake8
19-
# CPython 2.7
20-
- python: 2.7
21-
env: TOXENV=py27-base
22-
- python: 2.7
23-
env: TOXENV=py27-cryptography-only
24-
- python: 2.7
25-
env: TOXENV=py27-pycryptodome-norsa
26-
- python: 2.7
27-
env: TOXENV=py27-pycrypto-norsa
28-
- python: 2.7
29-
env: TOXENV=py27-compatibility
30-
# CPython 3.5
31-
- python: 3.5
32-
env: TOXENV=py35-base
33-
- python: 3.5
34-
env: TOXENV=py35-cryptography-only
35-
- python: 3.5
36-
env: TOXENV=py35-pycryptodome-norsa
37-
- python: 3.5
38-
env: TOXENV=py35-pycrypto-norsa
39-
- python: 3.5
40-
env: TOXENV=py35-compatibility
4119
# CPython 3.6
4220
- python: 3.6
4321
env: TOXENV=py36-base
4422
- python: 3.6
4523
env: TOXENV=py36-cryptography-only
4624
- python: 3.6
4725
env: TOXENV=py36-pycryptodome-norsa
48-
- python: 3.6
49-
env: TOXENV=py36-pycrypto-norsa
5026
- python: 3.6
5127
env: TOXENV=py36-compatibility
5228
# CPython 3.7
@@ -56,8 +32,6 @@ matrix:
5632
env: TOXENV=py37-cryptography-only
5733
- python: 3.7
5834
env: TOXENV=py37-pycryptodome-norsa
59-
- python: 3.7
60-
env: TOXENV=py37-pycrypto-norsa
6135
- python: 3.7
6236
env: TOXENV=py37-compatibility
6337
# CPython 3.8
@@ -67,8 +41,6 @@ matrix:
6741
env: TOXENV=py38-cryptography-only
6842
- python: 3.8
6943
env: TOXENV=py38-pycryptodome-norsa
70-
- python: 3.8
71-
env: TOXENV=py38-pycrypto-norsa
7244
- python: 3.8
7345
env: TOXENV=py38-compatibility
7446
# CPython 3.9 - dev
@@ -78,29 +50,14 @@ matrix:
7850
env: TOXENV=py39-cryptography-only
7951
- python: 3.9-dev
8052
env: TOXENV=py39-pycryptodome-norsa
81-
- python: 3.9-dev
82-
env: TOXENV=py39-pycrypto-norsa
8353
- python: 3.9-dev
8454
env: TOXENV=py39-compatibility
85-
# PyPy 2.7
86-
- python: pypy2
87-
env: TOXENV=pypy-base
88-
- python: pypy2
89-
env: TOXENV=pypy-cryptography-only
90-
- python: pypy2
91-
env: TOXENV=pypy-pycryptodome-norsa
92-
- python: pypy2
93-
env: TOXENV=pypy-pycrypto-norsa
94-
- python: pypy2
95-
env: TOXENV=pypy-compatibility
9655
# PyPy 3.x
9756
- python: pypy3
9857
env: TOXENV=pypy-base
9958
- python: pypy3
10059
env: TOXENV=pypy3-cryptography-only
10160
- python: pypy3
10261
env: TOXENV=pypy3-pycryptodome-norsa
103-
- python: pypy3
104-
env: TOXENV=pypy3-pycrypto-norsa
10562
- python: pypy3
10663
env: TOXENV=pypy3-compatibility

jose/backends/__init__.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,9 @@
1010
from jose.backends.cryptography_backend import CryptographyRSAKey as RSAKey # noqa: F401
1111
except ImportError:
1212
try:
13-
from jose.backends.pycrypto_backend import RSAKey # noqa: F401
14-
15-
# time.clock was deprecated in python 3.3 in favor of time.perf_counter
16-
# and removed in python 3.8. pycrypto was never updated for this. If
17-
# time has no clock attribute, let it use perf_counter instead to work
18-
# in 3.8+
19-
# noinspection PyUnresolvedReferences
20-
import time
21-
if not hasattr(time, "clock"):
22-
time.clock = time.perf_counter
23-
24-
except ImportError:
2513
from jose.backends.rsa_backend import RSAKey # noqa: F401
14+
except ImportError:
15+
RSAKey = None
2616

2717
try:
2818
from jose.backends.cryptography_backend import CryptographyECKey as ECKey # noqa: F401
@@ -32,10 +22,7 @@
3222
try:
3323
from jose.backends.cryptography_backend import CryptographyAESKey as AESKey # noqa: F401
3424
except ImportError:
35-
try:
36-
from jose.backends.pycrypto_backend import AESKey # noqa: F401
37-
except ImportError:
38-
AESKey = None
25+
AESKey = None
3926

4027
try:
4128
from jose.backends.cryptography_backend import CryptographyHMACKey as HMACKey # noqa: F401

jose/backends/_asn1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""ASN1 encoding helpers for converting between PKCS1 and PKCS8.
22
3-
Required by rsa_backend and pycrypto_backend but not cryptography_backend.
3+
Required by rsa_backend but not cryptography_backend.
44
"""
55
from pyasn1.codec.der import decoder, encoder
66
from pyasn1.type import namedtype, univ

0 commit comments

Comments
 (0)