Show a warning message about deprecated support for Python 2 and Python 3.5

This commit is contained in:
Ivan Kravets
2020-12-26 16:10:07 +02:00
parent e29941e3eb
commit ce4c45a075
5 changed files with 29 additions and 8 deletions

View File

@@ -62,10 +62,11 @@ def ci_strings_are_equal(a, b):
def ensure_python3(raise_exception=True):
if not raise_exception or not PY2:
return not PY2
compatible = sys.version_info >= (3, 6)
if not raise_exception or compatible:
return compatible
raise UserSideException(
"Python 3.5 or later is required for this operation. \n"
"Python 3.6 or later is required for this operation. \n"
"Please install the latest Python 3 and reinstall PlatformIO Core using "
"installation script:\n"
"https://docs.platformio.org/page/core/installation.html"