From a35f5030ec23c94d5d8c691f4520bbfd9c6e6b4c Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 16 Oct 2023 14:15:26 +0200 Subject: [PATCH] feat: add support for python 3.12 (#695) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .woodpecker/build-container.yml | 2 +- .woodpecker/build-package.yml | 4 ++-- .woodpecker/lint.yml | 4 ++-- .woodpecker/test.yml | 3 ++- Containerfile.multiarch | 2 +- ansiblelater/utils/yamlhelper.py | 20 -------------------- pyproject.toml | 1 + 7 files changed, 9 insertions(+), 27 deletions(-) diff --git a/.woodpecker/build-container.yml b/.woodpecker/build-container.yml index 0b7d389..9537803 100644 --- a/.woodpecker/build-container.yml +++ b/.woodpecker/build-container.yml @@ -7,7 +7,7 @@ when: steps: build: - image: docker.io/library/python:3.11 + image: docker.io/library/python:3.12 commands: - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq diff --git a/.woodpecker/build-package.yml b/.woodpecker/build-package.yml index cf68ab1..4c3e10d 100644 --- a/.woodpecker/build-package.yml +++ b/.woodpecker/build-package.yml @@ -7,7 +7,7 @@ when: steps: build: - image: docker.io/library/python:3.11 + image: docker.io/library/python:3.12 commands: - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq @@ -45,7 +45,7 @@ steps: - event: [tag] publish-pypi: - image: docker.io/library/python:3.11 + image: docker.io/library/python:3.12 secrets: - source: pypi_password target: POETRY_HTTP_BASIC_PYPI_PASSWORD diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index c0599df..8d148b7 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -7,7 +7,7 @@ when: steps: check-format: - image: docker.io/library/python:3.11 + image: docker.io/library/python:3.12 commands: - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq @@ -17,7 +17,7 @@ steps: PY_COLORS: "1" check-coding: - image: docker.io/library/python:3.11 + image: docker.io/library/python:3.12 commands: - git fetch -tq - pip install poetry poetry-dynamic-versioning -qq diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index ad30213..a1323fa 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -10,10 +10,11 @@ matrix: - docker.io/library/python:3.9 - docker.io/library/python:3.10 - docker.io/library/python:3.11 + - docker.io/library/python:3.12 steps: fetch: - image: docker.io/library/python:3.11 + image: docker.io/library/python:3.12 commands: - git fetch -tq diff --git a/Containerfile.multiarch b/Containerfile.multiarch index fcfa173..b6baf11 100644 --- a/Containerfile.multiarch +++ b/Containerfile.multiarch @@ -1,4 +1,4 @@ -FROM python:3.11-alpine@sha256:3e73c0b6c1f0205225359acac5c8ab1852e7281248d72afda3e1bb8c6f47deab +FROM python:3.12-alpine@sha256:ae35274f417fc81ba6ee1fc84206e8517f28117566ee6a04a64f004c1409bdac LABEL maintainer="Robert Kaussow " LABEL org.opencontainers.image.authors="Robert Kaussow " diff --git a/ansiblelater/utils/yamlhelper.py b/ansiblelater/utils/yamlhelper.py index b4990d2..04e4629 100644 --- a/ansiblelater/utils/yamlhelper.py +++ b/ansiblelater/utils/yamlhelper.py @@ -21,8 +21,6 @@ # THE SOFTWARE. import codecs -import glob -import imp import os from contextlib import suppress @@ -129,24 +127,6 @@ BLOCK_NAME_TO_ACTION_TYPE_MAP = { } -def load_plugins(directory): - result = [] - fh = None - - for pluginfile in glob.glob(os.path.join(directory, "[A-Za-z]*.py")): - - pluginname = os.path.basename(pluginfile.replace(".py", "")) - try: - fh, filename, desc = imp.find_module(pluginname, [directory]) - mod = imp.load_module(pluginname, fh, filename, desc) - obj = getattr(mod, pluginname)() - result.append(obj) - finally: - if fh: - fh.close() - return result - - def tokenize(line): tokens = line.lstrip().split(" ") if tokens[0] == "-": diff --git a/pyproject.toml b/pyproject.toml index 5910461..83cd739 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Utilities", "Topic :: Software Development", ]