Skip to content

Commit 67b2759

Browse files
committed
Merge branch 'release/v6.1.16'
2 parents fe140b0 + 03e84fe commit 67b2759

File tree

44 files changed

+96
-73
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+96
-73
lines changed

.github/workflows/core.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
os: [ubuntu-20.04, windows-latest, macos-latest]
11-
python-version: ["3.6", "3.7", "3.11", "3.12"]
10+
os: [ubuntu-latest, windows-latest, macos-latest]
11+
python-version: ["3.11", "3.12", "3.13.0-rc.2"]
1212

1313
runs-on: ${{ matrix.os }}
1414

@@ -18,7 +18,7 @@ jobs:
1818
submodules: "recursive"
1919

2020
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v5
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424

@@ -31,11 +31,6 @@ jobs:
3131
run: |
3232
tox -e py
3333
34-
- name: Python Lint
35-
if: ${{ matrix.python-version != '3.6' }}
36-
run: |
37-
tox -e lint
38-
3934
- name: Integration Tests
4035
if: ${{ matrix.python-version == '3.11' }}
4136
run: |

.github/workflows/projects.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ jobs:
1313
folder: "Marlin"
1414
config_dir: "Marlin"
1515
env_name: "mega2560"
16-
- esphome:
17-
repository: "esphome/esphome"
18-
folder: "esphome"
19-
config_dir: "esphome"
20-
env_name: "esp32-arduino"
2116
- smartknob:
2217
repository: "scottbez1/smartknob"
2318
folder: "smartknob"
@@ -34,9 +29,6 @@ jobs:
3429
config_dir: "OpenMQTTGateway"
3530
env_name: "esp32-m5atom-lite"
3631
os: [ubuntu-latest, windows-latest, macos-latest]
37-
exclude:
38-
- os: windows-latest
39-
project: {"esphome": "", "repository": "esphome/esphome", "folder": "esphome", "config_dir": "esphome", "env_name": "esp32-arduino"}
4032

4133
runs-on: ${{ matrix.os }}
4234
steps:
@@ -59,11 +51,6 @@ jobs:
5951
repository: ${{ matrix.project.repository }}
6052
path: ${{ matrix.project.folder }}
6153

62-
- name: Install ESPHome dependencies
63-
# Requires esptool package as it's used in a custom prescript
64-
if: ${{ contains(matrix.project.repository, 'esphome') }}
65-
run: pip install esptool==3.*
66-
6754
- name: Compile ${{ matrix.project.repository }}
6855
run: pio run -d ${{ matrix.project.config_dir }} -e ${{ matrix.project.env_name }}
6956

HISTORY.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ Unlock the true potential of embedded software development with
1818
PlatformIO's collaborative ecosystem, embracing declarative principles,
1919
test-driven methodologies, and modern toolchains for unrivaled success.
2020

21+
6.1.16 (2024-09-26)
22+
~~~~~~~~~~~~~~~~~~~
23+
24+
* Added support for Python 3.13
25+
* 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
26+
* 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>`_)
27+
* 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>`__)
28+
* 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
29+
* Corrected an issue where the incorrect public class was imported for the ``DoctestTestRunner`` (`issue #4949 <https://github.com/platformio/platformio-core/issues/4949>`_)
30+
2131
6.1.15 (2024-04-25)
2232
~~~~~~~~~~~~~~~~~~~
2333

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ format:
1111
black ./tests
1212

1313
test:
14-
py.test --verbose --exitfirst -n 6 --dist=loadscope tests --ignore tests/test_examples.py
14+
pytest --verbose --exitfirst -n 6 --dist=loadscope tests --ignore tests/test_examples.py
1515

1616
before-commit: isort format lint
1717

docs

Submodule docs updated 319 files

platformio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
VERSION = (6, 1, 15)
15+
VERSION = (6, 1, 16)
1616
__version__ = ".".join([str(s) for s in VERSION])
1717

1818
__title__ = "platformio"

platformio/account/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def change_password(self, old_password, new_password):
144144

