From bb16ca9baa1af77c31cad5660586a7be6362043c Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Tue, 2 Mar 2021 12:22:38 +0000 Subject: [PATCH] Update supported Python versions Remove references to, and handling of, Python 2.7 in our project scaffolding: - updated python_requires in setup.py to state our intent to support Python 3.6 and above (but not Python 4, yet) - Drop no longer required dependencies in setup.py, and requirements-*.txt (further refinement of requirements files will be handled in #1161) - Remove Python 2.7 from our tox environments Signed-off-by: Joshua Lock --- requirements-pinned.txt | 6 +----- requirements-test.txt | 5 +---- setup.py | 7 +------ tox.ini | 2 +- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/requirements-pinned.txt b/requirements-pinned.txt index 72fbd1230c..222fccf6f2 100644 --- a/requirements-pinned.txt +++ b/requirements-pinned.txt @@ -1,15 +1,11 @@ certifi==2020.12.5 # via requests cffi==1.14.5 # via cryptography, pynacl chardet==4.0.0 # via requests -cryptography==3.4.6 ; python_version >= '3' # via securesystemslib -cryptography==3.3.2 ; python_version < '3' # via securesystemslib -enum34==1.1.10 ; python_version < '3' # via cryptography +cryptography==3.4.6 # via securesystemslib idna==2.10 # via requests -ipaddress==1.0.23 ; python_version < '3' # via cryptography pycparser==2.20 # via cffi pynacl==1.4.0 # via securesystemslib requests==2.25.1 securesystemslib[crypto,pynacl]==0.19.0 six==1.15.0 -subprocess32==3.5.4 ; python_version < '3' # via securesystemslib urllib3==1.26.3 # via requests diff --git a/requirements-test.txt b/requirements-test.txt index fc83f41a6e..80a7b09904 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -3,13 +3,10 @@ # pinned tuf runtime dependencies (should auto-update and -trigger ci/cd) -r requirements-pinned.txt -# test runtime dependencies (see 'tests_require' field in setup.py) -mock; python_version < "3.3" - # tuf.api tests use python-dateutil python-dateutil # additional test tools for linting and coverage measurement coverage pylint -bandit; python_version >= "3.5" +bandit diff --git a/setup.py b/setup.py index 7cfb24cc19..c65a794645 100755 --- a/setup.py +++ b/setup.py @@ -97,8 +97,6 @@ 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', @@ -112,15 +110,12 @@ 'Source': 'https://github.com/theupdateframework/tuf', 'Issues': 'https://github.com/theupdateframework/tuf/issues' }, - python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4", + python_requires="~=3.6", install_requires = [ 'requests>=2.19.1', 'six>=1.11.0', 'securesystemslib>=0.18.0' ], - tests_require = [ - 'mock; python_version < "3.3"' - ], packages = find_packages(exclude=['tests']), scripts = [ 'tuf/scripts/repo.py', diff --git a/tox.ini b/tox.ini index acf804419d..9ab6dee135 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = lint,py{27,36,37,38,39} +envlist = lint,py{36,37,38,39} skipsdist = true [testenv]