Skip to content

Commit fc946ba

Browse files
committed
Merge branch 'release/v6.1.17'
2 parents 67b2759 + 4c697d9 commit fc946ba

39 files changed

+200
-175
lines changed

.github/workflows/core.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
fail-fast: false
99
matrix:
1010
os: [ubuntu-latest, windows-latest, macos-latest]
11-
python-version: ["3.11", "3.12", "3.13.0-rc.2"]
11+
python-version: ["3.11", "3.12", "3.13"]
1212

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

@@ -27,6 +27,12 @@ jobs:
2727
python -m pip install --upgrade pip
2828
pip install tox
2929
30+
- name: Run "codespell" on Linux
31+
if: startsWith(matrix.os, 'ubuntu')
32+
run: |
33+
python -m pip install codespell
34+
make codespell
35+
3036
- name: Core System Info
3137
run: |
3238
tox -e py

.github/workflows/docs.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
with:
1212
submodules: "recursive"
1313
- name: Set up Python
14-
uses: actions/setup-python@v4
14+
uses: actions/setup-python@v5
1515
with:
1616
python-version: "3.11"
1717
- name: Install dependencies
@@ -40,7 +40,7 @@ jobs:
4040
4141
- name: Save artifact
4242
if: ${{ github.event_name == 'push' }}
43-
uses: actions/upload-artifact@v3
43+
uses: actions/upload-artifact@v4
4444
with:
4545
name: docs
4646
path: ./docs.tar.gz
@@ -57,15 +57,15 @@ jobs:
5757
if: ${{ github.event_name == 'push' }}
5858
steps:
5959
- name: Download artifact
60-
uses: actions/download-artifact@v3
60+
uses: actions/download-artifact@v4
6161
with:
6262
name: docs
6363
- name: Unpack artifact
6464
run: |
6565
mkdir ./${{ env.LATEST_DOCS_DIR }}
6666
tar -xzf ./docs.tar.gz -C ./${{ env.LATEST_DOCS_DIR }}
6767
- name: Delete Artifact
68-
uses: geekyeggo/delete-artifact@v2
68+
uses: geekyeggo/delete-artifact@v5
6969
with:
7070
name: docs
7171
- name: Select Docs type
@@ -101,7 +101,7 @@ jobs:
101101
exit 1
102102
fi
103103
- name: Deploy to Github Pages
104-
uses: peaceiris/actions-gh-pages@v3
104+
uses: peaceiris/actions-gh-pages@v4
105105
with:
106106
personal_token: ${{ secrets.DEPLOY_GH_DOCS_TOKEN }}
107107
external_repository: ${{ env.DOCS_REPO }}

.github/workflows/examples.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: |
3535
# Free space
3636
sudo apt clean
37-
docker rmi $(docker image ls -aq)
37+
# docker rmi $(docker image ls -aq)
3838
df -h
3939
tox -e testexamples
4040

HISTORY.rst

+11
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ 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.17 (2025-02-13)
22+
~~~~~~~~~~~~~~~~~~~
23+
24+
* Introduced the `PLATFORMIO_RUN_JOBS <https://docs.platformio.org/en/latest/envvars.html#envvar-PLATFORMIO_RUN_JOBS>`__ environment variable, allowing manual override of the number of parallel build jobs (`issue #5077 <https://github.com/platformio/platformio-core/issues/5077>`_)
25+
* Added support for ``tar.xz`` tarball dependencies (`pull #4974 <https://github.com/platformio/platformio-core/pull/4974>`_)
26+
* Ensured that dependencies of private libraries are no longer unnecessarily re-installed, optimizing dependency management and reducing redundant operations (`issue #4987 <https://github.com/platformio/platformio-core/issues/4987>`_)
27+
* Resolved an issue where the ``compiledb`` target failed to properly escape compiler executable paths containing spaces (`issue #4998 <https://github.com/platformio/platformio-core/issues/4998>`_)
28+
* Resolved an issue with incorrect path resolution when linking static libraries via the `build_flags <https://docs.platformio.org/en/latest/projectconf/sections/env/options/build/build_flags.html>`__ option (`issue #5004 <https://github.com/platformio/platformio-core/issues/5004>`_)
29+
* Resolved an issue where the ``--project-dir`` flag did not function correctly with the `pio check <https://docs.platformio.org/en/latest/core/userguide/cmd_check.html>`__ and `pio debug <https://docs.platformio.org/en/latest/core/userguide/cmd_debug.html>`__ commands (`issue #5029 <https://github.com/platformio/platformio-core/issues/5029>`_)
30+
* Resolved an issue where the |LDF| occasionally excluded bundled platform libraries from the dependency graph (`pull #4941 <https://github.com/platformio/platformio-core/pull/4941>`_)
31+
2132
6.1.16 (2024-09-26)
2233
~~~~~~~~~~~~~~~~~~~
2334

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ format:
1010
black ./platformio
1111
black ./tests
1212

