lxml Week: Pinned Action Updates and a Test Lock Counter Fix


lxml had a light week on master. Two commits landed, four files changed, and the total diff was 13 insertions against 8 deletions. Most of the volume is build tooling. The more interesting change for anyone working on the codebase is a small fix in how the test suite preserves native lock counters when generated C code gets reused. This is a maintenance review, not a release recap, and the honest headline is that almost nothing user visible changed.

The bulk of the week came from a dependabot commit that bumped the github-actions group across one directory with two updates. In practice that means moving actions/setup-python from v7.0.0 to v7.1.0 and pypa/cibuildwheel from v4.3.4 to v4.3.5, in every workflow that uses them. The commit touched three files: ci.yml, wheels.yml, and benchmarks.yml. See the full change in the commit itself.

Note the style here: every action reference is a full commit SHA with a version comment, not a floating tag. That is the safe pattern for CI in a high visibility project. A compromised tag retarget would not silently flow into lxml builds. The tradeoff is that updates require a bot commit like this one, because a version comment alone does not change the resolved code. If you copy workflow patterns from lxml, copy the SHA pinning too.

One detail in the diff worth reading: the CI matrix still exercises very new Python interpreters, including 3.15t-dev in the benchmarks workflow and 3.14 in the main matrix. For a project that ships binary wheels for dozens of interpreter and platform combinations, catching a C API change in a pre release interpreter early is the whole point of that matrix. The bump is boring, but the matrix it serves is not.

The second half of the same commit upgrades cibuildwheel in three places inside [wheels.yml](https://github.com/lxml/lxml/blob/master/.github/workflows/wheels.yml): the generic build step, a conditional step for CPython 3.9 through 3.11 on manylinux images, and the ABI3 wheel step. The manylinux image family stays on manylinux2014 for i686 and x86_64, so this is a tool version bump rather than a platform target change.

Why care about a point release of a wheel builder? Because cibuildwheel is the layer that decides which auditwheel repairs, which manylinux policy checks, and which build isolation behavior your wheels get. A patch level update there rarely changes wheel contents, but it does change what gets flagged before artifacts reach PyPI. For a library as widely deployed as lxml, shipped as compiled bindings against libxml2 and libxslt, keeping the wheel pipeline current is maintenance that pays off in fewer surprises during the next CPython release.

The second commit of the week, from Robolightning, fixes the test suite rather than the library: preserve the native test lock counters when reusing generated C. lxml generates a large amount of C code from its Python side build scripts, and the test harness can reuse previously generated C files instead of regenerating them to save time. The fix makes the native test lock counters survive that reuse path.

The context matters. lxml’s tests include concurrency checks around dict and proxy handling that use counters in the generated C layer to detect unsafe thread interleavings. If the counters reset or disappear when generated files are reused, a test can run against stale instrumentation and produce results that differ depending on whether you built from scratch or reused a cache. That is the classic flaky test shape: same code, different result, build history as the hidden variable. The fix makes the reuse path equivalent to the fresh build path.

This is a small change, but it is the kind that quietly improves signal quality on every subsequent CI run. False test variance in a threading sensitive test suite is expensive to debug, and removing the source of variance is cheaper than triaging flakes later.

  • Steady state is low: two commits in seven days, both maintenance. Release activity is likely driven by the libxml2 and libxslt update cadence rather than feature work, so watch the wheel build inputs.
  • The SHA pinned action pattern will keep producing dependabot group bumps. Expect the next one to move cibuildwheel again if upstream iterates quickly.
  • If your own builds cache generated C from lxml, the lock counter fix is relevant to you: regenerated test instrumentation and reused caches now agree, which should reduce spurious thread test failures in downstream fork CI.