devcontainers / features

A collection of Dev Container Features managed by Dev Container spec maintainers. See https://github.com/devcontainers/feature-starter to publish your own
https://containers.dev/features
MIT License
920 stars 371 forks source link

Allow to set versions of Python tools #1113

Closed SKairinos closed 1 month ago

SKairinos commented 2 months ago

When using the official python feature, you can specify which tools to install BUT not the version of those tools. Please add the ability to set version numbers.

You use ":" as a delimiter.

{
"toolsToInstall": "black:1.1.1,pipenv:2.2.2"
}
koralowiec commented 1 month ago

Hi @SKairinos

It seems that specifying the package version is already supported. You can use == as the "delimiter"

For example, this devcontainer.json will provide you devcontainer with black and pipenv in the specified versions:

{
    "name": "Debian",
    "image": "mcr.microsoft.com/devcontainers/base:bullseye",
    "features": {
        "ghcr.io/devcontainers/features/python:1": {
            "toolsToInstall": "black==24.4.2,pipenv==2024.0.1"
        }
    }
}

image

bamurtaugh commented 1 month ago

Thanks for the discussion! Going to close this issue as it seems like it's resolved, but please lmk if there's anything outstanding!