actions / actions/setup-python

Allow specifying a minimum version

Ouverte
#1,131 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

feature request
Langage dominant
TypeScript
Étoiles
2.2k
Forks
739
Merge moyen
6 j 18 h
PR mergées (30 j)
1

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par suivre l'étape setup-python et son interaction avec le cache d'outils du runner, en vous concentrant sur la manière dont la version Python par défaut est sélectionnée. Le travail sera considéré comme terminé lorsqu'il sera possible de demander une version minimale, que les versions par défaut plus anciennes activeront ou téléchargeront cette version et que les versions par défaut plus récentes resteront inchangées ; ajoutez une couverture pour les deux cas si le flux de test existant le permet.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
github-actions, python, typescript
Domaine
ci-cd, devops, tooling
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
38/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.