Skip to content

Commit

Permalink
Add warning for python 2.7 on release/v3 (#674)
Browse files Browse the repository at this point in the history
* add warning

* npm run format

* remove ubuntu-18.04
  • Loading branch information
dmitry-shibanov committed May 30, 2023
1 parent 48e4ac7 commit 3542bca
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-pypy.yml
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-latest]
os: [macos-latest, windows-latest, ubuntu-latest]
pypy:
- 'pypy-2.7'
- 'pypy-3.7'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-python.yml
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
os: [macos-latest, windows-latest, ubuntu-20.04]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -38,7 +38,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
os: [macos-latest, windows-latest, ubuntu-20.04]
python: [3.5.4, 3.6.7, 3.7.5, 3.8.1]
steps:
- name: Checkout
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
os: [macos-latest, windows-latest, ubuntu-20.04]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions dist/setup/index.js
Expand Up @@ -6479,6 +6479,9 @@ function run() {
core.info(`Successfully setup PyPy ${installed.resolvedPyPyVersion} with Python (${installed.resolvedPythonVersion})`);
}
else {
if (version.trim().startsWith('2')) {
core.warning('The support for python 2.7 will be removed on June 19. Related issue: https://github.com/actions/setup-python/issues/672');
}
const installed = yield finder.useCpythonVersion(version, arch);
pythonVersion = installed.version;
core.info(`Successfully setup ${installed.impl} (${pythonVersion})`);
Expand Down
5 changes: 5 additions & 0 deletions src/setup-python.ts
Expand Up @@ -34,6 +34,11 @@ async function run() {
`Successfully setup PyPy ${installed.resolvedPyPyVersion} with Python (${installed.resolvedPythonVersion})`
);
} else {
if (version.trim().startsWith('2')) {
core.warning(
'The support for python 2.7 will be removed on June 19. Related issue: https://github.com/actions/setup-python/issues/672'
);
}
const installed = await finder.useCpythonVersion(version, arch);
pythonVersion = installed.version;
core.info(`Successfully setup ${installed.impl} (${pythonVersion})`);
Expand Down

0 comments on commit 3542bca

Please sign in to comment.