From ecabeea1b2e292ddcd42c1d5716a9751de14f700 Mon Sep 17 00:00:00 2001 From: Christian Assing Date: Tue, 26 May 2026 10:12:46 +0200 Subject: [PATCH 1/3] switch to Python 3.14 and ubi10 --- Dockerfile | 4 ++-- README.md | 3 +-- cookiecutter.json | 2 +- {{ cookiecutter.project_slug }}/Dockerfile | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0ccf7a4..88d43b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM registry.access.redhat.com/ubi9/python-312@sha256:bb8fd1ba3f7c4c28f04e124654ad95bf575cf5015d768e0bd523196b9d903d52 AS test +FROM registry.access.redhat.com/ubi10/python-314-minimal@sha256:0c5b5d198178280e65577e63251ee5ee49435e1a711bef4e4b5b471723e0ed3c AS test COPY --from=ghcr.io/astral-sh/uv:0.11.16@sha256:440fd6477af86a2f1b38080c539f1672cd22acb1b1a47e321dba5158ab08864d /uv /bin/uv ENV \ - UV_PYTHON="/usr/bin/python3.12" \ + UV_PYTHON="/usr/bin/python3.14" \ # disable uv cache. it doesn't make sense in a container UV_NO_CACHE=true diff --git a/README.md b/README.md index 5055838..253fc09 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,7 @@ This is a template for a Python project. Choose from [1/2] (1): [8/9] version (0.1.0): [9/9] Select python_version - 1 - 3.12 - 2 - 3.11 + 1 - 3.14 Choose from [1/2] (1): ``` diff --git a/cookiecutter.json b/cookiecutter.json index 0656253..72030e7 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -7,5 +7,5 @@ "project_short_description": "Please enter a short description of your project", "deployment": ["openshift", "pypi"], "version": "0.1.0", - "python_version": ["3.12", "3.11"] + "python_version": ["3.14"] } diff --git a/{{ cookiecutter.project_slug }}/Dockerfile b/{{ cookiecutter.project_slug }}/Dockerfile index 46d1c2d..280d0fd 100644 --- a/{{ cookiecutter.project_slug }}/Dockerfile +++ b/{{ cookiecutter.project_slug }}/Dockerfile @@ -1,6 +1,6 @@ # # Base image with defaults for all stages -FROM registry.access.redhat.com/ubi9/python-{{ cookiecutter.python_version.replace(".", "") }} AS base +FROM registry.access.redhat.com/ubi10/python-{{ cookiecutter.python_version.replace(".", "") }}-minimal AS base # Keep this version tag in sync with pyproject.toml or feel free to remove it LABEL konflux.additional-tags="{{ cookiecutter.version }}" From e0d3a04ffb26c220c91dec56cdea4936a89e9f2b Mon Sep 17 00:00:00 2001 From: Christian Assing Date: Tue, 26 May 2026 10:21:02 +0200 Subject: [PATCH 2/3] :construction_worker: install make --- Dockerfile | 4 ++++ {{ cookiecutter.project_slug }}/Dockerfile | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 88d43b5..9fd13b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,5 +6,9 @@ ENV \ # disable uv cache. it doesn't make sense in a container UV_NO_CACHE=true +USER root +RUN microdnf install -y make +USER 1001 + COPY . . RUN make _test diff --git a/{{ cookiecutter.project_slug }}/Dockerfile b/{{ cookiecutter.project_slug }}/Dockerfile index 280d0fd..b6b9cbb 100644 --- a/{{ cookiecutter.project_slug }}/Dockerfile +++ b/{{ cookiecutter.project_slug }}/Dockerfile @@ -37,6 +37,10 @@ RUN uv sync --frozen --no-group dev # FROM builder AS test +USER root +RUN microdnf install -y make +USER 1001 + COPY Makefile ./ RUN uv sync --frozen From 20adfa7d417321a4b6737cd072e4667bc20fc7ee Mon Sep 17 00:00:00 2001 From: Christian Assing Date: Tue, 26 May 2026 12:05:01 +0200 Subject: [PATCH 3/3] flake8-type-checking settings --- {{ cookiecutter.project_slug }}/pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/{{ cookiecutter.project_slug }}/pyproject.toml b/{{ cookiecutter.project_slug }}/pyproject.toml index 9c7ef5d..8960b0a 100644 --- a/{{ cookiecutter.project_slug }}/pyproject.toml +++ b/{{ cookiecutter.project_slug }}/pyproject.toml @@ -101,6 +101,14 @@ preview = true [tool.ruff.lint.isort] known-first-party = ["{{ cookiecutter.project_module }}"] +[tool.ruff.lint.flake8-type-checking] +runtime-evaluated-base-classes = ["pydantic.BaseModel"] +runtime-evaluated-decorators = [ + "dataclasses.dataclass", + "pydantic.dataclasses.dataclass", + "pydantic.validate_call", +] + # Mypy configuration [tool.mypy] files = ["{{ cookiecutter.project_module }}", "tests"]