From c4eaa2ecb6d10532b1e8ae46bac6a10a345ebe3b Mon Sep 17 00:00:00 2001 From: Hanne Moa Date: Tue, 12 Nov 2024 11:13:41 +0100 Subject: [PATCH] Add support for python 3.13 --- .github/workflows/python.yml | 2 +- .readthedocs.yaml | 4 ++-- .sonarcloud.properties | 2 +- Dockerfile | 2 +- changelog.d/+support-py313.added.md | 1 + docker/Dockerfile | 2 +- pyproject.toml | 1 + tox.ini | 6 +++--- 8 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 changelog.d/+support-py313.added.md diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index d2dca77fb..ef45785ac 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -26,7 +26,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e5ee0ba62..2a9a5f490 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,9 +7,9 @@ version: 2 # Set the version of Python and other tools you might need build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: - python: "3.9" + python: "3.12" # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/.sonarcloud.properties b/.sonarcloud.properties index d564eb627..c3fdef718 100644 --- a/.sonarcloud.properties +++ b/.sonarcloud.properties @@ -10,7 +10,7 @@ sonar.sources=src # Encoding of the source code. Default is default system encoding #sonar.sourceEncoding=UTF-8 -sonar.python.version=3.7, 3.8, 3.9, 3.10 +sonar.python.version=3.9, 3.10, 3.11, 3.12, 3.13 sonar.tests=tests #sonar.exclusions=path/to/generated/file.py, other-generated-file.dat diff --git a/Dockerfile b/Dockerfile index 957cbfb4e..416994ccf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # This Dockerfile is designed to run a development environment for Argus, # with the Argus source code tree mounted at /argus # -FROM python:3.10 +FROM python:3.13 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends tini \ diff --git a/changelog.d/+support-py313.added.md b/changelog.d/+support-py313.added.md new file mode 100644 index 000000000..a35a84427 --- /dev/null +++ b/changelog.d/+support-py313.added.md @@ -0,0 +1 @@ +Add support for testing and running on Python 3.13 diff --git a/docker/Dockerfile b/docker/Dockerfile index 7f03db2ba..a9c6214ef 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,6 @@ # Defines a production image for the Argus API server # Needs the repository root directory as its context -FROM python:3.10 +FROM python:3.13 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends tini build-essential diff --git a/pyproject.toml b/pyproject.toml index 74918c85c..776caae79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: System :: Monitoring", ] dependencies = [ diff --git a/tox.ini b/tox.ini index 64b5f9d19..bd261fe6a 100644 --- a/tox.ini +++ b/tox.ini @@ -3,10 +3,11 @@ envlist = clean py39-django{42} py{310,311,312}-django{42,50,51} + py313-django51 coverage-html skipsdist = True skip_missing_interpreters = True -basepython = python3.10 +basepython = python3.12 [gh-actions] python = @@ -14,6 +15,7 @@ python = 3.10: py310 3.11: py311 3.12: py312 + 3.13: py313 [testenv:clean] deps = @@ -23,7 +25,6 @@ commands = -coverage erase [testenv:coverage-html] -basepython = python3.10 deps = coverage setenv = @@ -60,7 +61,6 @@ commands = cp requirements-django42.txt requirements.txt [testenv:coverage-xml] -basepython = python3.10 deps = coverage setenv =