From e7f0d43da8a34d13e08bafc73fc42cf17ae05296 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/api_server.yml | 2 +- .github/workflows/application-tests-quality.yml | 2 +- .github/workflows/application-tests.yml | 2 +- .github/workflows/collector.yml | 2 +- .github/workflows/documentation.yml | 2 +- .github/workflows/feature-tests-quality.yml | 2 +- .github/workflows/feature-tests.yml | 2 +- .github/workflows/notifier.yml | 2 +- .github/workflows/release-quality.yml | 2 +- .github/workflows/shared_code.yml | 2 +- .github/workflows/sonarcloud.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 +--- 28 files changed, 38 insertions(+), 54 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e6ce4d3a9a..05e1a9c78a 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/api_server.yml b/.github/workflows/api_server.yml index bfee223800..24a16fd428 100644 --- a/.github/workflows/api_server.yml +++ b/.github/workflows/api_server.yml @@ -12,7 +12,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 with: - version: "0.4.19" + version: "0.4.20" - name: Install dependencies, run unit tests and check quality run: | cd components/api_server diff --git a/.github/workflows/application-tests-quality.yml b/.github/workflows/application-tests-quality.yml index e76370217c..598551087d 100644 --- a/.github/workflows/application-tests-quality.yml +++ b/.github/workflows/application-tests-quality.yml @@ -12,7 +12,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 with: - version: "0.4.19" + version: "0.4.20" - name: Install dependencies and check quality run: | cd tests/application_tests diff --git a/.github/workflows/application-tests.yml b/.github/workflows/application-tests.yml index 6889c20214..2a369572c1 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/.github/workflows/collector.yml b/.github/workflows/collector.yml index 6144740070..0180e92789 100644 --- a/.github/workflows/collector.yml +++ b/.github/workflows/collector.yml @@ -12,7 +12,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 with: - version: "0.4.19" + version: "0.4.20" - name: Install dependencies, run unit tests and check quality run: | cd components/collector diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 7709b74f89..622d40c9c4 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -12,7 +12,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 with: - version: "0.4.19" + version: "0.4.20" - name: Install dependencies, run unit tests and check quality run: | cd docs diff --git a/.github/workflows/feature-tests-quality.yml b/.github/workflows/feature-tests-quality.yml index 248b494780..97221e5aab 100644 --- a/.github/workflows/feature-tests-quality.yml +++ b/.github/workflows/feature-tests-quality.yml @@ -12,7 +12,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 with: - version: "0.4.19" + version: "0.4.20" - name: Install dependencies and check quality run: | cd tests/feature_tests diff --git a/.github/workflows/feature-tests.yml b/.github/workflows/feature-tests.yml index fb32a99101..422d62dd72 100644 --- a/.github/workflows/feature-tests.yml +++ b/.github/workflows/feature-tests.yml @@ -17,7 +17,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 with: - version: "0.4.19" + version: "0.4.20" - name: Run feature tests run: ./tests/feature_tests/ci/test.sh - name: Upload artifacts diff --git a/.github/workflows/notifier.yml b/.github/workflows/notifier.yml index 524e14f7d4..179910abbd 100644 --- a/.github/workflows/notifier.yml +++ b/.github/workflows/notifier.yml @@ -12,7 +12,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 with: - version: "0.4.19" + version: "0.4.20" - name: Install dependencies, run unit tests and check quality run: | cd components/notifier diff --git a/.github/workflows/release-quality.yml b/.github/workflows/release-quality.yml index 16cc7edd9e..c29ac2021c 100644 --- a/.github/workflows/release-quality.yml +++ b/.github/workflows/release-quality.yml @@ -12,7 +12,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 with: - version: "0.4.19" + version: "0.4.20" - name: Install dependencies and check quality run: | cd release diff --git a/.github/workflows/shared_code.yml b/.github/workflows/shared_code.yml index 5a4ca61b28..59d071fd17 100644 --- a/.github/workflows/shared_code.yml +++ b/.github/workflows/shared_code.yml @@ -12,7 +12,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 with: - version: "0.4.19" + version: "0.4.20" - name: Install dependencies, run unit tests and check quality run: | cd components/shared_code diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index f4481444d1..26a4a3cbef 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -28,7 +28,7 @@ jobs: if: env.SONAR_TOKEN != null uses: astral-sh/setup-uv@v3 with: - version: "0.4.19" + version: "0.4.20" - name: Set up Node if: env.SONAR_TOKEN != null uses: actions/setup-node@v4.0.4 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 621a38dd6a..1f0221fe54 100644 --- a/components/api_server/pyproject.toml +++ b/components/api_server/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "api-server" version = "5.17.0-rc.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 ec42e1bf2f..ff1b3912a4 100644 --- a/components/collector/pyproject.toml +++ b/components/collector/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "collector" version = "5.17.0-rc.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 a296877d37..6f0bbe41a6 100644 --- a/components/notifier/pyproject.toml +++ b/components/notifier/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "notifier" version = "5.17.0-rc.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 0a47c3ad3c..8e5ceb4146 100644 --- a/components/shared_code/pyproject.toml +++ b/components/shared_code/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "shared-code" version = "5.17.0-rc.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 7d3a116e86..664b179590 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "docs" version = "5.17.0-rc.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 a31d352f8c..0356e10661 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 e4b52a6745..bb4af36ba1 100644 --- a/release/pyproject.toml +++ b/release/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "release" version = "5.17.0-rc.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 62a500e863..49e4400fa7 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -7,7 +7,7 @@ sonar.projectVersion=5.17.0-rc.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 201263c01f..f7e326f4da 100644 --- a/tests/application_tests/pyproject.toml +++ b/tests/application_tests/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "application-tests" version = "5.17.0-rc.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 056fe69ae3..4c861396c0 100644 --- a/tests/feature_tests/pyproject.toml +++ b/tests/feature_tests/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "feature-tests" version = "5.17.0-rc.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",