From 68f43040762ffc2d2840112fd4220bf57a508c3a Mon Sep 17 00:00:00 2001 From: Tobias Messner Date: Mon, 16 Dec 2024 16:15:05 +0100 Subject: [PATCH] build!: Update to python 3.12 --- .github/workflows/docs.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/openapi.yml | 4 ++-- .github/workflows/tests.yml | 2 +- backend/Dockerfile | 6 +++--- backend/pyproject.toml | 6 +++--- docs/.readthedocs.yaml | 2 +- docs/Dockerfile | 2 +- docs/docs/admin/cli.md | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f85c143063..6afdcdcca0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - run: pip install -r docs/requirements.txt - run: mkdocs gh-deploy --strict --force working-directory: ./docs diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e688efb582..61910064f9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -44,7 +44,7 @@ jobs: with: cache: pip cache-dependency-path: ./backend/pyproject.toml - python-version: '3.11' + python-version: '3.12' - name: Install pre-commit run: |- python -m pip install pre-commit diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml index 9c8e5df254..c96eb21b42 100644 --- a/.github/workflows/openapi.yml +++ b/.github/workflows/openapi.yml @@ -22,7 +22,7 @@ jobs: with: cache: pip cache-dependency-path: ./backend/pyproject.toml - python-version: '3.11' + python-version: '3.12' - name: Install dependencies working-directory: ./backend run: python -m venv .venv && .venv/bin/pip install -e ".[dev]" @@ -61,7 +61,7 @@ jobs: with: cache: pip cache-dependency-path: ./backend/pyproject.toml - python-version: '3.11' + python-version: '3.12' - name: Install dependencies working-directory: ./backend run: python -m venv .venv && .venv/bin/pip install -e ".[dev]" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5010821960..1c1855ca12 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: with: cache: pip cache-dependency-path: ./backend/pyproject.toml - python-version: '3.11' + python-version: '3.12' - name: Install dependencies run: | pip install -e "./backend[dev]" diff --git a/backend/Dockerfile b/backend/Dockerfile index c6c4760e7c..26e66dd072 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -38,15 +38,15 @@ COPY .git_archival.txt /tmp/.git_archival.txt COPY startup.sh /opt/.startup.sh # Activate venv -RUN ln -s "$(which python3.11)" /usr/bin/python && \ - ln -sf "$(which python3.11)" /usr/bin/python3 && \ +RUN ln -s "$(which python3.12)" /usr/bin/python && \ + ln -sf "$(which python3.12)" /usr/bin/python3 && \ python -m venv /opt/.venv ENV _OLD_VIRTUAL_PATH="$PATH" ENV VIRTUAL_ENV=/opt/.venv ENV PATH="$VIRTUAL_ENV/bin:$PATH" WORKDIR /tmp/backend -RUN pip install . && chmod +x "$VIRTUAL_ENV/lib/python3.11/site-packages/capellacollab/settings/modelsources/git/askpass.py" +RUN pip install . && chmod +x "$VIRTUAL_ENV/lib/python3.12/site-packages/capellacollab/settings/modelsources/git/askpass.py" RUN mkdir -p /var/log/backend && \ chmod -R 777 /var/log/backend diff --git a/backend/pyproject.toml b/backend/pyproject.toml index e470d8989e..7594cd61bf 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -10,7 +10,7 @@ dynamic = ["version"] name = "capellacollab-backend" readme = "README.md" -requires-python = ">=3.11, <3.13" +requires-python = ">=3.12, <3.14" license = { text = "Apache-2.0" } authors = [{ name = "DB InfraGO AG" }] keywords = [] @@ -95,7 +95,7 @@ no_implicit_optional = true show_error_codes = true warn_redundant_casts = true warn_unreachable = true -python_version = "3.11" +python_version = "3.12" exclude = "capellacollab/alembic" [[tool.mypy.overrides]] @@ -222,7 +222,7 @@ xfail_strict = true [tool.ruff] line-length = 79 -target-version = "py311" +target-version = "py312" [tool.ruff.lint] select = ["I", "UP"] diff --git a/docs/.readthedocs.yaml b/docs/.readthedocs.yaml index f60af35c8c..d7b6eaefe7 100644 --- a/docs/.readthedocs.yaml +++ b/docs/.readthedocs.yaml @@ -9,7 +9,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: '3.11' + python: '3.12' mkdocs: configuration: docs/mkdocs.yml diff --git a/docs/Dockerfile b/docs/Dockerfile index fcade29928..a26997340a 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors # SPDX-License-Identifier: Apache-2.0 -ARG BASE_IMAGE=python:3.11-bookworm +ARG BASE_IMAGE=python:3.12-bookworm FROM $BASE_IMAGE as build USER root diff --git a/docs/docs/admin/cli.md b/docs/docs/admin/cli.md index 148fa114d2..3268ebb37a 100644 --- a/docs/docs/admin/cli.md +++ b/docs/docs/admin/cli.md @@ -16,7 +16,7 @@ sessions. ## Installation In order to use the CLI tooling, you'll need to have a local copy of the -collab-manager application and Python 3.11 installed. +collab-manager application and Python 3.12 installed. ```bash git clone https://github.com/DSD-DBS/capella-collab-manager.git