Skip to content

Commit e37769e

Browse files
committed
Drop support for Python 3.7
* Python 3.7 is EOL. * Our runtime dependencies are still ok with 3.7 * Testing dependencies have started requiring 3.8 Stop supporting and testing Python 3.7. We could just stop testing Python 3.7 (while claiming to still support it) but that seems like it'll lead to trouble: we will inevitably use some 3.8 feature and then won't notice because we don't test 3.7 any more. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
1 parent b84434a commit e37769e

4 files changed

Lines changed: 5 additions & 8 deletions

File tree

.github/workflows/_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
# (sslib main) on Linux/Python3.x only.
3838
matrix:
3939
toxenv: [py]
40-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
40+
python-version: ["3.8", "3.9", "3.10", "3.11"]
4141
os: [ubuntu-latest, macos-latest, windows-latest]
4242
include:
4343
- python-version: 3.x

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name = "tuf"
88
description = "A secure updater framework for Python"
99
readme = "README.md"
1010
license = { text = "MIT OR Apache-2.0" }
11-
requires-python = ">=3.7"
11+
requires-python = ">=3.8"
1212
authors = [
1313
{ email = "theupdateframework@googlegroups.com" },
1414
]
@@ -33,7 +33,6 @@ classifiers = [
3333
"Operating System :: POSIX :: Linux",
3434
"Programming Language :: Python",
3535
"Programming Language :: Python :: 3",
36-
"Programming Language :: Python :: 3.7",
3736
"Programming Language :: Python :: 3.8",
3837
"Programming Language :: Python :: 3.9",
3938
"Programming Language :: Python :: 3.10",

requirements/main.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# 1. Use this script to create a pinned requirements file for each Python
2727
# version
2828
# ```
29-
# for v in 3.7 3.8 3.9 3.10 3.11; do
29+
# for v in 3.8 3.9 3.10 3.11; do
3030
# mkvirtualenv tuf-env-${v} -p python${v};
3131
# python3 -m pip install pip-tools;
3232
# pip-compile --no-header -o requirements-${v}.txt main.txt;

tests/test_metadata_eq_.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ def test_md_eq_signatures_reversed_order(self) -> None:
113113
md.signatures = {"a": Signature("a", "a"), "b": Signature("b", "b")}
114114
md_2 = copy.deepcopy(md)
115115
# Reverse signatures order in md_2.
116-
# In python3.7 we need to cast to a list and then reverse.
117-
md_2.signatures = dict(reversed(list(md_2.signatures.items())))
116+
md_2.signatures = dict(reversed(md_2.signatures.items()))
118117
# Assert that both objects are not the same because of signatures order.
119118
self.assertNotEqual(md, md_2)
120119

@@ -168,9 +167,8 @@ def test_delegations_eq_roles_reversed_order(self) -> None:
168167

169168
# Create a second delegations obj with reversed roles order
170169
delegations_2 = copy.deepcopy(delegations)
171-
# In python3.7 we need to cast to a list and then reverse.
172170
assert isinstance(delegations.roles, dict)
173-
delegations_2.roles = dict(reversed(list(delegations.roles.items())))
171+
delegations_2.roles = dict(reversed(delegations.roles.items()))
174172

175173
# Both objects are not the equal because of delegated roles order.
176174
self.assertNotEqual(delegations, delegations_2)

0 commit comments

Comments
 (0)