From ac9a05fc25e1137564cfc7de86c190eac873ba51 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 23 May 2023 15:55:24 +0200 Subject: [PATCH] add warning --- dist/setup/index.js | 3 +++ src/setup-python.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dist/setup/index.js b/dist/setup/index.js index 0448f36d..7167da18 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -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})`); diff --git a/src/setup-python.ts b/src/setup-python.ts index 2f946578..e589d859 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -34,6 +34,9 @@ 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})`);