From e5940673d7a8471e153c8446a97fcb73054702c2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 25 Apr 2024 11:41:53 +0300 Subject: [PATCH 01/34] Bump version to 6.1.16a1 --- HISTORY.rst | 3 +++ platformio/__init__.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 33301fca1e..3358dd3f76 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -18,6 +18,9 @@ Unlock the true potential of embedded software development with PlatformIO's collaborative ecosystem, embracing declarative principles, test-driven methodologies, and modern toolchains for unrivaled success. +6.1.16 (2024-??-??) +~~~~~~~~~~~~~~~~~~~ + 6.1.15 (2024-04-25) ~~~~~~~~~~~~~~~~~~~ diff --git a/platformio/__init__.py b/platformio/__init__.py index 878e6329d7..7c58c5b231 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, 15) +VERSION = (6, 1, "16a1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From ff364610c5f98d2f03b7aad2f9dab5a4bd1a89fa Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 7 May 2024 22:22:26 +0300 Subject: [PATCH 02/34] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 0125f8d5be..ecee43a23c 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 0125f8d5bec0e906ed04aba5dcd0d70ad794b30f +Subproject commit ecee43a23ccee38db6eb153cc87f728fe854c0bc From 4075789a32ff09dd2a1615b986504d40e80e5f84 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 10 May 2024 12:45:07 +0300 Subject: [PATCH 03/34] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index ecee43a23c..8afdd0acec 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit ecee43a23ccee38db6eb153cc87f728fe854c0bc +Subproject commit 8afdd0acecefe13bef953a9412f01ced4ccf139b From 9899547b73fb15bafbb2e1fb37011874ef4b05a9 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 24 May 2024 09:03:35 +0300 Subject: [PATCH 04/34] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 8afdd0acec..e7a00d7926 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 8afdd0acecefe13bef953a9412f01ced4ccf139b +Subproject commit e7a00d7926cd19e8fc056dd77b7ca7a08bfa0c22 From 8e21259222c593a467efe334a55b5d9cc7043e1b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 24 May 2024 09:04:00 +0300 Subject: [PATCH 05/34] Disable macOS runner for Pyrhon 3.6, 3.7 --- .github/workflows/core.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index c82438d24a..1c2380ca01 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -9,6 +9,9 @@ jobs: matrix: os: [ubuntu-20.04, windows-latest, macos-latest] python-version: ["3.6", "3.7", "3.11", "3.12"] + exclude: + - os: macos-latest + - python-version: ["3.6", "3.7"] runs-on: ${{ matrix.os }} From fd1333f031a5f1c1a4719cf777a3ebcbbc245ce3 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 24 May 2024 09:25:30 +0300 Subject: [PATCH 06/34] Update SPDX licenses to 3.24.0 --- platformio/package/manifest/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/package/manifest/schema.py b/platformio/package/manifest/schema.py index c1d22ab59b..47efae593b 100644 --- a/platformio/package/manifest/schema.py +++ b/platformio/package/manifest/schema.py @@ -276,7 +276,7 @@ def validate_license(self, value): @staticmethod @memoized(expire="1h") def load_spdx_licenses(): - version = "3.23" + version = "3.24.0" spdx_data_url = ( "https://raw.githubusercontent.com/spdx/license-list-data/" f"v{version}/json/licenses.json" From 7cf8d1d6961761eab681d49eea7fbafae0889186 Mon Sep 17 00:00:00 2001 From: valeros Date: Mon, 3 Jun 2024 15:06:46 +0300 Subject: [PATCH 07/34] Exclude Python 3.6 and 3.7 from CI matrix for MacOS --- .github/workflows/core.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 1c2380ca01..be8632b360 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -11,7 +11,9 @@ jobs: python-version: ["3.6", "3.7", "3.11", "3.12"] exclude: - os: macos-latest - - python-version: ["3.6", "3.7"] + python-version: "3.6" + - os: macos-latest + python-version: "3.7" runs-on: ${{ matrix.os }} From 781114f02682ea331a9ba6910365dfbb2d9f7b4e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 30 Jun 2024 12:44:48 +0300 Subject: [PATCH 08/34] Update deps --- platformio/dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/dependencies.py b/platformio/dependencies.py index 5fd40a1d3a..648f0d4a7c 100644 --- a/platformio/dependencies.py +++ b/platformio/dependencies.py @@ -45,7 +45,7 @@ def get_pip_dependencies(): # PIO Home requirements "ajsonrpc == 1.2.*", "starlette >=0.19, <0.38", - "uvicorn %s" % ("== 0.16.0" if PY36 else ">=0.16, <0.30"), + "uvicorn %s" % ("== 0.16.0" if PY36 else ">=0.16, <0.31"), "wsproto == 1.*", ] From 882d4da8cb6b02d97e69269f73d148d8b3fdea1b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 10 Jul 2024 23:09:07 +0300 Subject: [PATCH 09/34] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index e7a00d7926..92ce9a41d2 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit e7a00d7926cd19e8fc056dd77b7ca7a08bfa0c22 +Subproject commit 92ce9a41d28be5122e9835e781a689eeca43598a From 4c490cc63c7c10f50c12cbe7310ff04aec24a978 Mon Sep 17 00:00:00 2001 From: Jean Alinei Date: Thu, 11 Jul 2024 11:48:35 +0200 Subject: [PATCH 10/34] Adding Zephyr framework USB VID PID to udev rules. (#4947) As Zephyr is officially supported by platformio, it make sense to add its default VID:PID to udev rules. --- platformio/assets/system/99-platformio-udev.rules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platformio/assets/system/99-platformio-udev.rules b/platformio/assets/system/99-platformio-udev.rules index 08817377b3..de1988367c 100644 --- a/platformio/assets/system/99-platformio-udev.rules +++ b/platformio/assets/system/99-platformio-udev.rules @@ -178,3 +178,6 @@ ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2107", MODE="0666", ENV{ID_MM_DEVICE # Espressif USB JTAG/serial debug unit ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Zephyr framework USB CDC-ACM +ATTRS{idVendor}=="2fe3", ATTRS{idProduct}=="0100", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" From aa580360e86b321985e2a25ab3487afdf99eefa2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 11 Jul 2024 12:53:55 +0300 Subject: [PATCH 11/34] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 92ce9a41d2..988666b05e 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 92ce9a41d28be5122e9835e781a689eeca43598a +Subproject commit 988666b05e7e83e4f5672a58897cd3a355afd9c6 From 9eb6e5166d4a7c366e5cacbd39fc467c16644667 Mon Sep 17 00:00:00 2001 From: Ben Beasley Date: Thu, 25 Jul 2024 07:33:32 -0400 Subject: [PATCH 12/34] Allow Starlette 0.38.1 (#4953) --- platformio/dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/dependencies.py b/platformio/dependencies.py index 648f0d4a7c..482c4b644a 100644 --- a/platformio/dependencies.py +++ b/platformio/dependencies.py @@ -44,7 +44,7 @@ def get_pip_dependencies(): home = [ # PIO Home requirements "ajsonrpc == 1.2.*", - "starlette >=0.19, <0.38", + "starlette >=0.19, <0.39", "uvicorn %s" % ("== 0.16.0" if PY36 else ">=0.16, <0.31"), "wsproto == 1.*", ] From 7b587ba8bfc2a61635819b045faa2861f45c02c6 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 29 Jul 2024 14:43:03 +0300 Subject: [PATCH 13/34] Corrected an issue where the incorrect public class was imported for the ``DoctestTestRunner`` // Resolve #4949 --- HISTORY.rst | 2 ++ docs | 2 +- platformio/public.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 3358dd3f76..6fefa17fbe 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -21,6 +21,8 @@ test-driven methodologies, and modern toolchains for unrivaled success. 6.1.16 (2024-??-??) ~~~~~~~~~~~~~~~~~~~ +* Corrected an issue where the incorrect public class was imported for the ``DoctestTestRunner`` (`issue #4949 `_) + 6.1.15 (2024-04-25) ~~~~~~~~~~~~~~~~~~~ diff --git a/docs b/docs index 988666b05e..7159a21142 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 988666b05e7e83e4f5672a58897cd3a355afd9c6 +Subproject commit 7159a21142ef05f0ddb1c1065c8ccfaa1657e399 diff --git a/platformio/public.py b/platformio/public.py index 49db1b544e..d3afa020cf 100644 --- a/platformio/public.py +++ b/platformio/public.py @@ -23,7 +23,7 @@ from platformio.project.options import get_config_options_schema from platformio.test.result import TestCase, TestCaseSource, TestStatus from platformio.test.runners.base import TestRunnerBase -from platformio.test.runners.doctest import DoctestTestCaseParser +from platformio.test.runners.doctest import DoctestTestRunner from platformio.test.runners.googletest import GoogletestTestRunner from platformio.test.runners.unity import UnityTestRunner from platformio.util import get_systype From 11a8d9ff7a3d0314c3fd3ae43665d8e8cd157dd2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 29 Jul 2024 15:32:39 +0300 Subject: [PATCH 14/34] Updated Unity testing framework to v2.6.0 // Resolve #4871 --- HISTORY.rst | 1 + platformio/test/runners/unity.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 6fefa17fbe..296049e3db 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -21,6 +21,7 @@ test-driven methodologies, and modern toolchains for unrivaled success. 6.1.16 (2024-??-??) ~~~~~~~~~~~~~~~~~~~ +* Upgraded the `Unity `__ testing framework to version 2.6.0, incorporating the latest features and improvements for enhanced testing capabilities * Corrected an issue where the incorrect public class was imported for the ``DoctestTestRunner`` (`issue #4949 `_) 6.1.15 (2024-04-25) diff --git a/platformio/test/runners/unity.py b/platformio/test/runners/unity.py index 0d0d9e82aa..7b51bf7d15 100644 --- a/platformio/test/runners/unity.py +++ b/platformio/test/runners/unity.py @@ -26,7 +26,7 @@ class UnityTestRunner(TestRunnerBase): - EXTRA_LIB_DEPS = ["throwtheswitch/Unity@^2.5.2"] + EXTRA_LIB_DEPS = ["throwtheswitch/Unity@^2.6.0"] # Examples: # test/test_foo.cpp:44:test_function_foo:FAIL: Expected 32 Was 33 From aea9075d4bd1ea3c2b035c83e8a0c114dce79514 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 29 Jul 2024 15:33:33 +0300 Subject: [PATCH 15/34] Bump version to 6.1.16b1 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 7c58c5b231..4900512f30 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, "16a1") +VERSION = (6, 1, "16b1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From eeb5ac456eff19a8f1e2bb46397ce486be7d2a72 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 1 Aug 2024 14:30:00 +0300 Subject: [PATCH 16/34] Upgrade Doctest and GoogleTest testing frameworks to the latest versions --- HISTORY.rst | 2 +- platformio/test/runners/doctest.py | 2 +- platformio/test/runners/googletest.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 296049e3db..41464ee25e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -21,7 +21,7 @@ test-driven methodologies, and modern toolchains for unrivaled success. 6.1.16 (2024-??-??) ~~~~~~~~~~~~~~~~~~~ -* Upgraded the `Unity `__ testing framework to version 2.6.0, incorporating the latest features and improvements for enhanced testing capabilities +* Upgraded the `Doctest `__ testing framework to version 2.4.11, the `GoogleTest `__ to version 1.15.2, and the `Unity `__ to version 2.6.0, incorporating the latest features and improvements for enhanced testing capabilities * Corrected an issue where the incorrect public class was imported for the ``DoctestTestRunner`` (`issue #4949 `_) 6.1.15 (2024-04-25) diff --git a/platformio/test/runners/doctest.py b/platformio/test/runners/doctest.py index dd30bc925a..30fd6b8c7e 100644 --- a/platformio/test/runners/doctest.py +++ b/platformio/test/runners/doctest.py @@ -101,7 +101,7 @@ def _parse_assert(self, line): class DoctestTestRunner(TestRunnerBase): - EXTRA_LIB_DEPS = ["doctest/doctest@^2.4.9"] + EXTRA_LIB_DEPS = ["doctest/doctest@^2.4.11"] def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) diff --git a/platformio/test/runners/googletest.py b/platformio/test/runners/googletest.py index 8a4d1b15ae..80d59c7450 100644 --- a/platformio/test/runners/googletest.py +++ b/platformio/test/runners/googletest.py @@ -88,7 +88,7 @@ def _parse_source_and_message(self, stdout): class GoogletestTestRunner(TestRunnerBase): - EXTRA_LIB_DEPS = ["google/googletest@^1.12.1"] + EXTRA_LIB_DEPS = ["google/googletest@^1.15.2"] def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) From 44ef6e3469a5e525d46068eee786e4b19b634412 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 28 Aug 2024 19:43:52 +0300 Subject: [PATCH 17/34] Use owner-based platform declaration // Resolve #4962 --- docs | 2 +- examples | 2 +- scripts/docspregen.py | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs b/docs index 7159a21142..891cc03ad5 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 7159a21142ef05f0ddb1c1065c8ccfaa1657e399 +Subproject commit 891cc03ad5588325b95aa2e8f8fcc476ce4f5632 diff --git a/examples b/examples index 9b39344183..2585734bbf 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 9b3934418378480ee1f04cc99941e9d46b167bfa +Subproject commit 2585734bbf4aaef813079900072aa50bda9a04b9 diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 3693d9cb07..38b4c52cfc 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -413,6 +413,7 @@ def generate_packages(platform, packages, is_embedded): def generate_platform(pkg, rst_dir): + owner = pkg.metadata.spec.owner name = pkg.metadata.name print("Processing platform: %s" % name) @@ -428,9 +429,9 @@ def generate_platform(pkg, rst_dir): p = PlatformFactory.new(name) assert p.repository_url.endswith(".git") github_url = p.repository_url[:-4] - registry_url = reg_package_url("platform", pkg.metadata.spec.owner, name) + registry_url = reg_package_url("platform", owner, name) - lines.append(".. _platform_%s:" % p.name) + lines.append(".. _platform_%s:" % name) lines.append("") lines.append(p.title) @@ -439,7 +440,7 @@ def generate_platform(pkg, rst_dir): lines.append(":Registry:") lines.append(" `%s <%s>`__" % (registry_url, registry_url)) lines.append(":Configuration:") - lines.append(" :ref:`projectconf_env_platform` = ``%s``" % p.name) + lines.append(" :ref:`projectconf_env_platform` = ``%s/%s``" % (owner, name)) lines.append("") lines.append(p.description) lines.append( From f1726843a20a9f61f4b8143dbe365592b3fea713 Mon Sep 17 00:00:00 2001 From: Chris <52449218+shadow578@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:28:52 +0200 Subject: [PATCH 18/34] allow manual override of system type (#4952) * allow manual override of system type https://community.platformio.org/t/windows-on-arm64-problem-installing-xtensa-toolchain/25497 * fix lint --- platformio/util.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platformio/util.py b/platformio/util.py index 54db102f55..3f8421c352 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -15,6 +15,7 @@ import datetime import functools import math +import os import platform import re import shutil @@ -136,6 +137,11 @@ def get_instance(*args, **kwargs): def get_systype(): + # allow manual override, eg. for + # windows on arm64 systems with emulated x86 + if "PLATFORMIO_SYSTEM_TYPE" in os.environ: + return os.environ.get("PLATFORMIO_SYSTEM_TYPE") + system = platform.system().lower() arch = platform.machine().lower() if system == "windows": From 013153718d4f35c78e1634193c340e50bf004bdf Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 29 Aug 2024 11:30:18 +0300 Subject: [PATCH 19/34] Allow manual override of system type --- HISTORY.rst | 1 + docs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 41464ee25e..6855e38b91 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -21,6 +21,7 @@ test-driven methodologies, and modern toolchains for unrivaled success. 6.1.16 (2024-??-??) ~~~~~~~~~~~~~~~~~~~ +* Introduced the `PLATFORMIO_SYSTEM_TYPE `__ environment variable, enabling manual override of the detected system type for greater flexibility and control in custom build environments * Upgraded the `Doctest `__ testing framework to version 2.4.11, the `GoogleTest `__ to version 1.15.2, and the `Unity `__ to version 2.6.0, incorporating the latest features and improvements for enhanced testing capabilities * Corrected an issue where the incorrect public class was imported for the ``DoctestTestRunner`` (`issue #4949 `_) diff --git a/docs b/docs index 891cc03ad5..580ffc5621 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 891cc03ad5588325b95aa2e8f8fcc476ce4f5632 +Subproject commit 580ffc5621f91da4f6f35fa66aa127761dd0b44f From cf497e8829fa19642b297fb432bd93d7d336f7cb Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 29 Aug 2024 15:58:12 +0300 Subject: [PATCH 20/34] Update tests --- Makefile | 2 +- tests/commands/pkg/test_uninstall.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 09c0b8386a..e4c82fd391 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ format: black ./tests test: - py.test --verbose --exitfirst -n 6 --dist=loadscope tests --ignore tests/test_examples.py + pytest --verbose --exitfirst -n 6 --dist=loadscope tests --ignore tests/test_examples.py before-commit: isort format lint diff --git a/tests/commands/pkg/test_uninstall.py b/tests/commands/pkg/test_uninstall.py index 73e2179aeb..51627a75b4 100644 --- a/tests/commands/pkg/test_uninstall.py +++ b/tests/commands/pkg/test_uninstall.py @@ -63,6 +63,7 @@ def test_global_packages( "Bounce2", "ESP Async WebServer", "ESPAsyncTCP", + "ESPAsyncTCP", "Homie", ] # uninstall all deps @@ -100,6 +101,7 @@ def test_global_packages( "Bounce2", "ESP Async WebServer", "ESPAsyncTCP", + "ESPAsyncTCP", ] # remove specific dependency result = clirunner.invoke( @@ -115,6 +117,7 @@ def test_global_packages( "ArduinoJson", "AsyncMqttClient", "Bounce2", + "ESPAsyncTCP" ] # custom storage From 2441d4732104e8e378479492f507eefdfd6f0162 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 29 Aug 2024 15:58:40 +0300 Subject: [PATCH 21/34] Upgrade the build engine to the latest version of SCons (4.8.0) --- HISTORY.rst | 1 + platformio/dependencies.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 6855e38b91..85c2bfaf9d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -22,6 +22,7 @@ test-driven methodologies, and modern toolchains for unrivaled success. ~~~~~~~~~~~~~~~~~~~ * Introduced the `PLATFORMIO_SYSTEM_TYPE `__ environment variable, enabling manual override of the detected system type for greater flexibility and control in custom build environments +* Upgraded the build engine to the latest version of SCons (4.8.0) to improve build performance, reliability, and compatibility with other tools and systems (`release notes `__) * Upgraded the `Doctest `__ testing framework to version 2.4.11, the `GoogleTest `__ to version 1.15.2, and the `Unity `__ to version 2.6.0, incorporating the latest features and improvements for enhanced testing capabilities * Corrected an issue where the incorrect public class was imported for the ``DoctestTestRunner`` (`issue #4949 `_) diff --git a/platformio/dependencies.py b/platformio/dependencies.py index 482c4b644a..e2a8fc23b6 100644 --- a/platformio/dependencies.py +++ b/platformio/dependencies.py @@ -21,7 +21,7 @@ def get_core_dependencies(): return { "contrib-piohome": "~3.4.2", "contrib-pioremote": "~1.0.0", - "tool-scons": "~4.40700.0", + "tool-scons": "~4.40800.0", "tool-cppcheck": "~1.21100.0", "tool-clangtidy": "~1.150005.0", "tool-pvs-studio": "~7.18.0", From b9d27240b5a7aa0bdd22d285d416ad1a8009ef08 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 30 Aug 2024 11:06:38 +0300 Subject: [PATCH 22/34] Drop ESPHome from CI --- .github/workflows/projects.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/projects.yml b/.github/workflows/projects.yml index 676efaec12..f08fbbc28d 100644 --- a/.github/workflows/projects.yml +++ b/.github/workflows/projects.yml @@ -13,11 +13,6 @@ jobs: folder: "Marlin" config_dir: "Marlin" env_name: "mega2560" - - esphome: - repository: "esphome/esphome" - folder: "esphome" - config_dir: "esphome" - env_name: "esp32-arduino" - smartknob: repository: "scottbez1/smartknob" folder: "smartknob" @@ -34,9 +29,6 @@ jobs: config_dir: "OpenMQTTGateway" env_name: "esp32-m5atom-lite" os: [ubuntu-latest, windows-latest, macos-latest] - exclude: - - os: windows-latest - project: {"esphome": "", "repository": "esphome/esphome", "folder": "esphome", "config_dir": "esphome", "env_name": "esp32-arduino"} runs-on: ${{ matrix.os }} steps: @@ -59,11 +51,6 @@ jobs: repository: ${{ matrix.project.repository }} path: ${{ matrix.project.folder }} - - name: Install ESPHome dependencies - # Requires esptool package as it's used in a custom prescript - if: ${{ contains(matrix.project.repository, 'esphome') }} - run: pip install esptool==3.* - - name: Compile ${{ matrix.project.repository }} run: pio run -d ${{ matrix.project.config_dir }} -e ${{ matrix.project.env_name }} From 13035ced595abc942cfc99e1c5fbec19d3cef1cd Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 4 Sep 2024 11:48:30 +0300 Subject: [PATCH 23/34] Upgrade the build engine to the latest version of SCons (4.8.1) --- HISTORY.rst | 2 +- platformio/dependencies.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 85c2bfaf9d..e98d3110d8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -22,7 +22,7 @@ test-driven methodologies, and modern toolchains for unrivaled success. ~~~~~~~~~~~~~~~~~~~ * Introduced the `PLATFORMIO_SYSTEM_TYPE `__ environment variable, enabling manual override of the detected system type for greater flexibility and control in custom build environments -* Upgraded the build engine to the latest version of SCons (4.8.0) to improve build performance, reliability, and compatibility with other tools and systems (`release notes `__) +* Upgraded the build engine to the latest version of SCons (4.8.1) to improve build performance, reliability, and compatibility with other tools and systems (`release notes `__) * Upgraded the `Doctest `__ testing framework to version 2.4.11, the `GoogleTest `__ to version 1.15.2, and the `Unity `__ to version 2.6.0, incorporating the latest features and improvements for enhanced testing capabilities * Corrected an issue where the incorrect public class was imported for the ``DoctestTestRunner`` (`issue #4949 `_) diff --git a/platformio/dependencies.py b/platformio/dependencies.py index e2a8fc23b6..952ec9b362 100644 --- a/platformio/dependencies.py +++ b/platformio/dependencies.py @@ -21,7 +21,7 @@ def get_core_dependencies(): return { "contrib-piohome": "~3.4.2", "contrib-pioremote": "~1.0.0", - "tool-scons": "~4.40800.0", + "tool-scons": "~4.40801.0", "tool-cppcheck": "~1.21100.0", "tool-clangtidy": "~1.150005.0", "tool-pvs-studio": "~7.18.0", From 20dc006345de0b1c45d2fd8f4b9a451b3b9b85b7 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 4 Sep 2024 11:48:59 +0300 Subject: [PATCH 24/34] Bump version to 6.1.16b2 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 4900512f30..5ccfce513e 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, "16b1") +VERSION = (6, 1, "16b2") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From d224ae658defa0863b23027c16e394e96693c28a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 14 Sep 2024 13:14:26 +0300 Subject: [PATCH 25/34] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 580ffc5621..54af3660ee 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 580ffc5621f91da4f6f35fa66aa127761dd0b44f +Subproject commit 54af3660ee1fc8115844c3e7db4604496cd13db0 From 4230b223d2cf307408fdd4b1e077f0b149221f13 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 16 Sep 2024 20:45:30 +0300 Subject: [PATCH 26/34] Update bottle to 0.13.* --- platformio/dependencies.py | 2 +- tests/commands/pkg/test_uninstall.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio/dependencies.py b/platformio/dependencies.py index 952ec9b362..334c0af115 100644 --- a/platformio/dependencies.py +++ b/platformio/dependencies.py @@ -30,7 +30,7 @@ def get_core_dependencies(): def get_pip_dependencies(): core = [ - "bottle == 0.12.*", + "bottle == %s" % ("0.12.*" if PY36 else "0.13.*"), "click >=8.0.4, <9", "colorama", "marshmallow == 3.*", diff --git a/tests/commands/pkg/test_uninstall.py b/tests/commands/pkg/test_uninstall.py index 51627a75b4..6a759fbccd 100644 --- a/tests/commands/pkg/test_uninstall.py +++ b/tests/commands/pkg/test_uninstall.py @@ -117,7 +117,7 @@ def test_global_packages( "ArduinoJson", "AsyncMqttClient", "Bounce2", - "ESPAsyncTCP" + "ESPAsyncTCP", ] # custom storage From e6ae18ab0dabe9ee35b57d3534bc0e25d32ee7b8 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 23 Sep 2024 15:32:23 +0300 Subject: [PATCH 27/34] Enhanced internet connection checks by falling back to HTTPS protocol when HTTP (port 80) fails // Resolve #4980 --- HISTORY.rst | 1 + platformio/http.py | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index e98d3110d8..2312184905 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -22,6 +22,7 @@ test-driven methodologies, and modern toolchains for unrivaled success. ~~~~~~~~~~~~~~~~~~~ * Introduced the `PLATFORMIO_SYSTEM_TYPE `__ environment variable, enabling manual override of the detected system type for greater flexibility and control in custom build environments +* Enhanced internet connection checks by falling back to HTTPS protocol when HTTP (port 80) fails (`issue #4980 `_) * Upgraded the build engine to the latest version of SCons (4.8.1) to improve build performance, reliability, and compatibility with other tools and systems (`release notes `__) * Upgraded the `Doctest `__ testing framework to version 2.4.11, the `GoogleTest `__ to version 1.15.2, and the `Unity `__ to version 2.6.0, incorporating the latest features and improvements for enhanced testing capabilities * Corrected an issue where the incorrect public class was imported for the ``DoctestTestRunner`` (`issue #4949 `_) diff --git a/platformio/http.py b/platformio/http.py index d82e4703c6..3c77ff32a6 100644 --- a/platformio/http.py +++ b/platformio/http.py @@ -190,10 +190,11 @@ def _parse_json_response(response, expected_codes=(200, 201, 202)): @util.memoized(expire="10s") def _internet_on(): timeout = 2 + use_proxy = is_proxy_set() socket.setdefaulttimeout(timeout) for host in __check_internet_hosts__: try: - if is_proxy_set(): + if use_proxy: requests.get("http://%s" % host, allow_redirects=False, timeout=timeout) return True # try to resolve `host` for both AF_INET and AF_INET6, and then try to connect @@ -203,6 +204,15 @@ def _internet_on(): return True except: # pylint: disable=bare-except pass + + # falling back to HTTPs, issue #4980 + for host in __check_internet_hosts__: + try: + requests.get("https://%s" % host, allow_redirects=False, timeout=timeout) + except requests.exceptions.RequestException: + pass + return True + return False From 4b61de01369e1a943cf1c93564d189ec66580fbd Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 23 Sep 2024 15:33:06 +0300 Subject: [PATCH 28/34] Update deps --- platformio/dependencies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/dependencies.py b/platformio/dependencies.py index 334c0af115..7f8fc7cf05 100644 --- a/platformio/dependencies.py +++ b/platformio/dependencies.py @@ -44,7 +44,7 @@ def get_pip_dependencies(): home = [ # PIO Home requirements "ajsonrpc == 1.2.*", - "starlette >=0.19, <0.39", + "starlette >=0.19, <0.40", "uvicorn %s" % ("== 0.16.0" if PY36 else ">=0.16, <0.31"), "wsproto == 1.*", ] From 3211a2b91bde3b5a3ba5590cf181fa1713c87c07 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 23 Sep 2024 15:34:04 +0300 Subject: [PATCH 29/34] Bump version to 6.1.16rc1 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 5ccfce513e..958fdd4ed4 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, "16b2") +VERSION = (6, 1, "16rc1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 023b58e9f07b3083ee09e0348363cc7e805883c2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 23 Sep 2024 16:02:07 +0300 Subject: [PATCH 30/34] Fix PyLint warnings --- platformio/account/client.py | 2 +- platformio/builder/tools/piotarget.py | 2 +- platformio/check/cli.py | 2 +- platformio/check/defect.py | 2 +- platformio/commands/ci.py | 2 +- platformio/commands/lib.py | 4 ++-- platformio/commands/platform.py | 4 ++-- platformio/debug/cli.py | 6 ++++-- platformio/debug/helpers.py | 2 +- platformio/device/finder.py | 2 +- platformio/package/commands/publish.py | 2 +- platformio/package/manager/platform.py | 2 +- platformio/package/meta.py | 2 +- platformio/platform/_run.py | 2 +- platformio/project/commands/init.py | 2 +- platformio/project/options.py | 2 +- platformio/registry/client.py | 8 +++++--- platformio/remote/cli.py | 4 ++-- platformio/remote/client/run_or_test.py | 2 +- platformio/remote/factory/ssl.py | 2 +- platformio/run/cli.py | 4 ++-- platformio/run/processor.py | 2 +- platformio/test/cli.py | 2 +- platformio/test/result.py | 2 +- platformio/test/runners/base.py | 2 +- 25 files changed, 36 insertions(+), 32 deletions(-) diff --git a/platformio/account/client.py b/platformio/account/client.py index 064321448c..3079c7ca5d 100644 --- a/platformio/account/client.py +++ b/platformio/account/client.py @@ -144,7 +144,7 @@ def change_password(self, old_password, new_password): def registration( self, username, email, password, firstname, lastname - ): # pylint:disable=too-many-arguments + ): # pylint: disable=too-many-arguments,too-many-positional-arguments try: self.fetch_authentication_token() except: # pylint:disable=bare-except diff --git a/platformio/builder/tools/piotarget.py b/platformio/builder/tools/piotarget.py index 32bb5ffeb6..287528eb05 100644 --- a/platformio/builder/tools/piotarget.py +++ b/platformio/builder/tools/piotarget.py @@ -61,7 +61,7 @@ def _clean_dir(path): print("Done cleaning") -def AddTarget( # pylint: disable=too-many-arguments +def AddTarget( # pylint: disable=too-many-arguments,too-many-positional-arguments env, name, dependencies, diff --git a/platformio/check/cli.py b/platformio/check/cli.py index 9adf7fb9be..f4a4196140 100644 --- a/platformio/check/cli.py +++ b/platformio/check/cli.py @@ -60,7 +60,7 @@ type=click.Choice(DefectItem.SEVERITY_LABELS.values()), ) @click.option("--skip-packages", is_flag=True) -def cli( +def cli( # pylint: disable=too-many-positional-arguments environment, project_dir, project_conf, diff --git a/platformio/check/defect.py b/platformio/check/defect.py index 5689a18478..9dc8ef03d9 100644 --- a/platformio/check/defect.py +++ b/platformio/check/defect.py @@ -29,7 +29,7 @@ class DefectItem: SEVERITY_LOW = 4 SEVERITY_LABELS = {4: "low", 2: "medium", 1: "high"} - def __init__( + def __init__( # pylint: disable=too-many-positional-arguments self, severity, category, diff --git a/platformio/commands/ci.py b/platformio/commands/ci.py index 5be3128666..5a36c00988 100644 --- a/platformio/commands/ci.py +++ b/platformio/commands/ci.py @@ -63,7 +63,7 @@ def validate_path(ctx, param, value): # pylint: disable=unused-argument @click.option("-e", "--environment", "environments", multiple=True) @click.option("-v", "--verbose", is_flag=True) @click.pass_context -def cli( # pylint: disable=too-many-arguments, too-many-branches +def cli( # pylint: disable=too-many-arguments,too-many-positional-arguments, too-many-branches ctx, src, lib, diff --git a/platformio/commands/lib.py b/platformio/commands/lib.py index 1c150c0914..989797dcb1 100644 --- a/platformio/commands/lib.py +++ b/platformio/commands/lib.py @@ -152,7 +152,7 @@ def cli(ctx, **options): "-f", "--force", is_flag=True, help="Reinstall/redownload library if exists" ) @click.pass_context -def lib_install( # pylint: disable=too-many-arguments,unused-argument +def lib_install( # pylint: disable=too-many-arguments,too-many-positional-arguments,unused-argument ctx, libraries, save, silent, interactive, force ): click.secho( @@ -210,7 +210,7 @@ def lib_uninstall(ctx, libraries, save, silent): @click.option("-s", "--silent", is_flag=True, help="Suppress progress reporting") @click.option("--json-output", is_flag=True) @click.pass_context -def lib_update( # pylint: disable=too-many-arguments +def lib_update( # pylint: disable=too-many-arguments,too-many-positional-arguments ctx, libraries, only_check, dry_run, silent, json_output ): only_check = dry_run or only_check diff --git a/platformio/commands/platform.py b/platformio/commands/platform.py index 2f2ae47c14..ccde956bb8 100644 --- a/platformio/commands/platform.py +++ b/platformio/commands/platform.py @@ -159,7 +159,7 @@ def platform_show(ctx, platform, json_output): # pylint: disable=too-many-branc help="Reinstall/redownload dev/platform and its packages if exist", ) @click.pass_context -def platform_install( # pylint: disable=too-many-arguments +def platform_install( # pylint: disable=too-many-arguments,too-many-positional-arguments ctx, platforms, with_package, @@ -224,7 +224,7 @@ def platform_uninstall(ctx, platforms): @click.option("-s", "--silent", is_flag=True, help="Suppress progress reporting") @click.option("--json-output", is_flag=True) @click.pass_context -def platform_update( # pylint: disable=too-many-locals, too-many-arguments +def platform_update( # pylint: disable=too-many-locals,too-many-arguments,too-many-positional-arguments ctx, platforms, only_check, dry_run, silent, json_output, **_ ): only_check = dry_run or only_check diff --git a/platformio/debug/cli.py b/platformio/debug/cli.py index 25fb68e1b4..f9229b4fbc 100644 --- a/platformio/debug/cli.py +++ b/platformio/debug/cli.py @@ -57,7 +57,7 @@ @click.option("--interface", type=click.Choice(["gdb"])) @click.argument("client_extra_args", nargs=-1, type=click.UNPROCESSED) @click.pass_context -def cli( +def cli( # pylint: disable=too-many-positional-arguments ctx, project_dir, project_conf, @@ -111,7 +111,9 @@ def cli( return None -def _configure(ctx, project_config, env_name, load_mode, verbose, client_extra_args): +def _configure( + ctx, project_config, env_name, load_mode, verbose, client_extra_args +): # pylint: disable=too-many-positional-arguments platform = PlatformFactory.from_env(env_name, autoinstall=True) debug_config = DebugConfigFactory.new( platform, diff --git a/platformio/debug/helpers.py b/platformio/debug/helpers.py index 8982c00f14..fa03725d41 100644 --- a/platformio/debug/helpers.py +++ b/platformio/debug/helpers.py @@ -76,7 +76,7 @@ def get_default_debug_env(config): def predebug_project( ctx, project_dir, project_config, env_name, preload, verbose -): # pylint: disable=too-many-arguments +): # pylint: disable=too-many-arguments,too-many-positional-arguments debug_testname = project_config.get("env:" + env_name, "debug_test") if debug_testname: test_names = list_test_names(project_config) diff --git a/platformio/device/finder.py b/platformio/device/finder.py index 621adaece6..7dbfa3d059 100644 --- a/platformio/device/finder.py +++ b/platformio/device/finder.py @@ -89,7 +89,7 @@ def is_serial_port_ready(port, timeout=1): class SerialPortFinder: - def __init__( # pylint: disable=too-many-arguments + def __init__( # pylint: disable=too-many-arguments,too-many-positional-arguments self, board_config=None, upload_protocol=None, diff --git a/platformio/package/commands/publish.py b/platformio/package/commands/publish.py index ff0f6507b0..9d495b61b0 100644 --- a/platformio/package/commands/publish.py +++ b/platformio/package/commands/publish.py @@ -82,7 +82,7 @@ def validate_datetime(ctx, param, value): # pylint: disable=unused-argument help="Do not show interactive prompt", hidden=True, ) -def package_publish_cmd( # pylint: disable=too-many-arguments, too-many-locals +def package_publish_cmd( # pylint: disable=too-many-arguments,too-many-positional-arguments,too-many-locals package, owner, typex, released_at, private, notify, no_interactive, non_interactive ): click.secho("Preparing a package...", fg="cyan") diff --git a/platformio/package/manager/platform.py b/platformio/package/manager/platform.py index 6dbd480c7f..4baafdc2c0 100644 --- a/platformio/package/manager/platform.py +++ b/platformio/package/manager/platform.py @@ -38,7 +38,7 @@ def __init__(self, package_dir=None): def manifest_names(self): return PackageType.get_manifest_map()[PackageType.PLATFORM] - def install( # pylint: disable=arguments-differ,too-many-arguments + def install( # pylint: disable=arguments-differ,too-many-arguments,too-many-positional-arguments self, spec, skip_dependencies=False, diff --git a/platformio/package/meta.py b/platformio/package/meta.py index 7597148eed..d7fdfdfaea 100644 --- a/platformio/package/meta.py +++ b/platformio/package/meta.py @@ -196,7 +196,7 @@ def is_outdated(self, allow_incompatible=False): class PackageSpec: # pylint: disable=too-many-instance-attributes - def __init__( # pylint: disable=redefined-builtin,too-many-arguments + def __init__( # pylint: disable=redefined-builtin,too-many-arguments,too-many-positional-arguments self, raw=None, owner=None, id=None, name=None, requirements=None, uri=None ): self._requirements = None diff --git a/platformio/platform/_run.py b/platformio/platform/_run.py index 2912371dc9..81d697f50d 100644 --- a/platformio/platform/_run.py +++ b/platformio/platform/_run.py @@ -44,7 +44,7 @@ def decode_scons_arg(data): value = json.loads(value) return value - def run( # pylint: disable=too-many-arguments + def run( # pylint: disable=too-many-arguments,too-many-positional-arguments self, variables, targets, silent, verbose, jobs ): assert isinstance(variables, dict) diff --git a/platformio/project/commands/init.py b/platformio/project/commands/init.py index bc3ac61a8e..55026a747d 100644 --- a/platformio/project/commands/init.py +++ b/platformio/project/commands/init.py @@ -68,7 +68,7 @@ def validate_boards(ctx, param, value): # pylint: disable=unused-argument @click.option("--no-install-dependencies", is_flag=True) @click.option("--env-prefix", default="") @click.option("-s", "--silent", is_flag=True) -def project_init_cmd( +def project_init_cmd( # pylint: disable=too-many-positional-arguments project_dir, boards, ide, diff --git a/platformio/project/options.py b/platformio/project/options.py index 3d9c896929..d0a4b0e8e9 100644 --- a/platformio/project/options.py +++ b/platformio/project/options.py @@ -23,7 +23,7 @@ from platformio.compat import IS_WINDOWS -class ConfigOption: # pylint: disable=too-many-instance-attributes +class ConfigOption: # pylint: disable=too-many-instance-attributes,too-many-positional-arguments def __init__( self, scope, diff --git a/platformio/registry/client.py b/platformio/registry/client.py index 6173f7dfe6..6ca115c4d8 100644 --- a/platformio/registry/client.py +++ b/platformio/registry/client.py @@ -42,7 +42,7 @@ def allowed_private_packages(): pass return False - def publish_package( # pylint: disable=redefined-builtin + def publish_package( # pylint: disable=redefined-builtin, too-many-positional-arguments self, owner, type, archive_path, released_at=None, private=False, notify=True ): with open(archive_path, "rb") as fp: @@ -64,7 +64,7 @@ def publish_package( # pylint: disable=redefined-builtin x_with_authorization=True, ) - def unpublish_package( # pylint: disable=redefined-builtin + def unpublish_package( # pylint: disable=redefined-builtin, too-many-positional-arguments self, owner, type, name, version=None, undo=False ): path = "/v3/packages/%s/%s/%s" % (owner, type, name) @@ -142,7 +142,9 @@ def list_packages(self, query=None, qualifiers=None, page=None, sort=None): x_with_authorization=self.allowed_private_packages(), ) - def get_package(self, typex, owner, name, version=None, extra_path=None): + def get_package( + self, typex, owner, name, version=None, extra_path=None + ): # pylint: disable=too-many-positional-arguments try: return self.fetch_json_data( "get", diff --git a/platformio/remote/cli.py b/platformio/remote/cli.py index f1775d498b..423980f506 100644 --- a/platformio/remote/cli.py +++ b/platformio/remote/cli.py @@ -110,7 +110,7 @@ def remote_update(agents, only_check, dry_run): @click.option("-v", "--verbose", is_flag=True) @click.pass_obj @click.pass_context -def remote_run( +def remote_run( # pylint: disable=too-many-positional-arguments ctx, agents, environment, @@ -198,7 +198,7 @@ def remote_run( @click.option("--verbose", "-v", is_flag=True) @click.pass_obj @click.pass_context -def remote_test( # pylint: disable=redefined-builtin +def remote_test( # pylint: disable=redefined-builtin,too-many-positional-arguments ctx, agents, environment, diff --git a/platformio/remote/client/run_or_test.py b/platformio/remote/client/run_or_test.py index d23d92c737..c5fe7da40a 100644 --- a/platformio/remote/client/run_or_test.py +++ b/platformio/remote/client/run_or_test.py @@ -239,7 +239,7 @@ def psync_upload_chunk(self, agent_id, ac_id, dbindex, fileobj): except (AttributeError, pb.DeadReferenceError): self.disconnect(exit_code=1) - def cb_psync_upload_chunk_result( # pylint: disable=too-many-arguments + def cb_psync_upload_chunk_result( # pylint: disable=too-many-arguments,too-many-positional-arguments self, result, agent_id, ac_id, dbindex, fileobj ): result = PROJECT_SYNC_STAGE.lookupByValue(result) diff --git a/platformio/remote/factory/ssl.py b/platformio/remote/factory/ssl.py index 78aa5d79df..eeab8bf732 100644 --- a/platformio/remote/factory/ssl.py +++ b/platformio/remote/factory/ssl.py @@ -30,7 +30,7 @@ def getContext(self): ctx.load_verify_locations(certifi.where()) return ctx - def verifyHostname( # pylint: disable=unused-argument,too-many-arguments + def verifyHostname( # pylint: disable=unused-argument,too-many-arguments,too-many-positional-arguments self, connection, x509, errno, depth, status ): cn = x509.get_subject().commonName diff --git a/platformio/run/cli.py b/platformio/run/cli.py index 1ed84a48b0..26a4bb1618 100644 --- a/platformio/run/cli.py +++ b/platformio/run/cli.py @@ -76,7 +76,7 @@ @click.option("-s", "--silent", is_flag=True) @click.option("-v", "--verbose", is_flag=True) @click.pass_context -def cli( +def cli( # pylint: disable=too-many-positional-arguments ctx, environment, target, @@ -174,7 +174,7 @@ def cli( return True -def process_env( +def process_env( # pylint: disable=too-many-positional-arguments ctx, name, config, diff --git a/platformio/run/processor.py b/platformio/run/processor.py index 051e35afc2..7746179467 100644 --- a/platformio/run/processor.py +++ b/platformio/run/processor.py @@ -22,7 +22,7 @@ class EnvironmentProcessor: - def __init__( # pylint: disable=too-many-arguments + def __init__( # pylint: disable=too-many-arguments,too-many-positional-arguments self, cmd_ctx, name, diff --git a/platformio/test/cli.py b/platformio/test/cli.py index 9760545a48..78a28490b5 100644 --- a/platformio/test/cli.py +++ b/platformio/test/cli.py @@ -90,7 +90,7 @@ help="Increase verbosity level, maximum is 3 levels (-vvv), see docs for details", ) @click.pass_context -def cli( # pylint: disable=too-many-arguments,too-many-locals,redefined-builtin +def cli( # pylint: disable=too-many-arguments,too-many-positional-arguments,too-many-locals,redefined-builtin ctx, environment, ignore, diff --git a/platformio/test/result.py b/platformio/test/result.py index 091fa964f2..2de59b519f 100644 --- a/platformio/test/result.py +++ b/platformio/test/result.py @@ -55,7 +55,7 @@ def __init__(self, filename, line=None): class TestCase: - def __init__( # pylint: disable=too-many-arguments + def __init__( # pylint: disable=too-many-arguments,too-many-positional-arguments self, name, status, diff --git a/platformio/test/runners/base.py b/platformio/test/runners/base.py index e8919f84df..308e281e12 100644 --- a/platformio/test/runners/base.py +++ b/platformio/test/runners/base.py @@ -26,7 +26,7 @@ class TestRunnerOptions: # pylint: disable=too-many-instance-attributes - def __init__( # pylint: disable=too-many-arguments + def __init__( # pylint: disable=too-many-arguments,too-many-positional-arguments self, verbose=0, without_building=False, From 2d4a87238a4815fdebe627623fb5e44d5e700c4d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 23 Sep 2024 23:25:46 +0300 Subject: [PATCH 31/34] Add support for Python 3.13 --- .github/workflows/core.yml | 8 ++++---- HISTORY.rst | 1 + tests/commands/pkg/test_install.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index be8632b360..4b8bbc66ff 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -7,8 +7,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-latest, macos-latest] - python-version: ["3.6", "3.7", "3.11", "3.12"] + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ["3.6", "3.7", "3.11", "3.12", "3.13.0-rc.2"] exclude: - os: macos-latest python-version: "3.6" @@ -23,7 +23,7 @@ jobs: submodules: "recursive" - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -37,7 +37,7 @@ jobs: tox -e py - name: Python Lint - if: ${{ matrix.python-version != '3.6' }} + if: ${{ matrix.python-version != '3.6' && matrix.python-version != '3.7' }} run: | tox -e lint diff --git a/HISTORY.rst b/HISTORY.rst index 2312184905..b4b5fc529f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -21,6 +21,7 @@ test-driven methodologies, and modern toolchains for unrivaled success. 6.1.16 (2024-??-??) ~~~~~~~~~~~~~~~~~~~ +* Added support for Python 3.13 * Introduced the `PLATFORMIO_SYSTEM_TYPE `__ environment variable, enabling manual override of the detected system type for greater flexibility and control in custom build environments * Enhanced internet connection checks by falling back to HTTPS protocol when HTTP (port 80) fails (`issue #4980 `_) * Upgraded the build engine to the latest version of SCons (4.8.1) to improve build performance, reliability, and compatibility with other tools and systems (`release notes `__) diff --git a/tests/commands/pkg/test_install.py b/tests/commands/pkg/test_install.py index 2c62331409..0b837993ea 100644 --- a/tests/commands/pkg/test_install.py +++ b/tests/commands/pkg/test_install.py @@ -446,7 +446,7 @@ def test_custom_project_libraries( ) assert pkgs_to_specs(lm.get_installed()) == [ PackageSpec("ArduinoJson@5.13.4"), - PackageSpec("Nanopb@0.4.8"), + PackageSpec("Nanopb@0.4.9"), ] assert config.get("env:devkit", "lib_deps") == [ "bblanchon/ArduinoJson@^5", From 3aed8e1259b76d2571379d39db34c0d469b0f6c3 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 23 Sep 2024 23:33:25 +0300 Subject: [PATCH 32/34] Drop Python 3.6 & 3.7 from CI --- .github/workflows/core.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 4b8bbc66ff..29a6ae1639 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -8,12 +8,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.6", "3.7", "3.11", "3.12", "3.13.0-rc.2"] - exclude: - - os: macos-latest - python-version: "3.6" - - os: macos-latest - python-version: "3.7" + python-version: ["3.11", "3.12", "3.13.0-rc.2"] runs-on: ${{ matrix.os }} @@ -36,11 +31,6 @@ jobs: run: | tox -e py - - name: Python Lint - if: ${{ matrix.python-version != '3.6' && matrix.python-version != '3.7' }} - run: | - tox -e lint - - name: Integration Tests if: ${{ matrix.python-version == '3.11' }} run: | From b45cdc9cb6ba82f1c109a075c995befebea0127f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 26 Sep 2024 13:13:31 +0300 Subject: [PATCH 33/34] Declare pip dependencies statically // Resolve #4955 --- platformio/dependencies.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/platformio/dependencies.py b/platformio/dependencies.py index 7f8fc7cf05..331c1bdbf8 100644 --- a/platformio/dependencies.py +++ b/platformio/dependencies.py @@ -14,7 +14,7 @@ import platform -from platformio.compat import PY36, is_proxy_set +from platformio.compat import is_proxy_set def get_core_dependencies(): @@ -30,7 +30,8 @@ def get_core_dependencies(): def get_pip_dependencies(): core = [ - "bottle == %s" % ("0.12.*" if PY36 else "0.13.*"), + 'bottle == 0.12.*; python_version < "3.7"', + 'bottle == 0.13.*; python_version >= "3.7"', "click >=8.0.4, <9", "colorama", "marshmallow == 3.*", @@ -45,7 +46,8 @@ def get_pip_dependencies(): # PIO Home requirements "ajsonrpc == 1.2.*", "starlette >=0.19, <0.40", - "uvicorn %s" % ("== 0.16.0" if PY36 else ">=0.16, <0.31"), + 'uvicorn == 0.16.0; python_version < "3.7"', + 'uvicorn >=0.16, <0.31; python_version >= "3.7"', "wsproto == 1.*", ] @@ -53,7 +55,9 @@ def get_pip_dependencies(): # issue #4702; Broken "requests/charset_normalizer" on macOS ARM if platform.system() == "Darwin" and "arm" in platform.machine().lower(): - extra.append("chardet>=3.0.2,<6") + extra.append( + 'chardet >= 3.0.2,<6; platform_system == "Darwin" and "arm" in platform_machine' + ) # issue 4614: urllib3 v2.0 only supports OpenSSL 1.1.1+ try: From 03e84fe325a383b78438431c71df3c4aa8f6a745 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 26 Sep 2024 13:13:50 +0300 Subject: [PATCH 34/34] Bump version to 6.1.16 --- HISTORY.rst | 2 +- docs | 2 +- platformio/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index b4b5fc529f..dcfc498a1b 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -18,7 +18,7 @@ Unlock the true potential of embedded software development with PlatformIO's collaborative ecosystem, embracing declarative principles, test-driven methodologies, and modern toolchains for unrivaled success. -6.1.16 (2024-??-??) +6.1.16 (2024-09-26) ~~~~~~~~~~~~~~~~~~~ * Added support for Python 3.13 diff --git a/docs b/docs index 54af3660ee..dd3d549bdb 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 54af3660ee1fc8115844c3e7db4604496cd13db0 +Subproject commit dd3d549bdbfac9a30eadeb32e37cbd6f6c6591f7 diff --git a/platformio/__init__.py b/platformio/__init__.py index 958fdd4ed4..ff315cafb5 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, "16rc1") +VERSION = (6, 1, 16) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"