From 176a22464bff7c89d6ddd7c04e997083269ae0c6 Mon Sep 17 00:00:00 2001 From: ekneg54 Date: Fri, 13 Sep 2024 16:57:19 +0200 Subject: [PATCH] add support for python 3.13 and drop support for python 3.10 --- .devcontainer/Dockerfile | 4 ++-- .devcontainer/devcontainer.json | 2 +- .github/workflows/ci.yml | 15 +++++++-------- .github/workflows/main.yml | 2 +- .../publish-latest-dev-release-to-pypi.yml | 2 +- .github/workflows/publish-release-to-pypi.yml | 2 +- .github/workflows/testing.yml | 2 +- .readthedocs.yaml | 2 +- Dockerfile | 2 +- doc/source/installation.rst | 2 +- pyproject.toml | 4 ++-- 11 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 86e085ff5..92dfd13f2 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,7 @@ # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/python-3/.devcontainer/base.Dockerfile -# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster -ARG VARIANT="3.10-bullseye" +# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon) +ARG VARIANT="3.11-bullseye" FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8d7ed4977..1ef937c23 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,7 +6,7 @@ "dockerfile": "Dockerfile", "context": "..", "args": { - // Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6 + // Update 'VARIANT' to pick a Python version: 3, ... // Append -bullseye or -buster to pin to an OS version. // Use -bullseye variants on local on arm64/Apple Silicon. "VARIANT": "3.12", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d60e4a0d..7018ca7a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - python-version: ["3.10"] + python-version: ["3.11"] steps: - uses: actions/checkout@v4 @@ -44,7 +44,7 @@ jobs: strategy: matrix: - python-version: ["3.10"] + python-version: ["3.11"] steps: - uses: actions/checkout@v4 @@ -97,7 +97,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13"] runs-on: ubuntu-latest steps: @@ -126,7 +126,7 @@ jobs: - name: Ensure logprep is available in image run: | docker run --rm ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-${{ github.head_ref }} --version - + # This step will build the image again, but every layer will already be cached, so it is nearly instantaneous. - name: Push image uses: docker/build-push-action@v5 @@ -138,7 +138,7 @@ jobs: PYTHON_VERSION=${{ matrix.python-version }} tags: | ghcr.io/fkie-cad/logprep:py${{ matrix.python-version }}-${{ github.head_ref }} - + # To avoid the trivy-db becoming outdated, we save the cache for one day - name: Get date id: date @@ -149,9 +149,8 @@ jobs: with: path: cache/db key: trivy-cache-${{ steps.date.outputs.date }} - restore-keys: - trivy-cache- - + restore-keys: trivy-cache- + - name: Scan image using Trivy uses: aquasecurity/trivy-action@0.24.0 env: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 90e144c09..b283950e8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - python-version: ["3.10"] + python-version: ["3.11"] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish-latest-dev-release-to-pypi.yml b/.github/workflows/publish-latest-dev-release-to-pypi.yml index 0c49be251..3689f4cb3 100644 --- a/.github/workflows/publish-latest-dev-release-to-pypi.yml +++ b/.github/workflows/publish-latest-dev-release-to-pypi.yml @@ -49,7 +49,7 @@ jobs: containerbuild: strategy: matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13"] runs-on: ubuntu-latest steps: diff --git a/.github/workflows/publish-release-to-pypi.yml b/.github/workflows/publish-release-to-pypi.yml index a9a9d46af..9943426bb 100644 --- a/.github/workflows/publish-release-to-pypi.yml +++ b/.github/workflows/publish-release-to-pypi.yml @@ -62,7 +62,7 @@ jobs: containerbuild: strategy: matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13"] runs-on: ubuntu-latest needs: publish-latest-release-to-pypi diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 87d7c49e0..46742890a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13"] test-type: ["unit", "acceptance"] steps: - uses: actions/checkout@v4 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 3a5c7f86a..3012f9cb2 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -11,7 +11,7 @@ build: apt_packages: - "pandoc" tools: - python: "3.10" + python: "3.11" # You can also specify other tool versions: # nodejs: "16" rust: "latest" diff --git a/Dockerfile b/Dockerfile index cc9153771..7c2394c7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG PYTHON_VERSION=3.10 +ARG PYTHON_VERSION=3.11 FROM bitnami/python:${PYTHON_VERSION} as build ARG LOGPREP_VERSION=latest diff --git a/doc/source/installation.rst b/doc/source/installation.rst index 34189b618..5878b172b 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -5,7 +5,7 @@ Installation PIP === -Python should be present on the system. Currently, Python 3.10 - 3.12 are supported. +Python should be present on the system. Currently, Python 3.11 - 3.13 are supported. To install Logprep you have following options: **1. Option:** latest stable release diff --git a/pyproject.toml b/pyproject.toml index a07259653..91fd00e8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ binding = "PyO3" # Default value, can be omitted [project] name = "logprep" description = "Logprep allows to collect, process and forward log messages from various data sources." -requires-python = ">=3.10" +requires-python = ">=3.11" readme = "README.md" dynamic = ["version"] license = { file = "LICENSE" } @@ -37,9 +37,9 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: POSIX :: Linux",