From 39f62a4b8629d6bf1273dedf0f08856d9c78621e 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 | 2 +- .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, 37 insertions(+), 53 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a7013ccb56..ae123dca6c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 4d49ea0884..0e4704002d 100644 --- a/.github/workflows/application-tests.yml +++ b/.github/workflows/application-tests.yml @@ -17,7 +17,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 677ef09a1b..f49be5cd93 100644 --- a/.github/workflows/feature-tests.yml +++ b/.github/workflows/feature-tests.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: 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 70fb2eb46d..cc7ec44747 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -22,7 +22,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..8e8c1e13ec 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,20 +9,20 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.12" + python: "3.13" 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 e8339267e1..baff589163 100644 --- a/components/api_server/pyproject.toml +++ b/components/api_server/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "api-server" version = "5.16.2" -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 = [ @@ -39,7 +38,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 2dfd366564..c2541e67a9 100644 --- a/components/collector/pyproject.toml +++ b/components/collector/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "collector" version = "5.16.2" -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 = [ @@ -39,7 +38,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 d0a483ac78..34aadec173 100644 --- a/components/notifier/pyproject.toml +++ b/components/notifier/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "notifier" version = "5.16.2" -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 = [ @@ -32,7 +31,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 7e0b549fc5..0162a96feb 100644 --- a/components/shared_code/pyproject.toml +++ b/components/shared_code/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "shared-code" version = "5.16.2" -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 = [ @@ -41,7 +40,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 676fcc1eff..e148e4c9e9 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "docs" version = "5.16.2" -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/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 81d3614532..82081956ef 100644 --- a/release/pyproject.toml +++ b/release/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "release" version = "5.16.2" -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 = [ @@ -27,7 +26,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 34b465a26d..677e0fbcb0 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -7,7 +7,7 @@ sonar.projectVersion=5.16.2 # 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 8aad69d8ce..3ef7910146 100644 --- a/tests/application_tests/pyproject.toml +++ b/tests/application_tests/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "application-tests" version = "5.16.2" -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/tests/feature_tests/pyproject.toml b/tests/feature_tests/pyproject.toml index 99c22c0f23..929eb249b0 100644 --- a/tests/feature_tests/pyproject.toml +++ b/tests/feature_tests/pyproject.toml @@ -1,10 +1,9 @@ [project] name = "feature-tests" version = "5.16.2" -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 = [ @@ -34,7 +33,6 @@ optional-dependencies.tools = [ ] [tool.ruff] -target-version = "py312" line-length = 120 src = [ "src",