13+
codespell:
14+
codespell --skip "./build,./docs/_build" -L "AtLeast,TRE,ans,dout,homestate,ser"
15+
1316
test:
1417
pytest --verbose --exitfirst -n 6 --dist=loadscope tests --ignore tests/test_examples.py
1518

16-
before-commit: isort format lint
19+
before-commit: codespell isort format lint
1720

1821
clean-docs:
1922
rm -rf docs/_build

docs

Submodule docs updated 72 files

platformio/__init__.py

+1-1
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, 16)
15+
VERSION = (6, 1, 17)
1616
__version__ = ".".join([str(s) for s in VERSION])
1717

1818
__title__ = "platformio"

platformio/builder/main.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,13 @@
147147
if not int(ARGUMENTS.get("PIOVERBOSE", 0)):
148148
click.echo("Verbose mode can be enabled via `-v, --verbose` option")
149149

150+
if not os.path.isdir(env.subst("$BUILD_DIR")):
151+
os.makedirs(env.subst("$BUILD_DIR"))
152+
150153
# Dynamically load dependent tools
151154
if "compiledb" in COMMAND_LINE_TARGETS:
152155
env.Tool("compilation_db")
153156

154-
if not os.path.isdir(env.subst("$BUILD_DIR")):
155-
os.makedirs(env.subst("$BUILD_DIR"))
156-
157157
env.LoadProjectOptions()
158158
env.LoadPioPlatform()
159159

platformio/builder/tools/piobuild.py

+26-21
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def GetBuildType(env):
5858

5959

6060
def BuildProgram(env):
61+
env.ProcessCompileDbToolchainOption()
6162
env.ProcessProgramDeps()
6263
env.ProcessProjectDeps()
6364

@@ -90,6 +91,26 @@ def BuildProgram(env):
9091
return program
9192

9293

94+
def ProcessCompileDbToolchainOption(env):
95+
if "compiledb" not in COMMAND_LINE_TARGETS:
96+
return
97+
# Resolve absolute path of toolchain
98+
for cmd in ("CC", "CXX", "AS"):
99+
if cmd not in env:
100+
continue
101+
if os.path.isabs(env[cmd]) or '"' in env[cmd]:
102+
continue
103+
env[cmd] = where_is_program(env.subst("$%s" % cmd), env.subst("${ENV['PATH']}"))
104+
if " " in env[cmd]: # issue #4998: Space in compilator path
105+
env[cmd] = f'"{env[cmd]}"'
106+
107+
if env.get("COMPILATIONDB_INCLUDE_TOOLCHAIN"):
108+
print("Warning! `COMPILATIONDB_INCLUDE_TOOLCHAIN` is scoping")
109+
for scope, includes in env.DumpIntegrationIncludes().items():
110+
if scope in ("toolchain",):
111+
env.Append(CPPPATH=includes)
112+
113+
93114
def ProcessProgramDeps(env):
94115
def _append_pio_macros():
95116
core_version = pepver_to_semver(__version__)
@@ -126,27 +147,6 @@ def _append_pio_macros():
126147
# remove specified flags
127148
env.ProcessUnFlags(env.get("BUILD_UNFLAGS"))
128149

