From 66ff6b55ca577327506917209dcd6d9c7a89f04f Mon Sep 17 00:00:00 2001 From: Priya Sundaram Date: Wed, 2 Sep 2026 11:12:08 +0000 Subject: [PATCH 1/3] ci(devcontainer): Debian 13 Trixie + Python 3.14, Ruff settings, drop .vscode Bumps the base image to 3.14-trixie purely via devcontainer.json's build.args.VARIANT (the Dockerfile's ARG reads it), so the Dockerfile itself is untouched and keeps installing requirements + pipx pre-commit/ruff. - VARIANT 3.13-bookworm -> 3.14-trixie (Debian 13, latest stable CPython). - Replace removed python.linting.*/blackPath settings with Ruff format-on-save + fixAll/organizeImports (matches pre-commit and CI); add the Ruff extension. - Delete .vscode/settings.json: pre-commit/Ruff cover this now. Keeps the change to .json files only. --- .devcontainer/devcontainer.json | 30 +++++++++++++++++++----------- .vscode/settings.json | 5 ----- 2 files changed, 19 insertions(+), 16 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4951d5eb268d..fa3964fe2021 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,10 +4,14 @@ "dockerfile": "Dockerfile", "context": "..", "args": { - // Update 'VARIANT' to pick a Python version: 3, 3.11, 3.10, 3.9, 3.8 - // Append -bullseye or -buster to pin to an OS version. - // Use -bullseye variants on local on arm64/Apple Silicon. - "VARIANT": "3.13-bookworm" + // This repo tracks the latest-and-greatest CPython on the newest + // stable Debian. The devcontainer base images are published per + // CPython minor version on Debian 13 "Trixie" (3.11-trixie ... + // 3.14-trixie); there is no floating `3-trixie` tag, so bump this + // to the newest available when a new stable CPython ships. + // NOTE: these images do not publish free-threaded (`t`) variants, + // so 3.14t cannot be selected via the tag alone. + "VARIANT": "3.14-trixie" } }, @@ -20,16 +24,23 @@ // Set *default* container specific settings.json values on container create. "settings": { "python.defaultInterpreterPath": "/usr/local/bin/python", - "python.linting.enabled": true, - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", + // Formatting/linting is handled by Ruff (matches pre-commit and CI). + "editor.formatOnSave": true, + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff", + "editor.codeActionsOnSave": { + "source.fixAll": "explicit", + "source.organizeImports": "explicit" + } + }, "terminal.integrated.defaultProfile.linux": "zsh" }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ "ms-python.python", - "ms-python.vscode-pylance" + "ms-python.vscode-pylance", + "charliermarsh.ruff" ] } }, @@ -37,9 +48,6 @@ // Use 'forwardPorts' to make a list of ports inside the container available locally. // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "pip3 install --user -r requirements.txt", - // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "vscode" } diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index ef16fa1aa7ac..000000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "githubPullRequests.ignoredPullRequestBranches": [ - "master" - ] -} From 5cd4a8a95165240e2393e8f4cc9ce649cd44a551 Mon Sep 17 00:00:00 2001 From: priya-sundaram-dev Date: Wed, 2 Sep 2026 16:12:22 +0000 Subject: [PATCH 2/3] ci(devcontainer): use prebuilt image instead of broken Dockerfile build The devcontainer image build fails on main: the Dockerfile does `COPY requirements.txt`, but that file was removed when the repo moved its dependencies to pyproject.toml, so there is nothing to copy. Switch devcontainer.json to pull the upstream mcr.microsoft.com/devcontainers/python image and install pre-commit/ruff/uv in postCreateCommand. Fully within .json so it stays keeper-safe; the now-unused Dockerfile can be dropped in a follow-up once the keeper accepts the Dockerfile filename (#228). --- .devcontainer/devcontainer.json | 34 ++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fa3964fe2021..9f2f263a0724 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,21 +1,25 @@ { "name": "Python 3", - "build": { - "dockerfile": "Dockerfile", - "context": "..", - "args": { - // This repo tracks the latest-and-greatest CPython on the newest - // stable Debian. The devcontainer base images are published per - // CPython minor version on Debian 13 "Trixie" (3.11-trixie ... - // 3.14-trixie); there is no floating `3-trixie` tag, so bump this - // to the newest available when a new stable CPython ships. - // NOTE: these images do not publish free-threaded (`t`) variants, - // so 3.14t cannot be selected via the tag alone. - "VARIANT": "3.14-trixie" - } - }, - "postCreateCommand": "zsh .devcontainer/post_install", + // Use a prebuilt dev container image instead of building from a local + // Dockerfile. The repo migrated its dependencies to pyproject.toml, so the + // old Dockerfile's `COPY requirements.txt` step no longer had a file to copy + // and the image build failed. The upstream images already ship Python + a + // full toolchain, so pulling one is both faster and less to maintain. + // + // This repo tracks the latest-and-greatest CPython on the newest stable + // Debian. Images are published per CPython minor version on Debian 13 + // "Trixie" (3.11-trixie ... 3.14-trixie); bump this to the newest available + // when a new stable CPython ships. + // NOTE: these images do not publish free-threaded (`t`) variants, so 3.14t + // cannot be selected via the tag alone -- but the repo's `.python-version` + // pins 3.14t, and `uv run`/`uv sync` in the container honor it, so uv gives + // contributors free-threaded 3.14t regardless of the base tag. + "image": "mcr.microsoft.com/devcontainers/python:3.14-trixie", + + // Install the tools post_install and CI expect (pre-commit + ruff), plus uv + // for the free-threaded workflow above, then run the existing setup script. + "postCreateCommand": "pipx install pre-commit ruff uv && zsh .devcontainer/post_install", // Configure tool-specific properties. "customizations": { From 9d7b91af4edb2953f5e866b0f73552c969798c29 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 2 Sep 2026 21:46:53 +0200 Subject: [PATCH 3/3] Update .devcontainer/devcontainer.json --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9f2f263a0724..195901b3e1e7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ // cannot be selected via the tag alone -- but the repo's `.python-version` // pins 3.14t, and `uv run`/`uv sync` in the container honor it, so uv gives // contributors free-threaded 3.14t regardless of the base tag. - "image": "mcr.microsoft.com/devcontainers/python:3.14-trixie", + "image": "mcr.microsoft.com/devcontainers/python:latest", // Install the tools post_install and CI expect (pre-commit + ruff), plus uv // for the free-threaded workflow above, then run the existing setup script.