From bd6b4b6205c4dbad673328db7b31b7fab9e241c0 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Wed, 24 May 2023 14:37:35 +0200 Subject: [PATCH] Add warning for python 2.7 (#673) --- dist/setup/index.js | 3 +++ src/setup-python.ts | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/dist/setup/index.js b/dist/setup/index.js index 4433c62..a72f2d2 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -67612,6 +67612,9 @@ function run() { core.info(`Successfully set up PyPy ${installed.resolvedPyPyVersion} with Python (${installed.resolvedPythonVersion})`); } else { + if (version.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, updateEnvironment, checkLatest, allowPreReleases); pythonVersion = installed.version; core.info(`Successfully set up ${installed.impl} (${pythonVersion})`); diff --git a/src/setup-python.ts b/src/setup-python.ts index 69ea9d3..7e9725e 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -98,6 +98,11 @@ async function run() { `Successfully set up PyPy ${installed.resolvedPyPyVersion} with Python (${installed.resolvedPythonVersion})` ); } else { + if (version.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,