From fcc7db5b38a49f8a8af8927892fdf19164e86c99 Mon Sep 17 00:00:00 2001 From: Frank Niessink Date: Fri, 27 Sep 2024 16:07:32 +0200 Subject: [PATCH] Upgrade to Python 3.13. --- .circleci/config.yml | 4 ++-- .github/workflows/application-tests.yml | 2 +- .readthedocs.yaml | 12 ++++++------ components/api_server/Dockerfile | 4 ++-- components/api_server/pyproject.toml | 4 +--- components/collector/Dockerfile | 4 ++-- components/collector/pyproject.toml | 4 +--- components/notifier/Dockerfile | 4 ++-- components/notifier/pyproject.toml | 4 +--- components/shared_code/pyproject.toml | 4 +--- components/testdata/Dockerfile | 2 +- docs/pyproject.toml | 4 +--- docs/src/conf.py | 2 +- docs/src/development.md | 4 ++-- release/pyproject.toml | 4 +--- sonar-project.properties | 2 +- tests/application_tests/pyproject.toml | 4 +--- tests/feature_tests/pyproject.toml | 4 +--- 18 files changed, 28 insertions(+), 44 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 445d200d78..ee23a69bd1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ orbs: jobs: unittest_backend: docker: - - image: cimg/python:3.12.6 + - image: cimg/python:3.13 auth: username: $DOCKERHUB_USERNAME password: $DOCKERHUB_PASSWORD @@ -90,7 +90,7 @@ jobs: export COMPOSE_FILE=docker/docker-compose.yml:docker/docker-compose.ci.yml docker compose build && docker compose up -d docker ps - docker run -it -w `pwd` -v `pwd`:`pwd` --network=container:docker-www-1 ghcr.io/astral-sh/uv:python3.12-bookworm tests/application_tests/ci/test.sh + docker run -it -w `pwd` -v `pwd`:`pwd` --network=container:docker-www-1 ghcr.io/astral-sh/uv:python3.13-bookworm tests/application_tests/ci/test.sh docker ps docker compose logs > build/containers.log - run: diff --git a/.github/workflows/application-tests.yml b/.github/workflows/application-tests.yml index 5ffd23ce04..f58aae4c74 100644 --- a/.github/workflows/application-tests.yml +++ b/.github/workflows/application-tests.yml @@ -22,7 +22,7 @@ jobs: run: | mkdir -p build docker compose --file docker/docker-compose.yml --file docker/docker-compose.ci.yml --project-name quality-time up --build --detach --wait - docker run -t -w `pwd` -v `pwd`:`pwd` --network=container:quality-time-www-1 ghcr.io/astral-sh/uv:python3.12-bookworm tests/application_tests/ci/test.sh + docker run -t -w `pwd` -v `pwd`:`pwd` --network=container:quality-time-www-1 ghcr.io/astral-sh/uv:python3.13-bookworm tests/application_tests/ci/test.sh - name: Save container logs if: always() run: | diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 7298dcf808..311b6ba427 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,20 +9,20 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.12" + python: "3" apt_packages: - graphviz # Build documentation in the docs/ directory with Sphinx sphinx: - configuration: docs/src/conf.py + configuration: docs/src/conf.py # Additional formats to build formats: - - pdf + - pdf # Requirements to install python: - install: - - requirements: docs/requirements/requirements-dev.txt - - requirements: docs/requirements/requirements-internal-rtd.txt + install: + - requirements: docs/requirements/requirements-dev.txt + - requirements: docs/requirements/requirements-internal-rtd.txt diff --git a/components/api_server/Dockerfile b/components/api_server/Dockerfile index 45f2453346..1f99c92e4a 100644 --- a/components/api_server/Dockerfile +++ b/components/api_server/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12.6-alpine3.20 AS compile-image +FROM python:3.13.0-alpine3.20 AS compile-image WORKDIR /home/server @@ -11,7 +11,7 @@ COPY api_server/requirements/requirements-internal.txt /requirements-internal.tx COPY shared_code /home/shared_code/ RUN pip install --no-cache-dir --use-pep517 -r /requirements-internal.txt -FROM python:3.12.6-alpine3.20 +FROM python:3.13.0-alpine3.20 LABEL maintainer="Quality-time team " LABEL description="Quality-time API-server" diff --git a/components/api_server/pyproject.toml b/components/api_server/pyproject.toml index 9647721442..26450f0d5c 100644 --- a/components/api_server/pyproject.toml +++ b/components/api_server/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "api-server" version = "5.18.0" -requires-python = ">=3.12" +requires-python = ">=3.13" classifiers = [ "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] dependencies = [ @@ -36,7 +35,6 @@ optional-dependencies.tools = [ ] [tool.ruff] -target-version = "py312" line-length = 120 src = [ "src", diff --git a/components/collector/Dockerfile b/components/collector/Dockerfile index 2debad48a4..b4aa4160bc 100644 --- a/components/collector/Dockerfile +++ b/components/collector/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12.6-alpine3.20 AS compile-image +FROM python:3.13.0-alpine3.20 AS compile-image WORKDIR /home/collector @@ -11,7 +11,7 @@ COPY shared_code /home/shared_code/ COPY collector/requirements/requirements-internal.txt /requirements-internal.txt RUN pip install --no-cache-dir --use-pep517 -r /requirements-internal.txt -FROM python:3.12.6-alpine3.20 +FROM python:3.13.0-alpine3.20 LABEL maintainer="Quality-time team " LABEL description="Quality-time collector" diff --git a/components/collector/pyproject.toml b/components/collector/pyproject.toml index 98ce3a9ff7..8222a2bda8 100644 --- a/components/collector/pyproject.toml +++ b/components/collector/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "collector" version = "5.18.0" -requires-python = ">=3.12" +requires-python = ">=3.13" classifiers = [ "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] dependencies = [ @@ -36,7 +35,6 @@ optional-dependencies.tools = [ ] [tool.ruff] -target-version = "py312" line-length = 120 src = [ "src", diff --git a/components/notifier/Dockerfile b/components/notifier/Dockerfile index 3d858ad320..c2e4479712 100644 --- a/components/notifier/Dockerfile +++ b/components/notifier/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12.6-alpine3.20 AS compile-image +FROM python:3.13.0-alpine3.20 AS compile-image WORKDIR /home/notifier @@ -11,7 +11,7 @@ COPY shared_code /home/shared_code/ COPY notifier/requirements/requirements-internal.txt /requirements-internal.txt RUN pip install --no-cache-dir --use-pep517 -r /requirements-internal.txt -FROM python:3.12.6-alpine3.20 +FROM python:3.13.0-alpine3.20 LABEL maintainer="Quality-time team " LABEL description="Quality-time notifier" diff --git a/components/notifier/pyproject.toml b/components/notifier/pyproject.toml index 2ae982101b..3ae042f997 100644 --- a/components/notifier/pyproject.toml +++ b/components/notifier/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "notifier" version = "5.18.0" -requires-python = ">=3.12" +requires-python = ">=3.13" classifiers = [ "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] dependencies = [ @@ -29,7 +28,6 @@ optional-dependencies.tools = [ ] [tool.ruff] -target-version = "py312" line-length = 120 src = [ "src", diff --git a/components/shared_code/pyproject.toml b/components/shared_code/pyproject.toml index 2f66829a37..3c29e49ec8 100644 --- a/components/shared_code/pyproject.toml +++ b/components/shared_code/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "shared-code" version = "5.18.0" -requires-python = ">=3.12" +requires-python = ">=3.13" classifiers = [ "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] dependencies = [ @@ -38,7 +37,6 @@ where = [ ] [tool.ruff] -target-version = "py312" line-length = 120 src = [ "src", diff --git a/components/testdata/Dockerfile b/components/testdata/Dockerfile index d150615435..1a3eeeee79 100644 --- a/components/testdata/Dockerfile +++ b/components/testdata/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12.6-alpine3.20 +FROM python:3.13.0-alpine3.20 LABEL maintainer="Quality-time team " LABEL description="Quality-time testdata" diff --git a/docs/pyproject.toml b/docs/pyproject.toml index 139df68e0a..3abed20284 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "docs" version = "5.18.0" -requires-python = ">=3.12" +requires-python = ">=3.13" classifiers = [ "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] dependencies = [ @@ -33,7 +32,6 @@ optional-dependencies.tools = [ ] [tool.ruff] -target-version = "py312" line-length = 120 src = [ "src", diff --git a/docs/src/conf.py b/docs/src/conf.py index 695620499c..f8f9f8cfb4 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -25,7 +25,7 @@ # -- Project information ----------------------------------------------------- project = "Quality-time" -copyright = "2021-2023, ICTU" # noqa: A001 +copyright = "2021-2024, ICTU" # noqa: A001 author = "ICTU" # -- General configuration --------------------------------------------------- diff --git a/docs/src/development.md b/docs/src/development.md index 57e92ba691..a7d8d283c5 100644 --- a/docs/src/development.md +++ b/docs/src/development.md @@ -12,7 +12,7 @@ If you want to get *Quality-time* up and running quickly, for example for a demo #### Install prerequisites -Prerequisites are Docker and Git for both scenario's. For scenario 2 you also need Python 3.12, [uv](https://github.com/astral-sh/uv), and a recent version of Node.js (we currently use Node.js v22). +Prerequisites are Docker and Git for both scenario's. For scenario 2 you also need Python 3.13, [uv](https://github.com/astral-sh/uv), and a recent version of Node.js (we currently use Node.js v22). Clone this repository: @@ -441,7 +441,7 @@ The application tests in theory test all components through the frontend, but un ```console docker-compose up -d -docker run -it -w `pwd` -v `pwd`:`pwd` --network=container:qualitytime_www_1 ghcr.io/astral-sh/uv:python3.12-bookworm tests/application_tests/ci/test.sh +docker run -it -w `pwd` -v `pwd`:`pwd` --network=container:qualitytime_www_1 ghcr.io/astral-sh/uv:python3.13-bookworm tests/application_tests/ci/test.sh ``` ## Documentation and changelog diff --git a/release/pyproject.toml b/release/pyproject.toml index cc2d80632b..234b0413e8 100644 --- a/release/pyproject.toml +++ b/release/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "release" version = "5.18.0" -requires-python = ">=3.12" +requires-python = ">=3.13" classifiers = [ "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] dependencies = [ @@ -22,7 +21,6 @@ optional-dependencies.tools = [ ] [tool.ruff] -target-version = "py312" line-length = 120 src = [ "src", diff --git a/sonar-project.properties b/sonar-project.properties index fce664c279..f0338a485b 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -7,7 +7,7 @@ sonar.projectVersion=5.18.0 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. # This property is optional if sonar.modules is set. sonar.sources=components/collector,components/notifier,components/api_server,components/shared_code,components/frontend -sonar.python.version=3.12 +sonar.python.version=3.13 # Exclude third party software and generated code from analysis sonar.exclusions=**/coverage/**/*,**/build/**/*,**/node_modules/**/* diff --git a/tests/application_tests/pyproject.toml b/tests/application_tests/pyproject.toml index 0a85a1fa2b..aab7731894 100644 --- a/tests/application_tests/pyproject.toml +++ b/tests/application_tests/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "application-tests" version = "5.18.0" -requires-python = ">=3.12" +requires-python = ">=3.13" classifiers = [ "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] dependencies = [ @@ -26,7 +25,6 @@ optional-dependencies.tools = [ ] [tool.ruff] -target-version = "py312" line-length = 120 src = [ "src", diff --git a/tests/feature_tests/pyproject.toml b/tests/feature_tests/pyproject.toml index c5f251d73e..d52216929f 100644 --- a/tests/feature_tests/pyproject.toml +++ b/tests/feature_tests/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "feature-tests" version = "5.18.0" -requires-python = ">=3.12" +requires-python = ">=3.13" classifiers = [ "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] dependencies = [ @@ -31,7 +30,6 @@ optional-dependencies.tools = [ ] [tool.ruff] -target-version = "py312" line-length = 120 src = [ "src",