From 11b0814241c2f520580a4dc643c31541ea75e204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20G=C3=BCnther?= Date: Thu, 15 Oct 2020 15:42:52 +0200 Subject: [PATCH] Remove unsupported Python versions There's really no need to support Python versions before Python 3. Also, Python 3.6 included a number of important features, e.g. improved type hints, ordered `dict`s and `dataclasses` via a backport. So not supporting 3.5 and earlier versions makes sense, too. Last but not least, I think it makes sense to only support CPython for now and worry about other implementations later. Adding and removing these versions is as easy as adding/removing them from "setup.cfg" and running `tox -e bootstrap` which should update ".travis.yml", ".appveyor.yml" and "tox.ini". The only thing which one might have to manually update is the metadata in "setup.py". --- .appveyor.yml | 46 ------------------------------------ .travis.yml | 36 ----------------------------- setup.cfg | 4 ---- setup.py | 4 +--- tox.ini | 64 --------------------------------------------------- 5 files changed, 1 insertion(+), 153 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 7d95c8ac8..181060c38 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,52 +10,6 @@ environment: PYTHON_HOME: C:\Python36 PYTHON_VERSION: '3.6' PYTHON_ARCH: '32' - - TOXENV: py27-cover,codecov,coveralls - TOXPYTHON: C:\Python27\python.exe - PYTHON_HOME: C:\Python27 - PYTHON_VERSION: '2.7' - PYTHON_ARCH: '32' - - TOXENV: py27-cover,codecov,coveralls - TOXPYTHON: C:\Python27-x64\python.exe - PYTHON_HOME: C:\Python27-x64 - PYTHON_VERSION: '2.7' - PYTHON_ARCH: '64' - WINDOWS_SDK_VERSION: v7.0 - - TOXENV: py27-nocov - TOXPYTHON: C:\Python27\python.exe - PYTHON_HOME: C:\Python27 - PYTHON_VERSION: '2.7' - PYTHON_ARCH: '32' - WHEEL_PATH: .tox/dist - - TOXENV: py27-nocov - TOXPYTHON: C:\Python27-x64\python.exe - PYTHON_HOME: C:\Python27-x64 - PYTHON_VERSION: '2.7' - PYTHON_ARCH: '64' - WHEEL_PATH: .tox/dist - WINDOWS_SDK_VERSION: v7.0 - - TOXENV: py35-cover,codecov,coveralls - TOXPYTHON: C:\Python35\python.exe - PYTHON_HOME: C:\Python35 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '32' - - TOXENV: py35-cover,codecov,coveralls - TOXPYTHON: C:\Python35-x64\python.exe - PYTHON_HOME: C:\Python35-x64 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '64' - - TOXENV: py35-nocov - TOXPYTHON: C:\Python35\python.exe - PYTHON_HOME: C:\Python35 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '32' - WHEEL_PATH: .tox/dist - - TOXENV: py35-nocov - TOXPYTHON: C:\Python35-x64\python.exe - PYTHON_HOME: C:\Python35-x64 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '64' - WHEEL_PATH: .tox/dist - TOXENV: py36-cover,codecov,coveralls TOXPYTHON: C:\Python36\python.exe PYTHON_HOME: C:\Python36 diff --git a/.travis.yml b/.travis.yml index c2cf9598c..293138af6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,28 +14,6 @@ matrix: - python: '3.6' env: - TOXENV=docs - - os: osx - osx_image: xcode11 - language: generic - env: - - TOXENV=py27-cover - - env: - - TOXENV=py27-cover,codecov,coveralls - python: '2.7' - - os: osx - osx_image: xcode11 - language: generic - env: - - TOXENV=py27-nocov - - env: - - TOXENV=py27-nocov - python: '2.7' - - env: - - TOXENV=py35-cover,codecov,coveralls - python: '3.5' - - env: - - TOXENV=py35-nocov - python: '3.5' - env: - TOXENV=py36-cover,codecov,coveralls python: '3.6' @@ -64,20 +42,6 @@ matrix: - env: - TOXENV=py38-nocov python: '3.8' - - env: - - TOXENV=pypy-cover,codecov,coveralls - python: 'pypy' - - env: - - TOXENV=pypy-nocov - python: 'pypy' - - env: - - TOXENV=pypy3-cover,codecov,coveralls - - TOXPYTHON=pypy3 - python: 'pypy3' - - env: - - TOXENV=pypy3-nocov - - TOXPYTHON=pypy3 - python: 'pypy3' before_install: - python --version - uname -a diff --git a/setup.cfg b/setup.cfg index 0de0b5ee3..a9a640059 100644 --- a/setup.cfg +++ b/setup.cfg @@ -82,13 +82,9 @@ skip = .tox,.eggs,ci/templates,build,dist # - can use as many you want python_versions = - py27 - py35 py36 py37 py38 - pypy - pypy3 dependencies = # 1.4: Django==1.4.16 !python_versions[py3*] diff --git a/setup.py b/setup.py index 7f721891f..3b857ef16 100755 --- a/setup.py +++ b/setup.py @@ -63,15 +63,13 @@ def read(*names, **kwargs): "Operating System :: POSIX", "Operating System :: Microsoft :: Windows", "Programming Language :: Python", - "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", # uncomment if you test on these interpreters: + # "Programming Language :: Python :: Implementation :: PyPy", # "Programming Language :: Python :: Implementation :: IronPython", # "Programming Language :: Python :: Implementation :: Jython", # "Programming Language :: Python :: Implementation :: Stackless", diff --git a/tox.ini b/tox.ini index 2d86fc905..f67ed170a 100644 --- a/tox.ini +++ b/tox.ini @@ -3,20 +3,12 @@ envlist = clean, check, docs, - py27-cover, - py27-nocov, - py35-cover, - py35-nocov, py36-cover, py36-nocov, py37-cover, py37-nocov, py38-cover, py38-nocov, - pypy-cover, - pypy-nocov, - pypy3-cover, - pypy3-nocov, report [testenv] @@ -93,34 +85,6 @@ commands = coverage erase skip_install = true deps = coverage -[testenv:py27-cover] -basepython = {env:TOXPYTHON:python2.7} -setenv = - {[testenv]setenv} -usedevelop = true -commands = - {posargs:pytest --cov --cov-report=term-missing -vv} -deps = - {[testenv]deps} - pytest-cov - -[testenv:py27-nocov] -basepython = {env:TOXPYTHON:python2.7} - -[testenv:py35-cover] -basepython = {env:TOXPYTHON:python3.5} -setenv = - {[testenv]setenv} -usedevelop = true -commands = - {posargs:pytest --cov --cov-report=term-missing -vv} -deps = - {[testenv]deps} - pytest-cov - -[testenv:py35-nocov] -basepython = {env:TOXPYTHON:python3.5} - [testenv:py36-cover] basepython = {env:TOXPYTHON:python3.6} setenv = @@ -162,31 +126,3 @@ deps = [testenv:py38-nocov] basepython = {env:TOXPYTHON:python3.8} - -[testenv:pypy-cover] -basepython = {env:TOXPYTHON:pypy} -setenv = - {[testenv]setenv} -usedevelop = true -commands = - {posargs:pytest --cov --cov-report=term-missing -vv} -deps = - {[testenv]deps} - pytest-cov - -[testenv:pypy-nocov] -basepython = {env:TOXPYTHON:pypy} - -[testenv:pypy3-cover] -basepython = {env:TOXPYTHON:pypy3} -setenv = - {[testenv]setenv} -usedevelop = true -commands = - {posargs:pytest --cov --cov-report=term-missing -vv} -deps = - {[testenv]deps} - pytest-cov - -[testenv:pypy3-nocov] -basepython = {env:TOXPYTHON:pypy3}