Skip to content

Fix pip cache error handling on Windows.#1040

Merged
HarithaVattikuti merged 3 commits into
actions:mainfrom
priyagupta108:fix-windows-pip-cache
Jun 23, 2026
Merged

Fix pip cache error handling on Windows.#1040
HarithaVattikuti merged 3 commits into
actions:mainfrom
priyagupta108:fix-windows-pip-cache

Conversation

@priyagupta108

Copy link
Copy Markdown
Contributor

Description:
This pull request improves error handling for the pip cache directories on Windows.

Related issue:
#1034

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@priyagupta108 priyagupta108 requested a review from a team as a code owner February 21, 2025 10:29
@priyagupta108 priyagupta108 self-assigned this Feb 21, 2025
priya-kinthali
priya-kinthali previously approved these changes Feb 27, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request adjusts how setup-python determines the pip cache directory on Windows so that pip warnings written to stderr (notably newer pip deprecation warnings) don’t incorrectly fail caching.

Changes:

  • Initialize Windows pip-cache exit status as success by default, avoiding false failures when pip emits warnings on stderr.
  • Add Windows-specific try/catch around pip cache dir execution to handle true failures more explicitly (and update the built dist/ output accordingly).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/cache-distributions/pip-cache.ts Updates Windows pip cache directory detection to avoid treating stderr warnings as failures.
dist/setup/index.js Regenerated bundled output reflecting the updated Windows pip cache logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cache-distributions/pip-cache.ts
Comment thread src/cache-distributions/pip-cache.ts
@HarithaVattikuti HarithaVattikuti merged commit ece7cb0 into actions:main Jun 23, 2026
1400 of 1410 checks passed
ajgon pushed a commit to deedee-ops/schemas that referenced this pull request Jun 24, 2026
…0) (#5)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-python](https://github.com/actions/setup-python) | action | minor | `v6.2.0` → `v6.3.0` |

---

### Release Notes

<details>
<summary>actions/setup-python (actions/setup-python)</summary>

### [`v6.3.0`](https://github.com/actions/setup-python/releases/tag/v6.3.0)

[Compare Source](actions/setup-python@v6.2.0...v6.3.0)

#### What's Changed

##### Enhancement

- Add RHEL support and include Linux distro in cache keys by [@&#8203;priyagupta108](https://github.com/priyagupta108) in [#&#8203;1323](actions/setup-python#1323)
- Fix pip cache error handling on Windows by [@&#8203;priyagupta108](https://github.com/priyagupta108) in [#&#8203;1040](actions/setup-python#1040)

##### Dependency update

- Upgrade minimatch from 3.1.2 to 3.1.5 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;1281](actions/setup-python#1281)
- Upgrade actions dependencies by [@&#8203;gowridurgad](https://github.com/gowridurgad) with [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;1303](actions/setup-python#1303)
- Upgrade [@&#8203;actions/cache](https://github.com/actions/cache) to 5.1.0, log cache write denied by [@&#8203;jasongin](https://github.com/jasongin) in [#&#8203;1324](actions/setup-python#1324)
- Upgrade dependency versions and test workflow configuration by [@&#8203;HarithaVattikuti](https://github.com/HarithaVattikuti) in [#&#8203;1322](actions/setup-python#1322)

##### Documentation

- Update advanced-usage.md by [@&#8203;Dunky-Z](https://github.com/Dunky-Z) in [#&#8203;811](actions/setup-python#811)

#### New Contributors

- [@&#8203;gowridurgad](https://github.com/gowridurgad) with [@&#8203;Copilot](https://github.com/Copilot) made their first contribution in [#&#8203;1303](actions/setup-python#1303)
- [@&#8203;jasongin](https://github.com/jasongin) made their first contribution in [#&#8203;1324](actions/setup-python#1324)
- [@&#8203;Dunky-Z](https://github.com/Dunky-Z) made their first contribution in [#&#8203;811](actions/setup-python#811)

**Full Changelog**: <actions/setup-python@v6...v6.3.0>

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/Warsaw)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNDAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI0MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: https://git.ajgon.casa/deedee/schemas/pulls/5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants