Skip to content

Commit

Permalink
Drop support for Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jan 27, 2021
1 parent bd75c3e commit 493a33e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-16.04, windows-latest, macos-latest]
python-version: [2.7, 3.7]
python-version: [3.7]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down
18 changes: 2 additions & 16 deletions platformio/maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,17 @@


def on_platformio_start(ctx, force, caller):
ensure_python3(raise_exception=True)

app.set_session_var("command_ctx", ctx)
app.set_session_var("force_option", force)
set_caller(caller)
telemetry.on_command()

if PlatformioCLI.in_silence():
return

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
if PlatformioCLI.in_silence():
Expand Down
4 changes: 0 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@
author_email=__email__,
url=__url__,
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),
packages=find_packages(exclude=["tests.*", "tests"]) + ["scripts"],
package_data={
Expand All @@ -87,7 +84,6 @@
"Operating System :: OS Independent",
"Programming Language :: C",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Topic :: Software Development",
"Topic :: Software Development :: Build Tools",
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
# limitations under the License.

[tox]
envlist = py27,py37,py38,py39
envlist = py36,py37,py38,py39

[testenv]
passenv = *
usedevelop = True
deps =
py36,py37,py38,py39: black
black
isort
pylint
pytest
Expand Down

0 comments on commit 493a33e

Please sign in to comment.