Skip to content

Bump the pytest-embedded pins to 2.9.3 - #31

Merged
hacker-cb merged 1 commit into
masterfrom
bump-pytest-embedded-2.9.3
Aug 31, 2026
Merged

Bump the pytest-embedded pins to 2.9.3#31
hacker-cb merged 1 commit into
masterfrom
bump-pytest-embedded-2.9.3

Conversation

@hacker-cb

Copy link
Copy Markdown
Contributor

Поднимает пять пинов harness с 2.8.1 на 2.9.3 — релиз, несущий фикс espressif/pytest-embedded#426 (issue #425).

Что было сломано

_PopenRedirectProcess._forward_io читал лог редиректа в текстовом режиме, пока файл ещё дописывался. UTF-8 последовательность, попавшая на границу чтения, давала UnicodeDecodeError; except Exception вокруг чтения её глотал, forwarder выходил с кодом 0 и пустым stderr, и вывод DUT пропадал до конца сессии — всплывая много позже как pexpect-таймаут в постороннем тесте.

В 2.9.0 файл открывается с rb. Проверено в опубликованном wheel, а не по changelog: в pytest_embedded/log.py у 2.8.1 стоит open(logfile), у 2.9.3 — open(logfile, rb).

Что не двигается

pytest-embedded-serial-esp требует esptool<6,>=5.2 и в 2.8.1, и в 2.9.3 — сверено по метаданным PyPI. Поэтому esptool остаётся на 5.3.1, и ассерт grep -qx esptool==5.3.1 в верификационном слое остаётся как есть. pytest, pytest-timeout и pytest-cov уже на последних версиях. Набор зависимостей самого pytest-embedded через бамп не меняется.

Номер версии в комментарии над пинами поднят вместе с ними — он называет релиз, о требовании которого к esptool говорит абзац.

Проверено

  • ./scripts/check-pins.sh и ./scripts/check-versions.sh — зелёные
  • образ собран локально (./scripts/build.sh esp-idf, exit 0), верификационный слой прошёл: ассерт esptool держится, pip freeze показывает все пять пинов на 2.9.3
  • поведенчески, а не по строке версии: прошивка из 200 строк с em dash (U+2014), прогнанная под QEMU внутри собранного образа, проходит за 2.92 с на 2.9.3; на том же образе с откаченным до 2.8.1 harness та же прошивка даёт pexpect.exceptions.TIMEOUT с обрывом вывода на строке 012 из 200

Closes #30

Moves the five harness pins from 2.8.1 to 2.9.3, the release carrying the fix
for espressif/pytest-embedded#425.

_PopenRedirectProcess._forward_io tailed the redirect log in text mode while it
was still being appended to, so a UTF-8 sequence straddling a read boundary
raised UnicodeDecodeError. The `except Exception` around the read swallowed it:
the forwarder exited 0 with an empty stderr and DUT output stopped for the rest
of the session, surfacing much later as a pexpect timeout naming an unrelated
test. 2.9.0 opens that file with 'rb' - verified in the published wheel, not
from the changelog.

Nothing else moves. pytest-embedded-serial-esp still requires esptool<6,>=5.2
unchanged between the two releases, so esptool stays at 5.3.1 and the assertion
in the verification layer stays as it is; pytest, pytest-timeout and pytest-cov
are already at their latest. The dependency set of pytest-embedded itself is
identical across the bump.

Verified behaviourally rather than by version string: a 200-line firmware
emitting an em dash, run under QEMU in the built image, passes in 2.9s on 2.9.3
and fails with pexpect.exceptions.TIMEOUT on 2.8.1 - output truncated at line
012 - with the harness downgraded inside that same image.

The version in the comment above the pins moves with them; it names the release
whose esptool requirement the paragraph is about.

Closes #30
Copilot AI lite review requested due to automatic review settings August 31, 2026 18:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the ESP-IDF developer image’s fully pinned pytest-embedded harness stack to pick up an upstream fix for redirect-log decoding (the _forward_io text-mode read causing UnicodeDecodeError and dropped DUT output).

Changes:

  • Bump pytest-embedded* pins from 2.8.1 to 2.9.3 in images/esp-idf/Dockerfile.
  • Update the adjacent Dockerfile comment to reflect the new harness version while keeping the existing esptool==5.3.1 pin and verification logic unchanged.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@hacker-cb
hacker-cb merged commit 9edd71d into master Aug 31, 2026
15 checks passed
@hacker-cb
hacker-cb deleted the bump-pytest-embedded-2.9.3 branch August 31, 2026 18:57
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.

Bump the pytest-embedded pins to 2.9.3 in images/esp-idf

2 participants