diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 37ca4ffef..220224313 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -45,17 +45,17 @@ repos: rev: v0.7.0 hooks: - id: ruff-format - args: [--target-version, py311] # 3.11 + args: [--target-version, py312] # 3.12 # - repo: https://github.com/dosisod/refurb # rev: v2.0.0 # hooks: # - id: refurb - # args: [--python-version, "3.11", --sort, error] #, --format, gitub + # args: [--python-version, "3.12", --sort, error] #, --format, gitub - repo: https://github.com/asottile/pyupgrade rev: v3.17.0 hooks: - id: pyupgrade - args: [--py311-plus] # 3.11 + args: [--py312-plus] # 3.12 - repo: https://github.com/adamchainz/django-upgrade rev: 1.21.0 hooks: diff --git a/CHANGELOG.md b/CHANGELOG.md index df75100bf..02bf1b8bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ??.??.?? ======== -- Reintroduced CI jobs for Python 3.12, and we have also added support for Python 3.13. +- We're now running on Python 3.12 (its CI jobs were reintroduced), and we have also added support for Python 3.13. - We have switched over to `uv` everywhere (Makefile, Docker, CI) instead of plain `pip-tools`. - Replaced `isort` and `black` with `ruff` (CI). - Added history tracking to the `Duty` model. @@ -15,7 +15,7 @@ ======== - E-mail communications: grayed-out "send" button after 1 click, to avoid spamming inboxes. -- Fixtures: save_initial_data management cmd will use built-in json formatter instead of `jq`. +- Fixtures: `save_initial_data` management command will now be using the built-in json formatter instead of `jq`. - Updated clipboard functionality at Incoming submodule. - Updated organisms names on both production database and fixtures. - Updated dependencies. diff --git a/backend.Dockerfile b/backend.Dockerfile index 28b9890e0..bb80d25c8 100644 --- a/backend.Dockerfile +++ b/backend.Dockerfile @@ -1,6 +1,6 @@ -ARG PyVersion=3.11 # to be repeated after FROM, docker syntax is at fault. +ARG PyVersion=3.12 # to be repeated after FROM, docker syntax is at fault. FROM python:${PyVersion}-bullseye AS pk2_base -ARG PyVersion=3.11 +ARG PyVersion=3.12 COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv ENV \ @@ -27,6 +27,9 @@ RUN localedef -i en_US -f UTF-8 en_US.UTF-8 WORKDIR /usr/src/app +## Pre-heat the cache +RUN --mount=type=cache,target=/root/.cache/uv \ + uv pip install setuptools wheel psycopg2 gunicorn django~=4.2 ## First, bring dependencies specification and install them COPY ./backend/requirements requirements RUN --mount=type=cache,target=/root/.cache/uv \