mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-01 02:54:25 +02:00
Drop support for Python 2
This commit is contained in:
2
.github/workflows/examples.yml
vendored
2
.github/workflows/examples.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-16.04, windows-latest, macos-latest]
|
os: [ubuntu-16.04, windows-latest, macos-latest]
|
||||||
python-version: [2.7, 3.7]
|
python-version: [3.7]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@@ -40,6 +40,8 @@ from platformio.proc import is_container
|
|||||||
|
|
||||||
|
|
||||||
def on_platformio_start(ctx, force, caller):
|
def on_platformio_start(ctx, force, caller):
|
||||||
|
ensure_python3(raise_exception=True)
|
||||||
|
|
||||||
app.set_session_var("command_ctx", ctx)
|
app.set_session_var("command_ctx", ctx)
|
||||||
app.set_session_var("force_option", force)
|
app.set_session_var("force_option", force)
|
||||||
set_caller(caller)
|
set_caller(caller)
|
||||||
@@ -47,24 +49,8 @@ def on_platformio_start(ctx, force, caller):
|
|||||||
|
|
||||||
if PlatformioCLI.in_silence():
|
if PlatformioCLI.in_silence():
|
||||||
return
|
return
|
||||||
|
|
||||||
after_upgrade(ctx)
|
after_upgrade(ctx)
|
||||||
|
|
||||||
if not ensure_python3(raise_exception=False):
|
|
||||||
click.secho(
|
|
||||||
"""
|
|
||||||
Python 2 and Python 3.5 are not compatible with PlatformIO Core 5.0.
|
|
||||||
Please check a migration guide on how to fix this warning message:
|
|
||||||
""",
|
|
||||||
fg="yellow",
|
|
||||||
)
|
|
||||||
click.secho(
|
|
||||||
"https://docs.platformio.org/en/latest/core/migration.html"
|
|
||||||
"#drop-support-for-python-2-and-3-5",
|
|
||||||
fg="blue",
|
|
||||||
)
|
|
||||||
click.echo("")
|
|
||||||
|
|
||||||
|
|
||||||
def on_platformio_end(ctx, result): # pylint: disable=unused-argument
|
def on_platformio_end(ctx, result): # pylint: disable=unused-argument
|
||||||
if PlatformioCLI.in_silence():
|
if PlatformioCLI.in_silence():
|
||||||
|
4
setup.py
4
setup.py
@@ -58,9 +58,6 @@ setup(
|
|||||||
author_email=__email__,
|
author_email=__email__,
|
||||||
url=__url__,
|
url=__url__,
|
||||||
license=__license__,
|
license=__license__,
|
||||||
python_requires=", ".join(
|
|
||||||
[">=2.7", "!=3.0.*", "!=3.1.*", "!=3.2.*", "!=3.3.*", "!=3.4.*"]
|
|
||||||
),
|
|
||||||
install_requires=minimal_requirements + ([] if PY2 else home_requirements),
|
install_requires=minimal_requirements + ([] if PY2 else home_requirements),
|
||||||
packages=find_packages(exclude=["tests.*", "tests"]) + ["scripts"],
|
packages=find_packages(exclude=["tests.*", "tests"]) + ["scripts"],
|
||||||
package_data={
|
package_data={
|
||||||
@@ -87,7 +84,6 @@ setup(
|
|||||||
"Operating System :: OS Independent",
|
"Operating System :: OS Independent",
|
||||||
"Programming Language :: C",
|
"Programming Language :: C",
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
"Programming Language :: Python :: 2",
|
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Topic :: Software Development",
|
"Topic :: Software Development",
|
||||||
"Topic :: Software Development :: Build Tools",
|
"Topic :: Software Development :: Build Tools",
|
||||||
|
4
tox.ini
4
tox.ini
@@ -13,13 +13,13 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py27,py37,py38,py39
|
envlist = py36,py37,py38,py39
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
passenv = *
|
passenv = *
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
deps =
|
deps =
|
||||||
py36,py37,py38,py39: black
|
black
|
||||||
isort
|
isort
|
||||||
pylint
|
pylint
|
||||||
pytest
|
pytest
|
||||||
|
Reference in New Issue
Block a user