8000 Add warning for python 2.7 on release/v2 (#675) · sarpen-quant/setup-python@e9aba2c · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

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

Appearance settings

Commit e9aba2c

Browse files
Add warning for python 2.7 on release/v2 (actions#675)
* add warning * remove ubuntu-18.04 * remove macos-10.15 * fix pypy3
1 parent 75f3110 commit e9aba2c

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

.github/workflows/test-pypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-latest]
21+
os: [macos-latest, windows-latest, ubuntu-latest]
2222
pypy:
2323
- 'pypy-2.7'
2424
- 'pypy-3.7'

.github/workflows/test-python.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
21+
os: [macos-latest, windows-latest, ubuntu-20.04]
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v2
@@ -38,7 +38,7 @@ jobs:
3838
strategy:
3939
fail-fast: false
4040
matrix:
41-
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
41+
os: [macos-latest, windows-latest, ubuntu-20.04]
4242
python: [3.5.4, 3.6.7, 3.7.5, 3.8.1]
4343
steps:
4444
- name: Checkout
@@ -68,7 +68,7 @@ jobs:
6868
strategy:
6969
fail-fast: false
7070
matrix:
71-
os: [macos-latest, windows-latest, ubuntu-18.04, ubuntu-20.04]
71+
os: [macos-latest, windows-latest, ubuntu-20.04]
7272
steps:
7373
- name: Checkout
7474
uses: actions/checkout@v2
@@ -97,17 +97,12 @@ jobs:
9797
strategy:
9898
fail-fast: false
9999
matrix:
100-
os: [macos-10.15, windows-2019, ubuntu-18.04, ubuntu-20.04]
100+
os: [macos-11, windows-2019, ubuntu-20.04]
101101
steps:
102102
- name: Checkout
103103
uses: actions/checkout@v2
104104

105105
- name: setup-python pypy3
106106
uses: ./
107107
with:
108-
python-version: 'pypy3'
109-
110-
- name: setup-python pypy2
111-
uses: ./
112-
with:
113-
python-version: 'pypy2'
108+
python-version: 'pypy-3.8'

dist/setup/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7010,6 +7010,9 @@ function run() {
70107010
try {
70117011
const version = core.getInput('python-version');
70127012
if (version) {
7013+
if (version.trim().startsWith('2')) {
7014+
core.warning('The support for python 2.7 will be removed on June 19. Related issue: https://github.com/actions/setup-python/issues/672');
7015+
}
70137016
let pythonVersion;
70147017
const arch = core.getInput('architecture') || os.arch();
70157018
if (isPyPyVersion(version)) {

src/setup-python.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ async function run() {
2828
try {
2929
const version = core.getInput('python-version');
3030
if (version) {
31+
if (version.trim().startsWith('2')) {
32+
core.warning(
33+
'The support for python 2.7 will be removed on June 19. Related issue: https://github.com/actions/setup-python/issues/672'
34+
);
35+
}
3136
let pythonVersion: string;
3237
const arch: string = core.getInput('architecture') || os.arch();
3338
if (isPyPyVersion(version)) {

0 commit comments

Comments
 (0)
0