setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

Ability to set desired version of pip, or to not update it at all

Open bodgit opened this issue 1 year ago • 4 comments

Description:

It would be useful if there was a way to either set the desired version of pip, or to stop it from being updated to the latest version.

Justification:

I need to make use of the PIP_USE_FEATURE=truststore ability which is currently broken in the latest version 24.1 of pip, but worked fine in 24.0 and earlier.

My Python workflows are now broken until a new version of pip is made available as I can't seemingly stop this action from always updating pip to the latest version.

Are you willing to submit a PR?

Yes.

bodgit avatar Jun 25 '24 08:06 bodgit

https://github.com/pypa/pip/issues/12779 for the pip bug affecting 24.1.

bodgit avatar Jun 25 '24 08:06 bodgit

Hello @bodgit, Thank you for creating this issue and we will look into it :)

aparnajyothi-y avatar Jun 25 '24 14:06 aparnajyothi-y

+1 for the need, currently overcoming by having pip install --upgrade pip==24.0 right after python setup action

Hello Everyone, Thank you for your feature request. After careful consideration, An option to set a specific pip version can be implemented as part of the future enhancements, but it will be an opt-in feature. However, we will not allow users to completely prevent pip from updating. By default, we will always support the latest version of pip. If users choose to use an older version, they will be responsible for any breaking changes or security issues that may arise, and we will make this clear in our documentation.

We hope this solution strikes a balance between offering flexibility and maintaining the stability of workflows. We appreciate your understanding and encourage you to reach out if you have any further questions!

aparnajyothi-y avatar Mar 19 '25 07:03 aparnajyothi-y

Hello @bodgit, Please let us know in case of any concerns/clarifications on the above.

aparnajyothi-y avatar Apr 03 '25 13:04 aparnajyothi-y

Hello @bodgit, Please let us know in case of any concerns/clarifications on the above.

aparnajyothi-y avatar Apr 11 '25 12:04 aparnajyothi-y

Hi, We’ve opened PR #1129, which introduces the ability to set a specific pip version.
Your feedback and review would be greatly appreciated. Thanks in advance!

priyagupta108 avatar Jun 12 '25 07:06 priyagupta108

Hi, Just a gentle reminder, when there’s a moment, any review or feedback on PR #1129 would be appreciated. Thanks!

gowridurgad avatar Jun 17 '25 07:06 gowridurgad

Hello 👋 , We’re happy to share that this feature has now been implemented in PR #1129! This update adds support for specifying a desired pip version using the new pip-version input in actions/setup-python. To utilize this feature, you can use the actions/setup-python@main branch in your workflows for now, and the changes will be reflected in the upcoming releases. We’ll be closing this issue. Please feel free to reach out if you have any further concerns or need additional assistance. Thanks for your suggestion and feedback!

priyagupta108 avatar Jun 23 '25 07:06 priyagupta108