mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-09-28 13:33:11 +08:00
* ci: try Python 3.15 release candidate (DRAFT) Point the repo's .python-version at 3.15 so every workflow that reads python-version-file runs on the 3.15 release candidate (allow-prereleases is already enabled across all workflows). Add the 3.15 trove classifier and bump scipy>=1.18.1, which is the first scipy with cp315 manylinux wheels, so uv installs it as a wheel rather than building from source. Rebuilt on current master: the earlier version of this PR edited the per-workflow `python-version: 3.14` lines, but master has since moved the interpreter to a single `.python-version` file, so the change is now a one-line switch there. Purpose is to document which dependencies/tests are not yet 3.15-ready. Must stay DRAFT until Python 3.15 GA (early October). Requested in #15081. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Upgrade to Python 3.15t --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
58 lines
2.3 KiB
JSON
58 lines
2.3 KiB
JSON
{
|
|
"name": "Python 3",
|
|
|
|
// 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.15-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.15t
|
|
// cannot be selected via the tag alone -- but the repo's `.python-version`
|
|
// pins 3.15t, and `uv run`/`uv sync` in the container honor it, so uv gives
|
|
// contributors free-threaded 3.15t regardless of the base tag.
|
|
"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.
|
|
"postCreateCommand": "pipx install pre-commit ruff uv && zsh .devcontainer/post_install",
|
|
|
|
// Configure tool-specific properties.
|
|
"customizations": {
|
|
// Configure properties specific to VS Code.
|
|
"vscode": {
|
|
// Set *default* container specific settings.json values on container create.
|
|
"settings": {
|
|
"python.defaultInterpreterPath": "/usr/local/bin/python",
|
|
// 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",
|
|
"charliermarsh.ruff"
|
|
]
|
|
}
|
|
},
|
|
|
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
// "forwardPorts": [],
|
|
|
|
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
|
"remoteUser": "vscode"
|
|
}
|