Add fix for Windows caching of pip by dmitry-shibanov · Pull Request #332 · actions/setup-python

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@dmitry-shibanov

Copy link

Contributor

Description:
In scope of this pull request we add temporary fix for Windows caching.
Related issue: #328

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.
// Related issue: https://github.com/actions/setup-python/issues/328
if (IS_WINDOWS) {
const execPromisify = utils.promisify(child_process.exec);
({stdout: stdout, stderr: stderr} = await execPromisify('pip cache dir'));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When new pip versions get released, this call outputs the upgrade hint to stderr, which in turn gets misinterpreted as an error in the conditional below, causing this action to fail.

See #1034 (comment).

tdfacer pushed a commit to ifit/setup-python that referenced this pull request

Oct 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@maxim-lobanov maxim-lobanov maxim-lobanov approved these changes

+3 more reviewers

@webknjaz webknjaz webknjaz left review comments

@vsafonkin vsafonkin vsafonkin approved these changes

@MaksimZhukov MaksimZhukov MaksimZhukov approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@dmitry-shibanov @webknjaz @vsafonkin @maxim-lobanov @MaksimZhukov