Просмотр исходного кода

Drop support for Python 3.5. Only support black code formatter on Python 3.8+.

Dan Helfman 4 лет назад
Родитель
Сommit
1f4f28b4dc
6 измененных файлов с 30 добавлено и 70 удалено
  1. 9 53
      .drone.yml
  2. 3 0
      NEWS
  3. 6 5
      scripts/run-full-tests
  4. 8 8
      test_requirements.txt
  5. 2 2
      tests/end-to-end/docker-compose.yaml
  6. 2 2
      tox.ini

+ 9 - 53
.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
-    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
+    image: mariadb:10.5
     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

+ 3 - 0
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.

+ 6 - 5
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

+ 8 - 8
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'

+ 2 - 2
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:

+ 2 - 2
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