145145
def registration(
146146
self, username, email, password, firstname, lastname
147-
): # pylint:disable=too-many-arguments
147+
): # pylint: disable=too-many-arguments,too-many-positional-arguments
148148
try:
149149
self.fetch_authentication_token()
150150
except: # pylint:disable=bare-except

platformio/assets/system/99-platformio-udev.rules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,6 @@ ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2107", MODE="0666", ENV{ID_MM_DEVICE
178178

179179
# Espressif USB JTAG/serial debug unit
180180
ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"
181+
182+
# Zephyr framework USB CDC-ACM
183+
ATTRS{idVendor}=="2fe3", ATTRS{idProduct}=="0100", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1"

platformio/builder/tools/piotarget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _clean_dir(path):
6161
print("Done cleaning")
6262

6363

64-
def AddTarget( # pylint: disable=too-many-arguments
64+
def AddTarget( # pylint: disable=too-many-arguments,too-many-positional-arguments
6565
env,
6666
name,
6767
dependencies,

platformio/check/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
type=click.Choice(DefectItem.SEVERITY_LABELS.values()),
6161
)
6262
@click.option("--skip-packages", is_flag=True)
63-
def cli(
63+
def cli( # pylint: disable=too-many-positional-arguments
6464
environment,
6565
project_dir,
6666
project_conf,

platformio/check/defect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class DefectItem:
2929
SEVERITY_LOW = 4
3030
SEVERITY_LABELS = {4: "low", 2: "medium", 1: "high"}
3131

32-
def __init__(
32+
def __init__( # pylint: disable=too-many-positional-arguments
3333
self,
3434
severity,
3535
category,

platformio/commands/ci.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def validate_path(ctx, param, value): # pylint: disable=unused-argument
6363
@click.option("-e", "--environment", "environments", multiple=True)
6464
@click.option("-v", "--verbose", is_flag=True)
6565
@click.pass_context
66-
def cli( # pylint: disable=too-many-arguments, too-many-branches
66+
def cli( # pylint: disable=too-many-arguments,too-many-positional-arguments, too-many-branches
6767
ctx,
6868
src,
6969
lib,

platformio/commands/lib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def cli(ctx, **options):
152152
"-f", "--force", is_flag=True, help="Reinstall/redownload library if exists"
153153
)
154154
@click.pass_context
155-
def lib_install( # pylint: disable=too-many-arguments,unused-argument
155+
def lib_install( # pylint: disable=too-many-arguments,too-many-positional-arguments,unused-argument
156156
ctx, libraries, save, silent, interactive, force
157157
):
158158
click.secho(
@@ -210,7 +210,7 @@ def lib_uninstall(ctx, libraries, save, silent):
210210
@click.option("-s", "--silent", is_flag=True, help="Suppress progress reporting")
211211
@click.option("--json-output", is_flag=True)
212212
@click.pass_context
213-
def lib_update( # pylint: disable=too-many-arguments
213+
def lib_update( # pylint: disable=too-many-arguments,too-many-positional-arguments
214214
ctx, libraries, only_check, dry_run, silent, json_output
215215
):
216216
only_check = dry_run or only_check

platformio/commands/platform.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def platform_show(ctx, platform, json_output): # pylint: disable=too-many-branc
159159
help="Reinstall/redownload dev/platform and its packages if exist",
160160
)
161161
@click.pass_context
162-
def platform_install( # pylint: disable=too-many-arguments
162+
def platform_install( # pylint: disable=too-many-arguments,too-many-positional-arguments
163163
ctx,
164164
platforms,
165165
with_package,
@@ -224,7 +224,7 @@ def platform_uninstall(ctx, platforms):
224224
@click.option("-s", "--silent", is_flag=True, help="Suppress progress reporting")
225225
@click.option("--json-output", is_flag=True)
226226
@click.pass_context
227-
def platform_update( # pylint: disable=too-many-locals, too-many-arguments
227+
def platform_update( # pylint: disable=too-many-locals,too-many-arguments,too-many-positional-arguments
228228
ctx, platforms, only_check, dry_run, silent, json_output, **_
229229
):
230230
only_check = dry_run or only_check

platformio/debug/cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
@click.option("--interface", type=click.Choice(["gdb"]))
5858
@click.argument("client_extra_args", nargs=-1, type=click.UNPROCESSED)
5959
@click.pass_context
60-
def cli(
60+
def cli( # pylint: disable=too-many-positional-arguments
6161
ctx,
6262
project_dir,
6363
project_conf,
@@ -111,7 +111,9 @@ def cli(
111111
return None
112112

113113

114-
def _configure(ctx, project_config, env_name, load_mode, verbose, client_extra_args):
114+
def _configure(
115+
ctx, project_config, env_name, load_mode, verbose, client_extra_args
116+
): # pylint: disable=too-many-positional-arguments
115117
platform = PlatformFactory.from_env(env_name, autoinstall=True)
116118
debug_config = DebugConfigFactory.new(
117119
platform,

platformio/debug/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def get_default_debug_env(config):
7676

7777
def predebug_project(
7878
ctx, project_dir, project_config, env_name, preload, verbose
79-
): # pylint: disable=too-many-arguments
79+
): # pylint: disable=too-many-arguments,too-many-positional-arguments
8080
debug_testname = project_config.get("env:" + env_name, "debug_test")
8181
if debug_testname:
8282
test_names = list_test_names(project_config)

platformio/dependencies.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414

1515
import platform
1616

17-
from platformio.compat import PY36, is_proxy_set
17+
from platformio.compat import is_proxy_set
1818

1919

2020
def get_core_dependencies():
2121
return {
2222
"contrib-piohome": "~3.4.2",
2323
"contrib-pioremote": "~1.0.0",
24-
"tool-scons": "~4.40700.0",
24+
"tool-scons": "~4.40801.0",
2525
"tool-cppcheck": "~1.21100.0",
2626
"tool-clangtidy": "~1.150005.0",
2727
"tool-pvs-studio": "~7.18.0",
@@ -30,7 +30,8 @@ def get_core_dependencies():
3030

3131
def get_pip_dependencies():
3232
core = [
33-
"bottle == 0.12.*",
33+
'bottle == 0.12.*; python_version < "3.7"',
34+
'bottle == 0.13.*; python_version >= "3.7"',
3435
"click >=8.0.4, <9",
3536
"colorama",
3637
"marshmallow == 3.*",
@@ -44,16 +45,19 @@ def get_pip_dependencies():
4445
home = [
4546
# PIO Home requirements
4647
"ajsonrpc == 1.2.*",
47-
"starlette >=0.19, <0.38",
48-
"uvicorn %s" % ("== 0.16.0" if PY36 else ">=0.16, <0.30"),
48+
"starlette >=0.19, <0.40",
49+
'uvicorn == 0.16.0; python_version < "3.7"',
50+
'uvicorn >=0.16, <0.31; python_version >= "3.7"',
4951
"wsproto == 1.*",
5052
]
5153

5254
extra = []
5355

5456
# issue #4702; Broken "requests/charset_normalizer" on macOS ARM
5557
if platform.system() == "Darwin" and "arm" in platform.machine().lower():
56-
extra.append("chardet>=3.0.2,<6")
58+
extra.append(
59+
'chardet >= 3.0.2,<6; platform_system == "Darwin" and "arm" in platform_machine'
60+
)
5761

5862
# issue 4614: urllib3 v2.0 only supports OpenSSL 1.1.1+
5963
try:

platformio/device/finder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def is_serial_port_ready(port, timeout=1):
8989

9090

9191
class SerialPortFinder:
92-
def __init__( # pylint: disable=too-many-arguments
92+
def __init__( # pylint: disable=too-many-arguments,too-many-positional-arguments
9393
self,
9494
board_config=None,
9595
upload_protocol=None,

platformio/http.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,11 @@ def _parse_json_response(response, expected_codes=(200, 201, 202)):
190190
@util.memoized(expire="10s")
191191
def _internet_on():
192192
timeout = 2
193+
use_proxy = is_proxy_set()
193194
socket.setdefaulttimeout(timeout)
194195
for host in __check_internet_hosts__:
195196
try:
196-
if is_proxy_set():
197+
if use_proxy:
197198
requests.get("http://%s" % host, allow_redirects=False, timeout=timeout)
198199
return True
199200
# try to resolve `host` for both AF_INET and AF_INET6, and then try to connect
@@ -203,6 +204,15 @@ def _internet_on():
203204
return True
204205
except: # pylint: disable=bare-except
205206
pass
207+
208+
# falling back to HTTPs, issue #4980
209+
for host in __check_internet_hosts__:
210+
try:
211+
requests.get("https://%s" % host, allow_redirects=False, timeout=timeout)
212+
except requests.exceptions.RequestException:
213+
pass
214+
return True
215+
206216
return False
207217

208218

platformio/package/commands/publish.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def validate_datetime(ctx, param, value): # pylint: disable=unused-argument
8282
help="Do not show interactive prompt",
8383
hidden=True,
8484
)
85-
def package_publish_cmd( # pylint: disable=too-many-arguments, too-many-locals
85+
def package_publish_cmd( # pylint: disable=too-many-arguments,too-many-positional-arguments,too-many-locals
8686
package, owner, typex, released_at, private, notify, no_interactive, non_interactive
8787
):
8888
click.secho("Preparing a package...", fg="cyan")

platformio/package/manager/platform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, package_dir=None):
3838
def manifest_names(self):
3939
return PackageType.get_manifest_map()[PackageType.PLATFORM]
4040

41-
def install( # pylint: disable=arguments-differ,too-many-arguments
41+
def install( # pylint: disable=arguments-differ,too-many-arguments,too-many-positional-arguments
4242
self,
4343
spec,
4444
skip_dependencies=False,

platformio/package/manifest/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def validate_license(self, value):
276276
@staticmethod
277277
@memoized(expire="1h")
278278
def load_spdx_licenses():
279-
version = "3.23"
279+
version = "3.24.0"
280280
spdx_data_url = (
281281
"https://raw.githubusercontent.com/spdx/license-list-data/"
282282
f"v{version}/json/licenses.json"

platformio/package/meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def is_outdated(self, allow_incompatible=False):
196196

197197

198198
class PackageSpec: # pylint: disable=too-many-instance-attributes
199-
def __init__( # pylint: disable=redefined-builtin,too-many-arguments
199+
def __init__( # pylint: disable=redefined-builtin,too-many-arguments,too-many-positional-arguments
200200
self, raw=None, owner=None, id=None, name=None, requirements=None, uri=None
201201
):
202202
self._requirements = None

platformio/platform/_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def decode_scons_arg(data):
4444
value = json.loads(value)
4545
return value
4646

47-
def run( # pylint: disable=too-many-arguments
47+
def run( # pylint: disable=too-many-arguments,too-many-positional-arguments
4848
self, variables, targets, silent, verbose, jobs
4949
):
5050
assert isinstance(variables, dict)

platformio/project/commands/init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def validate_boards(ctx, param, value): # pylint: disable=unused-argument
6868
@click.option("--no-install-dependencies", is_flag=True)
6969
@click.option("--env-prefix", default="")
7070
@click.option("-s", "--silent", is_flag=True)
71-
def project_init_cmd(
71+
def project_init_cmd( # pylint: disable=too-many-positional-arguments
7272
project_dir,
7373
boards,
7474
ide,

platformio/project/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from platformio.compat import IS_WINDOWS
2424

2525

26-
class ConfigOption: # pylint: disable=too-many-instance-attributes
26+
class ConfigOption: # pylint: disable=too-many-instance-attributes,too-many-positional-arguments
2727
def __init__(
2828
self,
2929
scope,

platformio/public.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from platformio.project.options import get_config_options_schema
2424
from platformio.test.result import TestCase, TestCaseSource, TestStatus
2525
from platformio.test.runners.base import TestRunnerBase
26-
from platformio.test.runners.doctest import DoctestTestCaseParser
26+
from platformio.test.runners.doctest import DoctestTestRunner
2727
from platformio.test.runners.googletest import GoogletestTestRunner
2828
from platformio.test.runners.unity import UnityTestRunner
2929
from platformio.util import get_systype

0 commit comments

Comments
 (0)