Skip to content

Commit

Permalink
Merge branch 'release/v6.1.16'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Sep 26, 2024
2 parents fe140b0 + 03e84fe commit 67b2759
Show file tree
Hide file tree
Showing 44 changed files with 96 additions and 73 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand All @@ -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 }}

Expand All @@ -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: |
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand All @@ -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 }}

10 changes: 10 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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)
~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs
Submodule docs updated 319 files
2 changes: 1 addition & 1 deletion platformio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion platformio/account/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions platformio/assets/system/99-platformio-udev.rules
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion platformio/builder/tools/piotarget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion platformio/check/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion platformio/check/defect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion platformio/commands/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions platformio/commands/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions platformio/commands/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions platformio/debug/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion platformio/debug/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 10 additions & 6 deletions platformio/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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.*",
Expand All @@ -44,16 +45,19 @@ 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.*",
]

extra = []

# 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:
Expand Down
2 changes: 1 addition & 1 deletion platformio/device/finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 11 additions & 1 deletion platformio/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand Down
2 changes: 1 addition & 1 deletion platformio/package/commands/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion platformio/package/manager/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion platformio/package/manifest/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion platformio/package/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion platformio/platform/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion platformio/project/commands/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion platformio/project/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion platformio/public.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading

0 comments on commit 67b2759

Please sign in to comment.