129-
env.ProcessCompileDbToolchainOption()
130-
131-
132-
def ProcessCompileDbToolchainOption(env):
133-
if "compiledb" in COMMAND_LINE_TARGETS:
134-
# Resolve absolute path of toolchain
135-
for cmd in ("CC", "CXX", "AS"):
136-
if cmd not in env:
137-
continue
138-
if os.path.isabs(env[cmd]):
139-
continue
140-
env[cmd] = where_is_program(
141-
env.subst("$%s" % cmd), env.subst("${ENV['PATH']}")
142-
)
143-
144-
if env.get("COMPILATIONDB_INCLUDE_TOOLCHAIN"):
145-
print("Warning! `COMPILATIONDB_INCLUDE_TOOLCHAIN` is scoping")
146-
for scope, includes in env.DumpIntegrationIncludes().items():
147-
if scope in ("toolchain",):
148-
env.Append(CPPPATH=includes)
149-
150150

151151
def ProcessProjectDeps(env):
152152
plb = env.ConfigureProjectLibBuilder()
@@ -219,6 +219,11 @@ def ParseFlagsExtended(env, flags): # pylint: disable=too-many-branches
219219
if os.path.isdir(p):
220220
result[k][i] = os.path.abspath(p)
221221

222+
# fix relative LIBs
223+
for i, l in enumerate(result.get("LIBS", [])):
224+
if isinstance(l, FS.File):
225+
result["LIBS"][i] = os.path.abspath(l.get_path())
226+
222227
# fix relative path for "-include"
223228
for i, f in enumerate(result.get("CCFLAGS", [])):
224229
if isinstance(f, tuple) and f[0] == "-include":

platformio/builder/tools/piolib.py

+2
Original file line numberDiff line numberDiff line change
@@ -1159,6 +1159,8 @@ def _correct_found_libs(lib_builders):
11591159
for lb in lib_builders:
11601160
if lb in found_lbs:
11611161
lb.search_deps_recursive(lb.get_search_files())
1162+
# refill found libs after recursive search
1163+
found_lbs = [lb for lb in lib_builders if lb.is_dependent]
11621164
for lb in lib_builders:
11631165
for deplb in lb.depbuilders[:]:
11641166
if deplb not in found_lbs:

platformio/check/cli.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import os
2020
import shutil
2121
from collections import Counter
22-
from os.path import dirname, isfile
2322
from time import time
2423

