Skip to content

python-version ignored when cache: 'pip' is set #1071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 6 tasks
nisbet-hubbard opened this issue Mar 31, 2025 · 3 comments
Closed
2 of 6 tasks

python-version ignored when cache: 'pip' is set #1071

nisbet-hubbard opened this issue Mar 31, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@nisbet-hubbard
Copy link

Description:
We observed that when cache: 'pip' is set, the value of python-version is ignored & the latest version is used instead.

Action version:
v5

Platform:

  • Ubuntu
  • macOS
  • Windows
  • RHEL

Runner type:

  • Hosted
  • Self-hosted

Tools version:

3.10
Repro steps:

- uses: actions/setup-python@v5
   with:
     python-version: '3.10'
     cache: 'pip'

Expected behavior:
Is this the expected behaviour?

Actual behavior:

Run actions/setup-python@v5
  with:
    python-version: 3.13
    cache: pip
    check-latest: false
    token: ***
    update-environment: true
    allow-prereleases: false
    freethreaded: false
  env:
    GITHUB_PAGES: true
Installed versions
  Successfully set up CPython (3.13.2)
@nisbet-hubbard nisbet-hubbard added bug Something isn't working needs triage labels Mar 31, 2025
@priya-kinthali
Copy link
Contributor

Hello @nisbet-hubbard 👋,
Thank you for reporting this issue. We will investigate it and get back to you as soon as we have some feedback.

@priya-kinthali priya-kinthali self-assigned this Mar 31, 2025
@priya-kinthali
Copy link
Contributor

Hello @nisbet-hubbard👋,
The python-version input in the setup-python action is intended to specify the exact version of Python to be set up. However, there appears to be a discrepancy between the python-version input value in your repro steps and the actual behaviour logs. To help resolve this, please check if the python-version input is correctly specified and ensure that there are no other parts of your workflow that might be overriding this value. It’s also worth verifying that there are no conflicting settings elsewhere in your configuration.

We have tested this on our end and confirmed that the specified python-version is correctly set up even with cache: 'pip’, as shown in the screenshots below:


Image Image


If the issue persists, kindly share your workflow or a minimal repository link that demonstrates the issue. That would help us better understand and address the situation more effectively.

Thank you!

@nisbet-hubbard
Copy link
Author

Thanks! I’ll reopen this if we observe the discrepancy again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants