diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index c82438d24a..29a6ae1639 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.11", "3.12", "3.13.0-rc.2"] runs-on: ${{ matrix.os }} @@ -18,7 +18,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 }} @@ -31,11 +31,6 @@ jobs: run: | tox -e py - - name: Python Lint - if: ${{ matrix.python-version != '3.6' }} - run: | - tox -e lint - - name: Integration Tests if: ${{ matrix.python-version == '3.11' }} run: | 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 }} diff --git a/HISTORY.rst b/HISTORY.rst index 33301fca1e..dcfc498a1b 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -18,6 +18,16 @@ 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-09-26) +~~~~~~~~~~~~~~~~~~~ + +* 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 `__) +* 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/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/docs b/docs index 0125f8d5be..dd3d549bdb 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 0125f8d5bec0e906ed04aba5dcd0d70ad794b30f +Subproject commit dd3d549bdbfac9a30eadeb32e37cbd6f6c6591f7 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/platformio/__init__.py b/platformio/__init__.py index 878e6329d7..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, 15) +VERSION = (6, 1, 16) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" 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/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" 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/dependencies.py b/platformio/dependencies.py index 5fd40a1d3a..331c1bdbf8 100644 --- a/platformio/dependencies.py +++ b/platformio/dependencies.py @@ -14,14 +14,14 @@ import platform -from platformio.compat import PY36, is_proxy_set +from platformio.compat import is_proxy_set def get_core_dependencies(): return { "contrib-piohome": "~3.4.2", "contrib-pioremote": "~1.0.0", - "tool-scons": "~4.40700.0", + "tool-scons": "~4.40801.0", "tool-cppcheck": "~1.21100.0", "tool-clangtidy": "~1.150005.0", "tool-pvs-studio": "~7.18.0", @@ -30,7 +30,8 @@ def get_core_dependencies(): def get_pip_dependencies(): core = [ - "bottle == 0.12.*", + 'bottle == 0.12.*; python_version < "3.7"', + 'bottle == 0.13.*; python_version >= "3.7"', "click >=8.0.4, <9", "colorama", "marshmallow == 3.*", @@ -44,8 +45,9 @@ def get_pip_dependencies(): home = [ # PIO Home requirements "ajsonrpc == 1.2.*", - "starlette >=0.19, <0.38", - "uvicorn %s" % ("== 0.16.0" if PY36 else ">=0.16, <0.30"), + "starlette >=0.19, <0.40", + '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: 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/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 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/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" 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/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 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, 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) 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 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": 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( 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", diff --git a/tests/commands/pkg/test_uninstall.py b/tests/commands/pkg/test_uninstall.py index 73e2179aeb..6a759fbccd 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