Compare commits

...

4 Commits

Author SHA1 Message Date
Priya Gupta
14fe370e3b
Merge 91b95c4e89 into e348410e00 2025-04-11 13:36:27 -05:00
aparnajyothi-y
e348410e00
Remove Ubuntu 20.04 from workflows due to deprecation from 2025-04-15 (#1065)
Some checks failed
Validate Python e2e / check-latest (macos-13, 3.10) (push) Has been cancelled
Validate Python e2e / check-latest (macos-13, 3.11) (push) Has been cancelled
Validate Python e2e / check-latest (macos-13, 3.12) (push) Has been cancelled
Validate Python e2e / check-latest (macos-13, 3.13) (push) Has been cancelled
Validate Python e2e / check-latest (macos-13, 3.9) (push) Has been cancelled
Validate Python e2e / check-latest (macos-latest, 3.10) (push) Has been cancelled
Validate Python e2e / check-latest (macos-latest, 3.11) (push) Has been cancelled
Validate Python e2e / check-latest (macos-latest, 3.12) (push) Has been cancelled
Validate Python e2e / check-latest (macos-latest, 3.13) (push) Has been cancelled
Validate Python e2e / check-latest (macos-latest, 3.9) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-22.04-arm, 3.10) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-22.04-arm, 3.11) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-22.04-arm, 3.12) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-22.04-arm, 3.13) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-22.04-arm, 3.9) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-24.04-arm, 3.10) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-24.04-arm, 3.11) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-24.04-arm, 3.12) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-24.04-arm, 3.13) (push) Has been cancelled
Validate Python e2e / check-latest (ubuntu-24.04-arm, 3.9) (push) Has been cancelled
Validate Python e2e / check-latest (windows-latest, 3.10) (push) Has been cancelled
Validate Python e2e / check-latest (windows-latest, 3.11) (push) Has been cancelled
Validate Python e2e / check-latest (windows-latest, 3.12) (push) Has been cancelled
Validate Python e2e / check-latest (windows-latest, 3.13) (push) Has been cancelled
Validate Python e2e / check-latest (windows-latest, 3.9) (push) Has been cancelled
Validate Python e2e / setup-python-multiple-python-versions (macos-13) (push) Has been cancelled
Validate Python e2e / setup-python-multiple-python-versions (macos-latest) (push) Has been cancelled
Validate Python e2e / setup-python-multiple-python-versions (ubuntu-22.04-arm) (push) Has been cancelled
Validate Python e2e / setup-python-multiple-python-versions (ubuntu-24.04-arm) (push) Has been cancelled
Validate Python e2e / setup-python-multiple-python-versions (windows-latest) (push) Has been cancelled
* remove ubuntu-20.04

* check failure fix

* remove spaces

* npm run format-check
2025-04-11 13:36:23 -05:00
Priyagupta108
91b95c4e89 Add comments 2025-02-25 14:40:22 +05:30
Priyagupta108
5e5f66be2b Add error handling for Windows 'pip cache dir' execution 2025-02-21 14:56:34 +05:30
7 changed files with 27 additions and 33 deletions

View File

@ -78,6 +78,8 @@ jobs:
python-version: pypy-3.11-v7.x
- os: ubuntu-22.04
python-version: pypy-3.11-v7.x
- os: ubuntu-22.04-arm
python-version: pypy-3.10-v7.x
- os: ubuntu-22.04-arm
python-version: pypy-3.11-v7.x
steps:

View File

@ -19,7 +19,6 @@ jobs:
matrix:
operating-system:
[
ubuntu-20.04,
windows-latest,
ubuntu-22.04,
ubuntu-22.04-arm,

View File

@ -21,7 +21,6 @@ jobs:
os:
[
macos-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
@ -77,7 +76,6 @@ jobs:
os:
[
macos-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,

View File

@ -24,7 +24,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
@ -142,7 +141,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
@ -177,7 +175,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,
@ -220,7 +217,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
ubuntu-24.04-arm,

View File

@ -24,7 +24,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -69,7 +68,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -117,7 +115,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -163,7 +160,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -214,7 +210,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -265,7 +260,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -300,7 +294,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,
@ -419,7 +412,6 @@ jobs:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
ubuntu-22.04-arm,
macos-13,

22
dist/setup/index.js vendored
View File

@ -96158,24 +96158,28 @@ class PipCache extends cache_distributor_1.default {
}
getCacheGlobalDirectories() {
return __awaiter(this, void 0, void 0, function* () {
let exitCode = 1;
let exitCode = 0;
let stdout = '';
let stderr = '';
// Add temporary fix for Windows
// On windows it is necessary to execute through an exec
// because the getExecOutput gives a non zero code or writes to stderr for pip 22.0.2,
// On Windows, it is necessary to execute through an exec
// because the getExecOutput gives a non-zero code or writes to stderr for pip 22.0.2,
// or spawn must be started with the shell option enabled for getExecOutput
// Related issue: https://github.com/actions/setup-python/issues/328
if (utils_1.IS_WINDOWS) {
const execPromisify = util_1.default.promisify(child_process.exec);
({ stdout: stdout, stderr: stderr } = yield execPromisify('pip cache dir'));
try {
({ stdout, stderr } = yield execPromisify('pip cache dir'));
}
catch (err) {
// Pip outputs warnings to stderr (e.g., --no-python-version-warning flag deprecation warning), causing false failure detection
// Related issue: https://github.com/actions/setup-python/issues/1034
// If an error occurs, set exitCode to 1 to indicate failure
exitCode = 1;
}
}
else {
({
stdout: stdout,
stderr: stderr,
exitCode: exitCode
} = yield exec.getExecOutput('pip cache dir'));
({ stdout, stderr, exitCode } = yield exec.getExecOutput('pip cache dir'));
}
if (exitCode && stderr) {
throw new Error(`Could not get cache folder path for pip package manager`);

View File

@ -21,24 +21,27 @@ class PipCache extends CacheDistributor {
}
protected async getCacheGlobalDirectories() {
let exitCode = 1;
let exitCode = 0;
let stdout = '';
let stderr = '';
// Add temporary fix for Windows
// On windows it is necessary to execute through an exec
// because the getExecOutput gives a non zero code or writes to stderr for pip 22.0.2,
// On Windows, it is necessary to execute through an exec
// because the getExecOutput gives a non-zero code or writes to stderr for pip 22.0.2,
// or spawn must be started with the shell option enabled for getExecOutput
// 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'));
try {
({stdout, stderr} = await execPromisify('pip cache dir'));
} catch (err) {
// Pip outputs warnings to stderr (e.g., --no-python-version-warning flag deprecation warning), causing false failure detection
// Related issue: https://github.com/actions/setup-python/issues/1034
// If an error occurs, set exitCode to 1 to indicate failure
exitCode = 1;
}
} else {
({
stdout: stdout,
stderr: stderr,
exitCode: exitCode
} = await exec.getExecOutput('pip cache dir'));
({stdout, stderr, exitCode} = await exec.getExecOutput('pip cache dir'));
}
if (exitCode && stderr) {