mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Merge branch 'release/v6.1.16'
This commit is contained in:
11
.github/workflows/core.yml
vendored
11
.github/workflows/core.yml
vendored
@ -7,8 +7,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
python-version: ["3.6", "3.7", "3.11", "3.12"]
|
python-version: ["3.11", "3.12", "3.13.0-rc.2"]
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ jobs:
|
|||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
@ -31,11 +31,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
tox -e py
|
tox -e py
|
||||||
|
|
||||||
- name: Python Lint
|
|
||||||
if: ${{ matrix.python-version != '3.6' }}
|
|
||||||
run: |
|
|
||||||
tox -e lint
|
|
||||||
|
|
||||||
- name: Integration Tests
|
- name: Integration Tests
|
||||||
if: ${{ matrix.python-version == '3.11' }}
|
if: ${{ matrix.python-version == '3.11' }}
|
||||||
run: |
|
run: |
|
||||||
|
13
.github/workflows/projects.yml
vendored
13
.github/workflows/projects.yml
vendored
@ -13,11 +13,6 @@ jobs:
|
|||||||
folder: "Marlin"
|
folder: "Marlin"
|
||||||
config_dir: "Marlin"
|
config_dir: "Marlin"
|
||||||
env_name: "mega2560"
|
env_name: "mega2560"
|
||||||
- esphome:
|
|
||||||
repository: "esphome/esphome"
|
|
||||||
folder: "esphome"
|
|
||||||
config_dir: "esphome"
|
|
||||||
env_name: "esp32-arduino"
|
|
||||||
- smartknob:
|
- smartknob:
|
||||||
repository: "scottbez1/smartknob"
|
repository: "scottbez1/smartknob"
|
||||||
folder: "smartknob"
|
folder: "smartknob"
|
||||||
@ -34,9 +29,6 @@ jobs:
|
|||||||
config_dir: "OpenMQTTGateway"
|
config_dir: "OpenMQTTGateway"
|
||||||
env_name: "esp32-m5atom-lite"
|
env_name: "esp32-m5atom-lite"
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
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 }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
@ -59,11 +51,6 @@ jobs:
|
|||||||
repository: ${{ matrix.project.repository }}
|
repository: ${{ matrix.project.repository }}
|
||||||
path: ${{ matrix.project.folder }}
|
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 }}
|
- name: Compile ${{ matrix.project.repository }}
|
||||||
run: pio run -d ${{ matrix.project.config_dir }} -e ${{ matrix.project.env_name }}
|
run: pio run -d ${{ matrix.project.config_dir }} -e ${{ matrix.project.env_name }}
|
||||||
|
|
||||||
|
10
HISTORY.rst
10
HISTORY.rst
@ -18,6 +18,16 @@ Unlock the true potential of embedded software development with
|
|||||||
PlatformIO's collaborative ecosystem, embracing declarative principles,
|
PlatformIO's collaborative ecosystem, embracing declarative principles,
|
||||||
test-driven methodologies, and modern toolchains for unrivaled success.
|
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 <https://docs.platformio.org/en/latest/envvars.html#envvar-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 <https://github.com/platformio/platformio-core/issues/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 <https://github.com/SCons/scons/releases/tag/4.8.1>`__)
|
||||||
|
* Upgraded the `Doctest <https://docs.platformio.org/en/latest/advanced/unit-testing/frameworks/doctest.html>`__ testing framework to version 2.4.11, the `GoogleTest <https://docs.platformio.org/en/latest/advanced/unit-testing/frameworks/doctest.html>`__ to version 1.15.2, and the `Unity <https://docs.platformio.org/en/latest/advanced/unit-testing/frameworks/unity.html>`__ 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 <https://github.com/platformio/platformio-core/issues/4949>`_)
|
||||||
|
|
||||||
6.1.15 (2024-04-25)
|
6.1.15 (2024-04-25)
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
2
Makefile
2
Makefile
@ -11,7 +11,7 @@ format:
|
|||||||
black ./tests
|
black ./tests
|
||||||
|
|
||||||
test:
|
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
|
before-commit: isort format lint
|
||||||
|
|
||||||
|
2
docs
2
docs
Submodule docs updated: 0125f8d5be...dd3d549bdb
2
examples
2
examples
Submodule examples updated: 9b39344183...2585734bbf
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
VERSION = (6, 1, 15)
|
VERSION = (6, 1, 16)
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -144,7 +144,7 @@ class AccountClient(HTTPClient): # pylint:disable=too-many-public-methods
|
|||||||
|
|
||||||
def registration(
|
def registration(
|
||||||
self, username, email, password, firstname, lastname
|
self, username, email, password, firstname, lastname
|
||||||
): # pylint:disable=too-many-arguments
|
): # pylint: disable=too-many-arguments,too-many-positional-arguments
|
||||||
try:
|
try:
|
||||||
self.fetch_authentication_token()
|
self.fetch_authentication_token()
|
||||||
except: # pylint:disable=bare-except
|
except: # pylint:disable=bare-except
|
||||||
|
@ -178,3 +178,6 @@ ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2107", MODE="0666", ENV{ID_MM_DEVICE
|
|||||||
|
|
||||||
# Espressif USB JTAG/serial debug unit
|
# 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"
|
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"
|
||||||
|
@ -61,7 +61,7 @@ def CleanProject(env, fullclean=False):
|
|||||||
print("Done cleaning")
|
print("Done cleaning")
|
||||||
|
|
||||||
|
|
||||||
def AddTarget( # pylint: disable=too-many-arguments
|
def AddTarget( # pylint: disable=too-many-arguments,too-many-positional-arguments
|
||||||
env,
|
env,
|
||||||
name,
|
name,
|
||||||
dependencies,
|
dependencies,
|
||||||
|
@ -60,7 +60,7 @@ from platformio.project.helpers import find_project_dir_above, get_project_dir
|
|||||||
type=click.Choice(DefectItem.SEVERITY_LABELS.values()),
|
type=click.Choice(DefectItem.SEVERITY_LABELS.values()),
|
||||||
)
|
)
|
||||||
@click.option("--skip-packages", is_flag=True)
|
@click.option("--skip-packages", is_flag=True)
|
||||||
def cli(
|
def cli( # pylint: disable=too-many-positional-arguments
|
||||||
environment,
|
environment,
|
||||||
project_dir,
|
project_dir,
|
||||||
project_conf,
|
project_conf,
|
||||||
|
@ -29,7 +29,7 @@ class DefectItem:
|
|||||||
SEVERITY_LOW = 4
|
SEVERITY_LOW = 4
|
||||||
SEVERITY_LABELS = {4: "low", 2: "medium", 1: "high"}
|
SEVERITY_LABELS = {4: "low", 2: "medium", 1: "high"}
|
||||||
|
|
||||||
def __init__(
|
def __init__( # pylint: disable=too-many-positional-arguments
|
||||||
self,
|
self,
|
||||||
severity,
|
severity,
|
||||||
category,
|
category,
|
||||||
|
@ -63,7 +63,7 @@ def validate_path(ctx, param, value): # pylint: disable=unused-argument
|
|||||||
@click.option("-e", "--environment", "environments", multiple=True)
|
@click.option("-e", "--environment", "environments", multiple=True)
|
||||||
@click.option("-v", "--verbose", is_flag=True)
|
@click.option("-v", "--verbose", is_flag=True)
|
||||||
@click.pass_context
|
@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,
|
ctx,
|
||||||
src,
|
src,
|
||||||
lib,
|
lib,
|
||||||
|
@ -152,7 +152,7 @@ def cli(ctx, **options):
|
|||||||
"-f", "--force", is_flag=True, help="Reinstall/redownload library if exists"
|
"-f", "--force", is_flag=True, help="Reinstall/redownload library if exists"
|
||||||
)
|
)
|
||||||
@click.pass_context
|
@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
|
ctx, libraries, save, silent, interactive, force
|
||||||
):
|
):
|
||||||
click.secho(
|
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("-s", "--silent", is_flag=True, help="Suppress progress reporting")
|
||||||
@click.option("--json-output", is_flag=True)
|
@click.option("--json-output", is_flag=True)
|
||||||
@click.pass_context
|
@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
|
ctx, libraries, only_check, dry_run, silent, json_output
|
||||||
):
|
):
|
||||||
only_check = dry_run or only_check
|
only_check = dry_run or only_check
|
||||||
|
@ -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",
|
help="Reinstall/redownload dev/platform and its packages if exist",
|
||||||
)
|
)
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def platform_install( # pylint: disable=too-many-arguments
|
def platform_install( # pylint: disable=too-many-arguments,too-many-positional-arguments
|
||||||
ctx,
|
ctx,
|
||||||
platforms,
|
platforms,
|
||||||
with_package,
|
with_package,
|
||||||
@ -224,7 +224,7 @@ def platform_uninstall(ctx, platforms):
|
|||||||
@click.option("-s", "--silent", is_flag=True, help="Suppress progress reporting")
|
@click.option("-s", "--silent", is_flag=True, help="Suppress progress reporting")
|
||||||
@click.option("--json-output", is_flag=True)
|
@click.option("--json-output", is_flag=True)
|
||||||
@click.pass_context
|
@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, **_
|
ctx, platforms, only_check, dry_run, silent, json_output, **_
|
||||||
):
|
):
|
||||||
only_check = dry_run or only_check
|
only_check = dry_run or only_check
|
||||||
|
@ -57,7 +57,7 @@ from platformio.project.options import ProjectOptions
|
|||||||
@click.option("--interface", type=click.Choice(["gdb"]))
|
@click.option("--interface", type=click.Choice(["gdb"]))
|
||||||
@click.argument("client_extra_args", nargs=-1, type=click.UNPROCESSED)
|
@click.argument("client_extra_args", nargs=-1, type=click.UNPROCESSED)
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def cli(
|
def cli( # pylint: disable=too-many-positional-arguments
|
||||||
ctx,
|
ctx,
|
||||||
project_dir,
|
project_dir,
|
||||||
project_conf,
|
project_conf,
|
||||||
@ -111,7 +111,9 @@ def cli(
|
|||||||
return None
|
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)
|
platform = PlatformFactory.from_env(env_name, autoinstall=True)
|
||||||
debug_config = DebugConfigFactory.new(
|
debug_config = DebugConfigFactory.new(
|
||||||
platform,
|
platform,
|
||||||
|
@ -76,7 +76,7 @@ def get_default_debug_env(config):
|
|||||||
|
|
||||||
def predebug_project(
|
def predebug_project(
|
||||||
ctx, project_dir, project_config, env_name, preload, verbose
|
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")
|
debug_testname = project_config.get("env:" + env_name, "debug_test")
|
||||||
if debug_testname:
|
if debug_testname:
|
||||||
test_names = list_test_names(project_config)
|
test_names = list_test_names(project_config)
|
||||||
|
@ -14,14 +14,14 @@
|
|||||||
|
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
from platformio.compat import PY36, is_proxy_set
|
from platformio.compat import is_proxy_set
|
||||||
|
|
||||||
|
|
||||||
def get_core_dependencies():
|
def get_core_dependencies():
|
||||||
return {
|
return {
|
||||||
"contrib-piohome": "~3.4.2",
|
"contrib-piohome": "~3.4.2",
|
||||||
"contrib-pioremote": "~1.0.0",
|
"contrib-pioremote": "~1.0.0",
|
||||||
"tool-scons": "~4.40700.0",
|
"tool-scons": "~4.40801.0",
|
||||||
"tool-cppcheck": "~1.21100.0",
|
"tool-cppcheck": "~1.21100.0",
|
||||||
"tool-clangtidy": "~1.150005.0",
|
"tool-clangtidy": "~1.150005.0",
|
||||||
"tool-pvs-studio": "~7.18.0",
|
"tool-pvs-studio": "~7.18.0",
|
||||||
@ -30,7 +30,8 @@ def get_core_dependencies():
|
|||||||
|
|
||||||
def get_pip_dependencies():
|
def get_pip_dependencies():
|
||||||
core = [
|
core = [
|
||||||
"bottle == 0.12.*",
|
'bottle == 0.12.*; python_version < "3.7"',
|
||||||
|
'bottle == 0.13.*; python_version >= "3.7"',
|
||||||
"click >=8.0.4, <9",
|
"click >=8.0.4, <9",
|
||||||
"colorama",
|
"colorama",
|
||||||
"marshmallow == 3.*",
|
"marshmallow == 3.*",
|
||||||
@ -44,8 +45,9 @@ def get_pip_dependencies():
|
|||||||
home = [
|
home = [
|
||||||
# PIO Home requirements
|
# PIO Home requirements
|
||||||
"ajsonrpc == 1.2.*",
|
"ajsonrpc == 1.2.*",
|
||||||
"starlette >=0.19, <0.38",
|
"starlette >=0.19, <0.40",
|
||||||
"uvicorn %s" % ("== 0.16.0" if PY36 else ">=0.16, <0.30"),
|
'uvicorn == 0.16.0; python_version < "3.7"',
|
||||||
|
'uvicorn >=0.16, <0.31; python_version >= "3.7"',
|
||||||
"wsproto == 1.*",
|
"wsproto == 1.*",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -53,7 +55,9 @@ def get_pip_dependencies():
|
|||||||
|
|
||||||
# issue #4702; Broken "requests/charset_normalizer" on macOS ARM
|
# issue #4702; Broken "requests/charset_normalizer" on macOS ARM
|
||||||
if platform.system() == "Darwin" and "arm" in platform.machine().lower():
|
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+
|
# issue 4614: urllib3 v2.0 only supports OpenSSL 1.1.1+
|
||||||
try:
|
try:
|
||||||
|
@ -89,7 +89,7 @@ def is_serial_port_ready(port, timeout=1):
|
|||||||
|
|
||||||
|
|
||||||
class SerialPortFinder:
|
class SerialPortFinder:
|
||||||
def __init__( # pylint: disable=too-many-arguments
|
def __init__( # pylint: disable=too-many-arguments,too-many-positional-arguments
|
||||||
self,
|
self,
|
||||||
board_config=None,
|
board_config=None,
|
||||||
upload_protocol=None,
|
upload_protocol=None,
|
||||||
|
@ -190,10 +190,11 @@ class HTTPClient:
|
|||||||
@util.memoized(expire="10s")
|
@util.memoized(expire="10s")
|
||||||
def _internet_on():
|
def _internet_on():
|
||||||
timeout = 2
|
timeout = 2
|
||||||
|
use_proxy = is_proxy_set()
|
||||||
socket.setdefaulttimeout(timeout)
|
socket.setdefaulttimeout(timeout)
|
||||||
for host in __check_internet_hosts__:
|
for host in __check_internet_hosts__:
|
||||||
try:
|
try:
|
||||||
if is_proxy_set():
|
if use_proxy:
|
||||||
requests.get("http://%s" % host, allow_redirects=False, timeout=timeout)
|
requests.get("http://%s" % host, allow_redirects=False, timeout=timeout)
|
||||||
return True
|
return True
|
||||||
# try to resolve `host` for both AF_INET and AF_INET6, and then try to connect
|
# 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
|
return True
|
||||||
except: # pylint: disable=bare-except
|
except: # pylint: disable=bare-except
|
||||||
pass
|
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
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ def validate_datetime(ctx, param, value): # pylint: disable=unused-argument
|
|||||||
help="Do not show interactive prompt",
|
help="Do not show interactive prompt",
|
||||||
hidden=True,
|
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
|
package, owner, typex, released_at, private, notify, no_interactive, non_interactive
|
||||||
):
|
):
|
||||||
click.secho("Preparing a package...", fg="cyan")
|
click.secho("Preparing a package...", fg="cyan")
|
||||||
|
@ -38,7 +38,7 @@ class PlatformPackageManager(BasePackageManager): # pylint: disable=too-many-an
|
|||||||
def manifest_names(self):
|
def manifest_names(self):
|
||||||
return PackageType.get_manifest_map()[PackageType.PLATFORM]
|
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,
|
self,
|
||||||
spec,
|
spec,
|
||||||
skip_dependencies=False,
|
skip_dependencies=False,
|
||||||
|
@ -276,7 +276,7 @@ class ManifestSchema(BaseSchema):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
@memoized(expire="1h")
|
@memoized(expire="1h")
|
||||||
def load_spdx_licenses():
|
def load_spdx_licenses():
|
||||||
version = "3.23"
|
version = "3.24.0"
|
||||||
spdx_data_url = (
|
spdx_data_url = (
|
||||||
"https://raw.githubusercontent.com/spdx/license-list-data/"
|
"https://raw.githubusercontent.com/spdx/license-list-data/"
|
||||||
f"v{version}/json/licenses.json"
|
f"v{version}/json/licenses.json"
|
||||||
|
@ -196,7 +196,7 @@ class PackageOutdatedResult:
|
|||||||
|
|
||||||
|
|
||||||
class PackageSpec: # pylint: disable=too-many-instance-attributes
|
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, raw=None, owner=None, id=None, name=None, requirements=None, uri=None
|
||||||
):
|
):
|
||||||
self._requirements = None
|
self._requirements = None
|
||||||
|
@ -44,7 +44,7 @@ class PlatformRunMixin:
|
|||||||
value = json.loads(value)
|
value = json.loads(value)
|
||||||
return 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
|
self, variables, targets, silent, verbose, jobs
|
||||||
):
|
):
|
||||||
assert isinstance(variables, dict)
|
assert isinstance(variables, dict)
|
||||||
|
@ -68,7 +68,7 @@ def validate_boards(ctx, param, value): # pylint: disable=unused-argument
|
|||||||
@click.option("--no-install-dependencies", is_flag=True)
|
@click.option("--no-install-dependencies", is_flag=True)
|
||||||
@click.option("--env-prefix", default="")
|
@click.option("--env-prefix", default="")
|
||||||
@click.option("-s", "--silent", is_flag=True)
|
@click.option("-s", "--silent", is_flag=True)
|
||||||
def project_init_cmd(
|
def project_init_cmd( # pylint: disable=too-many-positional-arguments
|
||||||
project_dir,
|
project_dir,
|
||||||
boards,
|
boards,
|
||||||
ide,
|
ide,
|
||||||
|
@ -23,7 +23,7 @@ from platformio import fs
|
|||||||
from platformio.compat import IS_WINDOWS
|
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__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
scope,
|
scope,
|
||||||
|
@ -23,7 +23,7 @@ from platformio.project.helpers import get_project_watch_lib_dirs, load_build_me
|
|||||||
from platformio.project.options import get_config_options_schema
|
from platformio.project.options import get_config_options_schema
|
||||||
from platformio.test.result import TestCase, TestCaseSource, TestStatus
|
from platformio.test.result import TestCase, TestCaseSource, TestStatus
|
||||||
from platformio.test.runners.base import TestRunnerBase
|
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.googletest import GoogletestTestRunner
|
||||||
from platformio.test.runners.unity import UnityTestRunner
|
from platformio.test.runners.unity import UnityTestRunner
|
||||||
from platformio.util import get_systype
|
from platformio.util import get_systype
|
||||||
|
@ -42,7 +42,7 @@ class RegistryClient(HTTPClient):
|
|||||||
pass
|
pass
|
||||||
return False
|
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
|
self, owner, type, archive_path, released_at=None, private=False, notify=True
|
||||||
):
|
):
|
||||||
with open(archive_path, "rb") as fp:
|
with open(archive_path, "rb") as fp:
|
||||||
@ -64,7 +64,7 @@ class RegistryClient(HTTPClient):
|
|||||||
x_with_authorization=True,
|
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
|
self, owner, type, name, version=None, undo=False
|
||||||
):
|
):
|
||||||
path = "/v3/packages/%s/%s/%s" % (owner, type, name)
|
path = "/v3/packages/%s/%s/%s" % (owner, type, name)
|
||||||
@ -142,7 +142,9 @@ class RegistryClient(HTTPClient):
|
|||||||
x_with_authorization=self.allowed_private_packages(),
|
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:
|
try:
|
||||||
return self.fetch_json_data(
|
return self.fetch_json_data(
|
||||||
"get",
|
"get",
|
||||||
|
@ -110,7 +110,7 @@ def remote_update(agents, only_check, dry_run):
|
|||||||
@click.option("-v", "--verbose", is_flag=True)
|
@click.option("-v", "--verbose", is_flag=True)
|
||||||
@click.pass_obj
|
@click.pass_obj
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def remote_run(
|
def remote_run( # pylint: disable=too-many-positional-arguments
|
||||||
ctx,
|
ctx,
|
||||||
agents,
|
agents,
|
||||||
environment,
|
environment,
|
||||||
@ -198,7 +198,7 @@ def remote_run(
|
|||||||
@click.option("--verbose", "-v", is_flag=True)
|
@click.option("--verbose", "-v", is_flag=True)
|
||||||
@click.pass_obj
|
@click.pass_obj
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def remote_test( # pylint: disable=redefined-builtin
|
def remote_test( # pylint: disable=redefined-builtin,too-many-positional-arguments
|
||||||
ctx,
|
ctx,
|
||||||
agents,
|
agents,
|
||||||
environment,
|
environment,
|
||||||
|
@ -239,7 +239,7 @@ class RunOrTestClient(AsyncClientBase):
|
|||||||
except (AttributeError, pb.DeadReferenceError):
|
except (AttributeError, pb.DeadReferenceError):
|
||||||
self.disconnect(exit_code=1)
|
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
|
self, result, agent_id, ac_id, dbindex, fileobj
|
||||||
):
|
):
|
||||||
result = PROJECT_SYNC_STAGE.lookupByValue(result)
|
result = PROJECT_SYNC_STAGE.lookupByValue(result)
|
||||||
|
@ -30,7 +30,7 @@ class SSLContextFactory(ssl.ClientContextFactory):
|
|||||||
ctx.load_verify_locations(certifi.where())
|
ctx.load_verify_locations(certifi.where())
|
||||||
return ctx
|
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
|
self, connection, x509, errno, depth, status
|
||||||
):
|
):
|
||||||
cn = x509.get_subject().commonName
|
cn = x509.get_subject().commonName
|
||||||
|
@ -76,7 +76,7 @@ except NotImplementedError:
|
|||||||
@click.option("-s", "--silent", is_flag=True)
|
@click.option("-s", "--silent", is_flag=True)
|
||||||
@click.option("-v", "--verbose", is_flag=True)
|
@click.option("-v", "--verbose", is_flag=True)
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def cli(
|
def cli( # pylint: disable=too-many-positional-arguments
|
||||||
ctx,
|
ctx,
|
||||||
environment,
|
environment,
|
||||||
target,
|
target,
|
||||||
@ -174,7 +174,7 @@ def cli(
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def process_env(
|
def process_env( # pylint: disable=too-many-positional-arguments
|
||||||
ctx,
|
ctx,
|
||||||
name,
|
name,
|
||||||
config,
|
config,
|
||||||
|
@ -22,7 +22,7 @@ from platformio.test.runners.base import CTX_META_TEST_RUNNING_NAME
|
|||||||
|
|
||||||
|
|
||||||
class EnvironmentProcessor:
|
class EnvironmentProcessor:
|
||||||
def __init__( # pylint: disable=too-many-arguments
|
def __init__( # pylint: disable=too-many-arguments,too-many-positional-arguments
|
||||||
self,
|
self,
|
||||||
cmd_ctx,
|
cmd_ctx,
|
||||||
name,
|
name,
|
||||||
|
@ -90,7 +90,7 @@ from platformio.test.runners.factory import TestRunnerFactory
|
|||||||
help="Increase verbosity level, maximum is 3 levels (-vvv), see docs for details",
|
help="Increase verbosity level, maximum is 3 levels (-vvv), see docs for details",
|
||||||
)
|
)
|
||||||
@click.pass_context
|
@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,
|
ctx,
|
||||||
environment,
|
environment,
|
||||||
ignore,
|
ignore,
|
||||||
|
@ -55,7 +55,7 @@ class TestCaseSource:
|
|||||||
|
|
||||||
|
|
||||||
class TestCase:
|
class TestCase:
|
||||||
def __init__( # pylint: disable=too-many-arguments
|
def __init__( # pylint: disable=too-many-arguments,too-many-positional-arguments
|
||||||
self,
|
self,
|
||||||
name,
|
name,
|
||||||
status,
|
status,
|
||||||
|
@ -26,7 +26,7 @@ CTX_META_TEST_RUNNING_NAME = __name__ + ".test_running_name"
|
|||||||
|
|
||||||
|
|
||||||
class TestRunnerOptions: # pylint: disable=too-many-instance-attributes
|
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,
|
self,
|
||||||
verbose=0,
|
verbose=0,
|
||||||
without_building=False,
|
without_building=False,
|
||||||
|
@ -101,7 +101,7 @@ class DoctestTestCaseParser:
|
|||||||
|
|
||||||
|
|
||||||
class DoctestTestRunner(TestRunnerBase):
|
class DoctestTestRunner(TestRunnerBase):
|
||||||
EXTRA_LIB_DEPS = ["doctest/doctest@^2.4.9"]
|
EXTRA_LIB_DEPS = ["doctest/doctest@^2.4.11"]
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
@ -88,7 +88,7 @@ class GoogletestTestCaseParser:
|
|||||||
|
|
||||||
|
|
||||||
class GoogletestTestRunner(TestRunnerBase):
|
class GoogletestTestRunner(TestRunnerBase):
|
||||||
EXTRA_LIB_DEPS = ["google/googletest@^1.12.1"]
|
EXTRA_LIB_DEPS = ["google/googletest@^1.15.2"]
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
@ -26,7 +26,7 @@ from platformio.util import strip_ansi_codes
|
|||||||
|
|
||||||
|
|
||||||
class UnityTestRunner(TestRunnerBase):
|
class UnityTestRunner(TestRunnerBase):
|
||||||
EXTRA_LIB_DEPS = ["throwtheswitch/Unity@^2.5.2"]
|
EXTRA_LIB_DEPS = ["throwtheswitch/Unity@^2.6.0"]
|
||||||
|
|
||||||
# Examples:
|
# Examples:
|
||||||
# test/test_foo.cpp:44:test_function_foo:FAIL: Expected 32 Was 33
|
# test/test_foo.cpp:44:test_function_foo:FAIL: Expected 32 Was 33
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import functools
|
import functools
|
||||||
import math
|
import math
|
||||||
|
import os
|
||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
@ -136,6 +137,11 @@ def singleton(cls):
|
|||||||
|
|
||||||
|
|
||||||
def get_systype():
|
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()
|
system = platform.system().lower()
|
||||||
arch = platform.machine().lower()
|
arch = platform.machine().lower()
|
||||||
if system == "windows":
|
if system == "windows":
|
||||||
|
@ -413,6 +413,7 @@ Packages
|
|||||||
|
|
||||||
|
|
||||||
def generate_platform(pkg, rst_dir):
|
def generate_platform(pkg, rst_dir):
|
||||||
|
owner = pkg.metadata.spec.owner
|
||||||
name = pkg.metadata.name
|
name = pkg.metadata.name
|
||||||
print("Processing platform: %s" % name)
|
print("Processing platform: %s" % name)
|
||||||
|
|
||||||
@ -428,9 +429,9 @@ def generate_platform(pkg, rst_dir):
|
|||||||
p = PlatformFactory.new(name)
|
p = PlatformFactory.new(name)
|
||||||
assert p.repository_url.endswith(".git")
|
assert p.repository_url.endswith(".git")
|
||||||
github_url = p.repository_url[:-4]
|
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("")
|
||||||
|
|
||||||
lines.append(p.title)
|
lines.append(p.title)
|
||||||
@ -439,7 +440,7 @@ def generate_platform(pkg, rst_dir):
|
|||||||
lines.append(":Registry:")
|
lines.append(":Registry:")
|
||||||
lines.append(" `%s <%s>`__" % (registry_url, registry_url))
|
lines.append(" `%s <%s>`__" % (registry_url, registry_url))
|
||||||
lines.append(":Configuration:")
|
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("")
|
||||||
lines.append(p.description)
|
lines.append(p.description)
|
||||||
lines.append(
|
lines.append(
|
||||||
|
@ -446,7 +446,7 @@ def test_custom_project_libraries(
|
|||||||
)
|
)
|
||||||
assert pkgs_to_specs(lm.get_installed()) == [
|
assert pkgs_to_specs(lm.get_installed()) == [
|
||||||
PackageSpec("ArduinoJson@5.13.4"),
|
PackageSpec("ArduinoJson@5.13.4"),
|
||||||
PackageSpec("Nanopb@0.4.8"),
|
PackageSpec("Nanopb@0.4.9"),
|
||||||
]
|
]
|
||||||
assert config.get("env:devkit", "lib_deps") == [
|
assert config.get("env:devkit", "lib_deps") == [
|
||||||
"bblanchon/ArduinoJson@^5",
|
"bblanchon/ArduinoJson@^5",
|
||||||
|
@ -63,6 +63,7 @@ def test_global_packages(
|
|||||||
"Bounce2",
|
"Bounce2",
|
||||||
"ESP Async WebServer",
|
"ESP Async WebServer",
|
||||||
"ESPAsyncTCP",
|
"ESPAsyncTCP",
|
||||||
|
"ESPAsyncTCP",
|
||||||
"Homie",
|
"Homie",
|
||||||
]
|
]
|
||||||
# uninstall all deps
|
# uninstall all deps
|
||||||
@ -100,6 +101,7 @@ def test_global_packages(
|
|||||||
"Bounce2",
|
"Bounce2",
|
||||||
"ESP Async WebServer",
|
"ESP Async WebServer",
|
||||||
"ESPAsyncTCP",
|
"ESPAsyncTCP",
|
||||||
|
"ESPAsyncTCP",
|
||||||
]
|
]
|
||||||
# remove specific dependency
|
# remove specific dependency
|
||||||
result = clirunner.invoke(
|
result = clirunner.invoke(
|
||||||
@ -115,6 +117,7 @@ def test_global_packages(
|
|||||||
"ArduinoJson",
|
"ArduinoJson",
|
||||||
"AsyncMqttClient",
|
"AsyncMqttClient",
|
||||||
"Bounce2",
|
"Bounce2",
|
||||||
|
"ESPAsyncTCP",
|
||||||
]
|
]
|
||||||
|
|
||||||
# custom storage
|
# custom storage
|
||||||
|
Reference in New Issue
Block a user