Skip to content

bump WLED submodule to v16.0.1 + require Python 3.10+ in setup.sh - #19

Merged
aphelps-claude-bot merged 2 commits into
mainfrom
upgrade-wled-16-0-1
Jul 24, 2026
Merged

aphelps-claude-bot merged 2 commits into
mainfrom
upgrade-wled-16-0-1

Conversation

@aphelps-claude-bot

@aphelps-claude-bot aphelps-claude-bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Collaborator

Lands the WLED 16.0.1 upgrade on WLED_dev:

  • Bump the WLED submodule to the merged v16 (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 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 here) — so pio failed 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 — SUCCESS
  • bash -n setup.sh — syntax OK
  • WLED#8 CI green (50/2/0) + hardware-tested (owner /ack-tested)

Manual

  • Fresh clone → ./setup.sh selects a 3.10+ interpreter and builds -e ampworks

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 aphelps-claude-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 … python3 newest-first preference is right: it prefers a specifically-versioned interpreter and only falls back to bare python3 if it happens to be ≥3.10.
  • Every prior python3 invocation was migrated to "$PYTHON" (venv --help, pip --version, python -m venv "$VENV", and the info banner). No stray python3 left 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 -c probe is single-quoted so sys.version_info isn't shell-mangled.
  • Fail-early: [ -n "$PYTHON" ] || die fires before any venv work, with an actionable message (mentions 3.10+, python.org/pyenv). set -euo pipefail at the top is respected; the || continue guards keep a failed probe from aborting the loop under -e.
  • ver=$(… ) || continue correctly skips an interpreter whose probe errors rather than letting an empty $ver fall 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.0 and 3.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 case glob is POSIX-portable and the shebang is #!/usr/bin/env bash, so the 3.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

aphelps commented Jul 24, 2026

Copy link
Copy Markdown
Owner

/ack-tested

Please merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants