From 52db7580c5a05ee7ff40b89a9a1fd529e2624f56 Mon Sep 17 00:00:00 2001 From: priya-sundaram-dev Date: Wed, 2 Sep 2026 10:42:09 +0000 Subject: [PATCH] ci(devcontainer): move to Debian 13 Trixie + Python 3.14, modernize VS Code settings, drop .vscode --- .devcontainer/Dockerfile | 11 +++++++---- .devcontainer/devcontainer.json | 26 +++++++++++++++----------- .vscode/settings.json | 5 ----- 3 files changed, 22 insertions(+), 20 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index edee3bc4febb..2f421f436028 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,10 @@ -# https://github.com/microsoft/vscode-dev-containers/blob/main/containers/python-3/README.md -ARG VARIANT=3.13-bookworm -FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT} +# https://github.com/devcontainers/images/tree/main/src/python +# Debian 13 "Trixie" base. Python 3.14 is the current latest-stable CPython; +# the trixie image tags are versioned (there is no floating `3-trixie` alias yet), +# so we pin the newest available: 3.14-trixie. +ARG VARIANT=3.14-trixie +FROM mcr.microsoft.com/devcontainers/python:${VARIANT} COPY requirements.txt /tmp/pip-tmp/ RUN python3 -m pip install --upgrade pip \ && python3 -m pip install --no-cache-dir -r /tmp/pip-tmp/requirements.txt \ - && pipx install pre-commit ruff + && pipx install pre-commit ruff uv diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4951d5eb268d..3b1d54118a20 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,10 +4,11 @@ "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. The Debian 13 + // "Trixie" images are published per minor version (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. + "VARIANT": "3.14-trixie" } }, @@ -20,16 +21,22 @@ // 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", + "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 +44,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" - ] -}