Skip to content

Commit 3cd23c1

Browse files
hugovksybrenstuvel
authored andcommitted
Drop support for EOL Python 3.7
1 parent 390acdf commit 3cd23c1

File tree

7 files changed

+83
-152
lines changed

7 files changed

+83
-152
lines changed

Diff for: .github/workflows/tests.yml

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
strategy:
1212
matrix:
1313
python-version:
14-
- "3.7"
1514
- "3.8"
1615
- "3.9"
1716
- "pypy3.9"

Diff for: .travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ cache: pip
66
# See: https://github.com/travis-ci/travis-ci/issues/3024
77

88
python:
9-
- "3.7"
109
- "3.8"
1110
- "3.9"
1211
- "3.10"

Diff for: poetry.lock

+65-124
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ include = [
3333
]
3434

3535
[tool.poetry.dependencies]
36-
python = ">=3.7, <4"
36+
python = ">=3.8, <4"
3737
pyasn1 = ">=0.1.3"
3838

3939
[tool.poetry.dev-dependencies]

Diff for: rsa/pkcs1.py

+15-17
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,21 @@
6060
"""Hash methods supported by this library."""
6161

6262

63-
if sys.version_info >= (3, 6):
64-
# Python 3.6 introduced SHA3 support.
65-
HASH_ASN1.update(
66-
{
67-
"SHA3-256": b"\x30\x31\x30\x0d\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x08\x05\x00\x04\x20",
68-
"SHA3-384": b"\x30\x41\x30\x0d\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x09\x05\x00\x04\x30",
69-
"SHA3-512": b"\x30\x51\x30\x0d\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x0a\x05\x00\x04\x40",
70-
}
71-
)
72-
73-
HASH_METHODS.update(
74-
{
75-
"SHA3-256": hashlib.sha3_256,
76-
"SHA3-384": hashlib.sha3_384,
77-
"SHA3-512": hashlib.sha3_512,
78-
}
79-
)
63+
HASH_ASN1.update(
64+
{
65+
"SHA3-256": b"\x30\x31\x30\x0d\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x08\x05\x00\x04\x20",
66+
"SHA3-384": b"\x30\x41\x30\x0d\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x09\x05\x00\x04\x30",
67+
"SHA3-512": b"\x30\x51\x30\x0d\x06\x09\x60\x86\x48\x01\x65\x03\x04\x02\x0a\x05\x00\x04\x40",
68+
}
69+
)
70+
71+
HASH_METHODS.update(
72+
{
73+
"SHA3-256": hashlib.sha3_256,
74+
"SHA3-384": hashlib.sha3_384,
75+
"SHA3-512": hashlib.sha3_512,
76+
}
77+
)
8078

8179

8280
class CryptoError(Exception):

Diff for: setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ max-complexity = 10
99
max-line-length = 100
1010

1111
[mypy]
12-
python_version = 3.7
12+
python_version = 3.8
1313
warn_unused_ignores = True
1414
ignore_missing_imports = True
1515
follow_imports = skip

Diff for: tox.ini

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
# Environment changes have to be manually synced with '.travis.yml'.
3-
envlist = py{37,38,39,310,311,312}
3+
envlist = py{38,39,310,311,312}
44
isolated_build = True
55

66
[pytest]
@@ -11,9 +11,3 @@ deps = poetry
1111
commands =
1212
poetry install
1313
poetry run pytest tests/
14-
15-
[testenv:py37]
16-
whitelist_externals = poetry
17-
commands=
18-
poetry install
19-
poetry run pytest --doctest-modules rsa tests/

0 commit comments

Comments
 (0)