Drop Python 2 from PIO Core test

This commit is contained in:
Ivan Kravets
2021-01-18 18:15:15 +02:00
parent 1ec2e55322
commit 4e637ae58a
5 changed files with 7 additions and 8 deletions

View File

@ -8,7 +8,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [2.7, 3.7, 3.8] python-version: [3.6, 3.7, 3.8, 3.9]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@ -14,7 +14,6 @@ disable=
too-few-public-methods, too-few-public-methods,
useless-object-inheritance, useless-object-inheritance,
useless-import-alias, useless-import-alias,
fixme,
bad-option-value, bad-option-value,
; PY2 Compat ; PY2 Compat

View File

@ -41,7 +41,7 @@ from platformio.proc import where_is_program
# should hold the compilation database, otherwise, the file defaults to compile_commands.json, # should hold the compilation database, otherwise, the file defaults to compile_commands.json,
# which is the name that most clang tools search for by default. # which is the name that most clang tools search for by default.
# TODO: Is there a better way to do this than this global? Right now this exists so that the # Is there a better way to do this than this global? Right now this exists so that the
# emitter we add can record all of the things it emits, so that the scanner for the top level # emitter we add can record all of the things it emits, so that the scanner for the top level
# compilation database can access the complete list, and also so that the writer has easy # compilation database can access the complete list, and also so that the writer has easy
# access to write all of the files. But it seems clunky. How can the emitter and the scanner # access to write all of the files. But it seems clunky. How can the emitter and the scanner
@ -104,7 +104,7 @@ def makeEmitCompilationDbEntry(comstr):
__COMPILATIONDB_ENV=env, __COMPILATIONDB_ENV=env,
) )
# TODO: Technically, these next two lines should not be required: it should be fine to # Technically, these next two lines should not be required: it should be fine to
# cache the entries. However, they don't seem to update properly. Since they are quick # cache the entries. However, they don't seem to update properly. Since they are quick
# to re-generate disable caching and sidestep this problem. # to re-generate disable caching and sidestep this problem.
env.AlwaysBuild(entry) env.AlwaysBuild(entry)

View File

@ -67,9 +67,9 @@ def ensure_python3(raise_exception=True):
return compatible return compatible
raise UserSideException( raise UserSideException(
"Python 3.6 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 " "Please check a migration guide:\n"
"installation script:\n" "https://docs.platformio.org/en/latest/core/migration.html"
"https://docs.platformio.org/page/core/installation.html" "#drop-support-for-python-2-and-3-5"
) )

View File

@ -53,7 +53,7 @@ def on_platformio_start(ctx, force, caller):
click.secho( click.secho(
""" """
Python 2 and Python 3.5 are not compatible with PlatformIO Core 5.0. Python 2 and Python 3.5 are not compatible with PlatformIO Core 5.0.
Please check the migration guide on how to fix this warning message: Please check a migration guide on how to fix this warning message:
""", """,
fg="yellow", fg="yellow",
) )