From 74558f86e9a153924d6a26792661f23d25e49169 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 7 Oct 2021 09:52:57 +0200 Subject: [PATCH] feat: add python3.10 support (#184) --- .drone.jsonnet | 20 +++++++++++--------- .drone.yml | 37 ++++++++++++++++++++++++++----------- pyproject.toml | 1 + 3 files changed, 38 insertions(+), 20 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index b852db9..0ff35a5 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -27,7 +27,7 @@ local PipelineLint = { steps: [ { name: 'yapf', - image: 'python:3.9', + image: 'python:3.10', environment: { PY_COLORS: 1, }, @@ -41,7 +41,7 @@ local PipelineLint = { }, { name: 'flake8', - image: 'python:3.9', + image: 'python:3.10', environment: { PY_COLORS: 1, }, @@ -69,7 +69,7 @@ local PipelineTest = { steps: [ { name: 'fetch', - image: 'python:3.9', + image: 'python:3.10', commands: [ 'git fetch -tq', ], @@ -77,9 +77,10 @@ local PipelineTest = { PythonVersion(pyversion='3.7'), PythonVersion(pyversion='3.8'), PythonVersion(pyversion='3.9'), + PythonVersion(pyversion='3.10'), { name: 'codecov', - image: 'python:3.9', + image: 'python:3.10', environment: { PY_COLORS: 1, CODECOV_TOKEN: { from_secret: 'codecov_token' }, @@ -92,6 +93,7 @@ local PipelineTest = { 'python37-pytest', 'python38-pytest', 'python39-pytest', + 'python310-pytest', ], }, ], @@ -113,7 +115,7 @@ local PipelineSecurity = { steps: [ { name: 'bandit', - image: 'python:3.9', + image: 'python:3.10', environment: { PY_COLORS: 1, }, @@ -144,7 +146,7 @@ local PipelineBuildPackage = { steps: [ { name: 'build', - image: 'python:3.9', + image: 'python:3.10', commands: [ 'git fetch -tq', 'pip install poetry poetry-dynamic-versioning -qq', @@ -190,7 +192,7 @@ local PipelineBuildPackage = { }, { name: 'publish-pypi', - image: 'python:3.9', + image: 'python:3.10', commands: [ 'git fetch -tq', 'pip install poetry poetry-dynamic-versioning -qq', @@ -216,7 +218,7 @@ local PipelineBuildPackage = { local PipelineBuildContainer(arch='amd64') = { local build = if arch == 'arm' then [{ name: 'build', - image: 'python:3.9-alpine', + image: 'python:3.10-alpine', commands: [ 'apk add -Uq --no-cache build-base openssl-dev libffi-dev musl-dev python3-dev git cargo', 'git fetch -tq', @@ -228,7 +230,7 @@ local PipelineBuildContainer(arch='amd64') = { }, }] else [{ name: 'build', - image: 'python:3.9', + image: 'python:3.10', commands: [ 'git fetch -tq', 'pip install poetry poetry-dynamic-versioning -qq', diff --git a/.drone.yml b/.drone.yml index c55cd5d..30d285e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,7 +8,7 @@ platform: steps: - name: yapf - image: python:3.9 + image: python:3.10 commands: - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq @@ -19,7 +19,7 @@ steps: PY_COLORS: 1 - name: flake8 - image: python:3.9 + image: python:3.10 commands: - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq @@ -45,7 +45,7 @@ platform: steps: - name: fetch - image: python:3.9 + image: python:3.10 commands: - git fetch -tq @@ -91,8 +91,22 @@ steps: depends_on: - fetch + - name: python310-pytest + image: python:3.10 + commands: + - pip install poetry poetry-dynamic-versioning -qq + - poetry config experimental.new-installer false + - poetry install + - poetry run pytest dockertidy --cov=dockertidy --cov-append --no-cov-on-fail + - poetry version + - poetry run docker-tidy --help + environment: + PY_COLORS: 1 + depends_on: + - fetch + - name: codecov - image: python:3.9 + image: python:3.10 commands: - pip install codecov -qq - codecov --required -X gcov @@ -104,6 +118,7 @@ steps: - python37-pytest - python38-pytest - python39-pytest + - python310-pytest trigger: ref: @@ -124,7 +139,7 @@ platform: steps: - name: bandit - image: python:3.9 + image: python:3.10 commands: - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq @@ -153,7 +168,7 @@ platform: steps: - name: build - image: python:3.9 + image: python:3.10 commands: - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq @@ -192,7 +207,7 @@ steps: - refs/tags/** - name: publish-pypi - image: python:3.9 + image: python:3.10 commands: - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq @@ -225,7 +240,7 @@ platform: steps: - name: build - image: python:3.9 + image: python:3.10 commands: - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq @@ -303,7 +318,7 @@ platform: steps: - name: build - image: python:3.9 + image: python:3.10 commands: - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq @@ -381,7 +396,7 @@ platform: steps: - name: build - image: python:3.9-alpine + image: python:3.10-alpine commands: - apk add -Uq --no-cache build-base openssl-dev libffi-dev musl-dev python3-dev git cargo - git fetch -tq @@ -634,6 +649,6 @@ depends_on: --- kind: signature -hmac: 1de438386a641872d0ff4a5d0137ae4be757c0a794a56f043baa7fd8c500f5ad +hmac: d173971d093a84521652b1be1c92ed997e3cbe0729d69db4c5a8a97e16e73df0 ... diff --git a/pyproject.toml b/pyproject.toml index 80b60ff..db2963f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ classifiers = [ "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Topic :: System :: Systems Administration", "Topic :: Utilities", "Topic :: Software Development",