From 1f4f28b4dc0f1ba85cd326b3de5f3bafec1e0be3 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sun, 22 Nov 2020 17:27:21 -0800 Subject: [PATCH] Drop support for Python 3.5. Only support black code formatter on Python 3.8+. --- .drone.yml | 62 ++++------------------------ NEWS | 3 ++ scripts/run-full-tests | 11 ++--- test_requirements.txt | 16 +++---- tests/end-to-end/docker-compose.yaml | 4 +- tox.ini | 4 +- 6 files changed, 30 insertions(+), 70 deletions(-) diff --git a/.drone.yml b/.drone.yml index 89987e3..1ee490c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,10 +1,10 @@ --- kind: pipeline -name: python-3-5-alpine-3-10 +name: python-3-6-alpine-3-9 services: - name: postgresql - image: postgres:11.6-alpine + image: postgres:11.9-alpine environment: POSTGRES_PASSWORD: test POSTGRES_DB: test @@ -16,29 +16,7 @@ services: steps: - name: build - image: python:3.5-alpine3.10 - pull: always - commands: - - scripts/run-full-tests ---- -kind: pipeline -name: python-3-6-alpine-3-10 - -services: - - name: postgresql - image: postgres:11.6-alpine - environment: - POSTGRES_PASSWORD: test - POSTGRES_DB: test - - name: mysql - image: mariadb:10.3 - environment: - MYSQL_ROOT_PASSWORD: test - MYSQL_DATABASE: test - -steps: -- name: build - image: python:3.6-alpine3.10 + image: alpine:3.9 pull: always commands: - scripts/run-full-tests @@ -48,7 +26,7 @@ name: python-3-7-alpine-3-10 services: - name: postgresql - image: postgres:11.6-alpine + image: postgres:11.9-alpine environment: POSTGRES_PASSWORD: test POSTGRES_DB: test @@ -60,51 +38,29 @@ services: steps: - name: build - image: python:3.7-alpine3.10 + image: alpine:3.10 pull: always commands: - scripts/run-full-tests --- kind: pipeline -name: python-3-7-alpine-3-7 +name: python-3-8-alpine-edge services: - name: postgresql - image: postgres:10.11-alpine + image: postgres:12.5-alpine environment: POSTGRES_PASSWORD: test POSTGRES_DB: test - name: mysql - image: mariadb:10.1 + image: mariadb:10.5 environment: MYSQL_ROOT_PASSWORD: test MYSQL_DATABASE: test steps: - name: build - image: python:3.7-alpine3.7 - pull: always - commands: - - scripts/run-full-tests ---- -kind: pipeline -name: python-3-8-alpine-3-10 - -services: - - name: postgresql - image: postgres:11.6-alpine - environment: - POSTGRES_PASSWORD: test - POSTGRES_DB: test - - name: mysql - image: mariadb:10.3 - environment: - MYSQL_ROOT_PASSWORD: test - MYSQL_DATABASE: test - -steps: -- name: build - image: python:3.8-alpine3.10 + image: alpine:edge pull: always commands: - scripts/run-full-tests diff --git a/NEWS b/NEWS index 6f2227b..7ea3a75 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ 1.5.13.dev0 + * Drop support for Python 3.5, which has been end-of-lifed. * Update versions of test dependencies (test_requirements.txt and test containers). + * Only support black code formatter on Python 3.8+. New black dependencies make installation + difficult on older versions of Python. 1.5.12 * Fix for previous release with incorrect version suffix in setup.py. No other changes. diff --git a/scripts/run-full-tests b/scripts/run-full-tests index 0f374cf..d13ca0d 100755 --- a/scripts/run-full-tests +++ b/scripts/run-full-tests @@ -10,9 +10,10 @@ set -e -python -m pip install --upgrade pip==20.2.4 -pip install tox==3.20.1 +apk add --no-cache python3 borgbackup postgresql-client mariadb-client +apk add --no-cache black || true # If black is available in this version of Alpine, install it. +python3 -m pip install --upgrade pip==20.2.4 setuptools==50.3.2 +pip3 install tox==3.20.1 export COVERAGE_FILE=/tmp/.coverage -apk add --no-cache borgbackup postgresql-client mariadb-client py3-typed-ast -tox --workdir /tmp/.tox -tox --workdir /tmp/.tox -e end-to-end +tox --workdir /tmp/.tox --sitepackages +tox --workdir /tmp/.tox --sitepackages -e end-to-end diff --git a/test_requirements.txt b/test_requirements.txt index 0a69060..e2dc3d4 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,8 +1,8 @@ -appdirs==1.4.4 +appdirs==1.4.4; python_version >= '3.8' atomicwrites==1.4.0 -attrs==20.3.0 -black==19.10b0; python_version >= '3.6' -click==7.1.2 +attrs==20.3.0; python_version >= '3.8' +black==19.10b0; python_version >= '3.8' +click==7.1.2; python_version >= '3.8' colorama==0.4.4 coverage==5.3 docopt==0.6.2 @@ -12,7 +12,7 @@ isort==5.6.4 mccabe==0.6.1 more-itertools==8.6.0 pluggy==0.13.1 -pathspec==0.8.1 +pathspec==0.8.1; python_version >= '3.8' py==1.9.0 pycodestyle==2.6.0 pyflakes==2.2.0 @@ -21,8 +21,8 @@ pytest==6.1.2 pytest-cov==2.10.1 python-dateutil==2.8.1 PyYAML==5.3.1 -regex==2020.11.13 +regex; python_version >= '3.8' requests==2.25.0 ruamel.yaml>0.15.0,<0.17.0 -toml==0.10.2 -typed-ast==1.4.1 +toml==0.10.2; python_version >= '3.8' +typed-ast==1.4.1; python_version >= '3.8' diff --git a/tests/end-to-end/docker-compose.yaml b/tests/end-to-end/docker-compose.yaml index 65d4a22..70006f3 100644 --- a/tests/end-to-end/docker-compose.yaml +++ b/tests/end-to-end/docker-compose.yaml @@ -1,7 +1,7 @@ version: '3' services: postgresql: - image: postgres:13.1-alpine + image: postgres:12.5-alpine environment: POSTGRES_PASSWORD: test POSTGRES_DB: test @@ -11,7 +11,7 @@ services: MYSQL_ROOT_PASSWORD: test MYSQL_DATABASE: test tests: - image: python:3.8-alpine3.12 + image: alpine:edge volumes: - "../..:/app:ro" tmpfs: diff --git a/tox.ini b/tox.ini index 1d177b8..b533b8a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py35,py36,py37,py38 +envlist = py36,py37,py38 skip_missing_interpreters = True skipsdist = True minversion = 3.14.1 @@ -13,7 +13,7 @@ whitelist_externals = passenv = COVERAGE_FILE commands = pytest {posargs} - py36,py37,py38: black --check . + py38: black --check . isort --check-only --settings-path setup.cfg . flake8 borgmatic tests