Repository navigation
bump WLED submodule to v16.0.1 + require Python 3.10+ in setup.sh - #19
Merged
Merged
Conversation
WLED 16.x build scripts (pio-scripts/load_usermods.py) use PEP 604 'X | None' syntax and WLED/requirements.txt is pinned for 3.11, but setup.sh built the venv with bare 'python3' (system 3.9 on this machine) — so pio failed on every 16.x build. Pick the newest available 3.10+ interpreter (python3.13..python3.10, else python3 if new enough) and use it for the venv; fail early with a clear message otherwise.
WLED#8 (port AMPWorks to WLED 16.0.1) merged. Point WLED_dev at the merged v16 so the ampworks/apa102_mpr121 builds and setup.sh run against 16.0.1. Pairs with the setup.sh Python-3.10+ requirement on this branch.
aphelps-claude-bot
left a comment
Collaborator
Author
There was a problem hiding this comment.
Self-review: PR #19 (require Python 3.10+ in setup.sh + bump WLED to v16.0.1)
Reviewed both commits. No blocking issues — the change is correct and does what it says. Approval remains with the human.
Version gate correctness (the core of the change)
The glob 3.1[0-9]|3.[2-9][0-9] was traced against a table of inputs:
| version | result | want |
|---|---|---|
| 3.9 | reject | reject ✓ (the whole point — system 3.9 must not be picked) |
| 3.10 | accept | accept ✓ |
| 3.11 | accept | accept ✓ |
| 3.19 / 3.20 / 3.29 / 3.99 | accept | accept ✓ |
| 3.1 / 3.2 | reject | reject ✓ (single-digit minor < 10) |
| 4.0 | reject | (see note) |
| 3.100 | reject | (see note) |
The 3.9-rejection requirement is met, and 3.10–3.99 are all accepted. Good.
Loop / shell mechanics
- The
PYTHON=""init +for cand in python3.13 … python3newest-first preference is right: it prefers a specifically-versioned interpreter and only falls back to barepython3if it happens to be ≥3.10. - Every prior
python3invocation was migrated to"$PYTHON"(venv --help, pip --version,python -m venv "$VENV", and the info banner). No straypython3left that would reintroduce the 3.9 bug — verified by reading the full file. - Quoting is correct:
"$cand"/"$PYTHON"are quoted at every expansion, and the-cprobe is single-quoted sosys.version_infoisn't shell-mangled. - Fail-early:
[ -n "$PYTHON" ] || diefires before any venv work, with an actionable message (mentions 3.10+, python.org/pyenv).set -euo pipefailat the top is respected; the|| continueguards keep a failed probe from aborting the loop under-e. ver=$(… ) || continuecorrectly skips an interpreter whose probe errors rather than letting an empty$verfall through to the case.
Submodule bump
Confirmed 467c222db21a27ac5c6789adbb6fa11e50e27668 is port AMPWorks to WLED 16.0.1 (effects, usermods, HSPI, envs) (#8) — the squash-merge of WLED#8. Correct target; pairs with the Python-3.10+ requirement so 16.x build scripts (PEP 604 syntax) actually run.
Minor / non-blocking notes
- Upper bound: the gate rejects
4.0and3.100. Neither exists (3.100 won't for ~80 years; Python 4 has no announced timeline and WLED isn't tested on it), so rejecting them is harmless and arguably safer than silently accepting an untested major. Not worth changing. - Portability: the
caseglob is POSIX-portable and the shebang is#!/usr/bin/env bash, so the3.1[0-9]character-class works under both bash and the macOS default. No[[ ]]/regex used here, so no bashism risk in the gate itself. - Cosmetic: the info banner now prints e.g.
python 3.11.x (python3.11)— the interpreter name in parens is a nice touch for debugging which one was picked.
LGTM pending human approval.
aphelps
approved these changes
Jul 24, 2026
Owner
|
/ack-tested Please merge |
10 of 15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lands the WLED 16.0.1 upgrade on WLED_dev:
base-wled-16.0.1@467c222d, from WLED#8) — the full AMPWorks port (effects, MPR121, SensorSync, HSPI/apa102 envs, restored HTTP-OTA + build-info tooling).setup.sh: require Python 3.10+ for the PlatformIO venv. WLED 16.x's build scripts use PEP 604X | Nonesyntax andWLED/requirements.txtis pinned for 3.11, butsetup.shbuilt the venv with barepython3(system 3.9 here) — sopiofailed on every 16.x build. Now picks the newest available 3.10+ interpreter and fails early otherwise.Test plan
cd WLED && ../.venv/bin/pio run -e ampworks— SUCCESS, usermods compile (Python 3.11 venv)cd WLED && ../.venv/bin/pio run -e apa102_mpr121— SUCCESSbash -n setup.sh— syntax OK/ack-tested)Manual
./setup.shselects a 3.10+ interpreter and builds-e ampworks