actions / actions/setup-python

Allow specifying a minimum version

Abierto
#1,131 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

feature request
Lenguaje dominante
TypeScript
Estrellas
2.2k
Forks
739
Merge medio
6 d 18 h
PR fusionados (30 d)
1

Descripción

Description:
I've written a utility script in Python for some of our internal reusable workflows, and it depends on some features added in 3.13. Currently on ubuntu-latest 3.12 is the default version, but 3.13 is available in the tool cache. This means that I can add a setup-python step in my composite action that will activate 3.13. However at some point in the future, 3.13 will become the default, then 3.14, and etc etc. When 3.14 is the default, I'm fine using 3.14 for my script. However my action will continue to be pinned to 3.13, downgrading the version of Python.

It would be nice to specify a minimum version (in my case 3.13). If the default version is less than the minimum version, it would do as it does now and activate (or download if it's not in the tool cache) version 3.13. If the default version is 3.13 or greater, it would simply not do anything.

Justification:
Python is useful for writing small glue scripts in workflows where the full capabilities of python version management aren't required, but it would be nice to be able to automatically use this action to ensure a minimum version is present on the runner, to enable these glue scripts to run easily without a lot of effort on the person building the workflow.

Are you willing to submit a PR?
Given some guidance on the flow of the existing code, I could potentially be able to work on adding this functionality myself.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza siguiendo el paso setup-python y su interacción con la caché de herramientas del runner, centrándote en cómo se selecciona la versión de Python predeterminada. Se considerará terminado cuando se pueda solicitar una versión mínima, las versiones predeterminadas más antiguas activen o descarguen esa versión y las versiones predeterminadas más nuevas se dejen sin cambios; añade cobertura para ambos casos si el flujo de pruebas existente lo permite.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
github-actions, python, typescript
Área
ci-cd, devops, tooling
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.