From 369d802066d083ca1872a4f4a709e66d1d124709 Mon Sep 17 00:00:00 2001 From: hermes Date: Mon, 9 Nov 2026 11:22:03 +1000 Subject: [PATCH] fix: build the image on Python 3.14, and fix the review findings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The image build failed on master: ERROR: Ignored the following versions that require a different python version: 4.19.0 Requires-Python >=3.11 ERROR: Could not find a version that satisfies the requirement pymongo==4.19.0 The base image was `python:3.10` but the pinned pymongo 4.19 needs Python >= 3.11. The image is now `python:3.14-slim` — the current stable release, so it is not carrying the CVEs fixed in 3.11, 3.12 and 3.13. All the runtime dependencies ship a cp314 wheel (pymongo included), so no compiler toolchain is needed. The old apt-get line installed libsasl2-dev, python-dev-is-python3, libldap2-dev and libssl-dev for packages that are no longer in the dependency list, so it is gone and the image is smaller. The build now asserts the interpreter version, so a base image change that breaks the pinned requirements fails the build with a clear message rather than a pip resolution error. Review findings, all from the independent review of this PR ------------------------------------------------------------ - Mongo indexes: the run metadata is always looked up by `beer_run_id` and the readings by `(beer_run_id, date)`. Both are now indexed. - Content-Security-Policy: the app serves only its own vendored assets, so a strict `default-src 'self'` policy is enforceable. Adding it required removing the inline `style=` attributes from the templates (they became `.mb-lg` / `.mt-lg` utility classes) and the one inline `", + body, re.S): + assert match.group(1).strip() == "", ( + f"{os.path.basename(path)} has an inline