2524
import click
@@ -77,7 +76,7 @@ def cli( # pylint: disable=too-many-positional-arguments
7776
app.set_session_var("custom_project_conf", project_conf)
7877

7978
# find project directory on upper level
80-
if isfile(project_dir):
79+
if os.path.isfile(project_dir):
8180
project_dir = find_project_dir_above(project_dir)
8281

8382
results = []
@@ -150,7 +149,7 @@ def cli( # pylint: disable=too-many-positional-arguments
150149
print_processing_header(tool, envname, env_dump)
151150

152151
ct = CheckToolFactory.new(
153-
tool, project_dir, config, envname, tool_options
152+
tool, os.getcwd(), config, envname, tool_options
154153
)
155154

156155
result = {"env": envname, "tool": tool, "duration": time()}
@@ -250,12 +249,12 @@ def _append_defect(component, defect):
250249
components[component].update({DefectItem.SEVERITY_LABELS[defect.severity]: 1})
251250

252251
for defect in result.get("defects", []):
253-
component = dirname(defect.file) or defect.file
252+
component = os.path.dirname(defect.file) or defect.file
254253
_append_defect(component, defect)
255254

256255
if component.lower().startswith(get_project_dir().lower()):
257256
while os.sep in component:
258-
component = dirname(component)
257+
component = os.path.dirname(component)
259258
_append_defect(component, defect)
260259

261260
return components

platformio/commands/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ def settings_set(ctx, name, value):
7676
@click.pass_context
7777
def settings_reset(ctx):
7878
app.reset_settings()
79-
click.secho("The settings have been reseted!", fg="green")
79+
click.secho("The settings have been reset!", fg="green")
8080
ctx.invoke(settings_get)

platformio/debug/cli.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def cli( # pylint: disable=too-many-positional-arguments
8686

8787
if not interface:
8888
return helpers.predebug_project(
89-
ctx, project_dir, project_config, env_name, False, verbose
89+
ctx, os.getcwd(), project_config, env_name, False, verbose
9090
)
9191

9292
configure_args = (
@@ -106,7 +106,7 @@ def cli( # pylint: disable=too-many-positional-arguments
106106
else:
107107
debug_config = _configure(*configure_args)
108108

109-
_run(project_dir, debug_config, client_extra_args)
109+
_run(os.getcwd(), debug_config, client_extra_args)
110110

111111
return None
112112

platformio/dependencies.py

+6-12
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import platform
16-
1715
from platformio.compat import is_proxy_set
1816

1917

@@ -30,8 +28,7 @@ def get_core_dependencies():
3028

3129
def get_pip_dependencies():
3230
core = [
33-
'bottle == 0.12.*; python_version < "3.7"',
34-
'bottle == 0.13.*; python_version >= "3.7"',
31+
"bottle == 0.13.*",
3532
"click >=8.0.4, <9",
3633
"colorama",
3734
"marshmallow == 3.*",
@@ -45,19 +42,16 @@ def get_pip_dependencies():
4542
home = [
4643
# PIO Home requirements
4744
"ajsonrpc == 1.2.*",
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"',
45+
"starlette >=0.19, <0.46",
46+
"uvicorn >=0.16, <0.35",
5147
"wsproto == 1.*",
5248
]
5349

5450
extra = []
55-
5651
# issue #4702; Broken "requests/charset_normalizer" on macOS ARM
57-
if platform.system() == "Darwin" and "arm" in platform.machine().lower():
58-
extra.append(
59-
'chardet >= 3.0.2,<6; platform_system == "Darwin" and "arm" in platform_machine'
60-
)
52+
extra.append(
53+
'chardet >= 3.0.2,<6; platform_system == "Darwin" and "arm" in platform_machine'
54+
)
6155

6256
# issue 4614: urllib3 v2.0 only supports OpenSSL 1.1.1+
6357
try:

platformio/package/commands/exec.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def package_exec_cmd(obj, package, call, args):
5454
os.environ["PIO_PYTHON_EXE"] = get_pythonexe_path()
5555

5656
# inject current python interpreter on Windows
57-
if args[0].endswith(".py"):
57+
if args and args[0].endswith(".py"):
5858
args = [os.environ["PIO_PYTHON_EXE"]] + list(args)
5959
if not os.path.exists(args[1]):
6060
args[1] = where_is_program(args[1])

platformio/package/commands/install.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,11 @@ def _install_project_private_library_deps(private_pkg, private_lm, env_lm, optio
297297
if not spec.external and not spec.owner:
298298
continue
299299
pkg = private_lm.get_package(spec)
300-
if not pkg and not env_lm.get_package(spec):
300+
if (
301+
not pkg
302+
and not private_lm.get_package(spec)
303+
and not env_lm.get_package(spec)
304+
):
301305
pkg = env_lm.install(
302306
spec,
303307
skip_dependencies=True,

platformio/package/commands/uninstall.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def uninstall_project_env_dependencies(project_env, options=None):
111111
uninstalled_conds.append(
112112
_uninstall_project_env_custom_tools(project_env, options)
113113
)
114-
# custom ibraries
114+
# custom libraries
115115
if options.get("libraries"):
116116
uninstalled_conds.append(
117117
_uninstall_project_env_custom_libraries(project_env, options)

platformio/package/commands/update.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def update_project_env_dependencies(project_env, options=None):
110110
# custom tools
111111
if options.get("tools"):
112112
updated_conds.append(_update_project_env_custom_tools(project_env, options))
113-
# custom ibraries
113+
# custom libraries
114114
if options.get("libraries"):
115115
updated_conds.append(_update_project_env_custom_libraries(project_env, options))
116116
# declared dependencies

platformio/package/download.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(self, url, dest_dir=None):
3434
url,
3535
stream=True,
3636
)
37-
if self._http_response.status_code != 200:
37+
if self._http_response.status_code not in (200, 203):
3838
raise PackageException(
3939
"Got the unrecognized status code '{0}' when downloaded {1}".format(
4040
self._http_response.status_code, url

platformio/package/manifest/schema.py

+1-1
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.24.0"
279+
version = "3.26.0"
280280
spdx_data_url = (
281281
"https://raw.githubusercontent.com/spdx/license-list-data/"
282282
f"v{version}/json/licenses.json"

0 commit comments

Comments
 (0)