Skip to content

ci: fix the anaconda, wheel, external-zstd and flaky test workflows - #358

Open
zydo wants to merge 4 commits into
indygreg:mainfrom
zydo:ci-fixes
Open

zydo wants to merge 4 commits into
indygreg:mainfrom
zydo:ci-fixes

Conversation

@zydo

@zydo zydo commented Oct 12, 2026

Copy link
Copy Markdown

Several workflows have been failing on main for weeks, for reasons unrelated to the code. Each commit fixes one of them:

  • anaconda (all Linux jobs): load_setup_py_data() runs setup.py inside the conda-build process. setup.py prepends . to sys.path, so the source tree's unbuilt zstandard package shadows the zstandard bindings that conda-package-handling needs for .conda support, and conda-build fails with Didn't recognize extension for file '...conda'. The recipe now reads the version from c-ext/python-zstandard.h with load_file_regex().
  • wheel (musllinux_1_1, musllinux s390x): cibuildwheel installs the test-groups packages unlocked, which picked up the latest mypy and its new ast-serialize dependency. That package has no wheels for those platforms and needs Rust to build. The test suite's dependencies move to a new test dependency group (which dev includes, plus mypy), and cibuildwheel uses test.
  • external-zstd (macOS): Homebrew lives in /opt/homebrew on Apple Silicon runners, which isn't on the compiler's search paths ('zdict.h' file not found). The job now passes Homebrew's include/lib dirs and builds arm64 only, since Homebrew's libzstd isn't universal2.
  • test (macos-26-intel, intermittent): test_stream_source_readinto hit hypothesis's 20s deadline (31s, then 18s on rerun -> FlakyFailure). The ci hypothesis profile now disables deadlines, as the expensive profile already does.

All workflows pass on the fork with these changes: https://github.com/zydo/python-zstandard/actions?query=branch%3Aci-fixes

zydo added 4 commits October 12, 2026 03:06
load_setup_py_data() executes setup.py in the conda-build process.
setup.py prepends "." to sys.path, so the source tree's unbuilt
zstandard package later shadows the zstandard bindings that
conda-package-handling imports for .conda support. conda-build then
fails with "Didn't recognize extension for file '...conda'".

Read the version from c-ext/python-zstandard.h with load_file_regex()
instead.
cibuildwheel installs the test-groups packages unlocked, so it picked up
the latest mypy, which now depends on ast-serialize. ast-serialize has no
wheels for musllinux_1_1 or musllinux s390x, and building it from source
needs a Rust toolchain the containers don't have, failing those wheel
jobs before any test ran.

Move the test suite's dependencies into a new "test" dependency group,
have "dev" include it plus mypy, and point cibuildwheel at "test".
On Apple Silicon runners Homebrew installs into /opt/homebrew, which
isn't on the compiler's default search paths, so the --system-zstd build
failed with "'zdict.h' file not found". Pass Homebrew's include and lib
directories explicitly, and build for arm64 only since Homebrew's libzstd
is not universal2.
test_stream_source_readinto intermittently fails on macos-26-intel
runners with DeadlineExceeded: a single example took 31s against the 20s
deadline, then 18s on hypothesis's rerun, which hypothesis reports as a
FlakyFailure. The timing depends on runner load, not on the code under
test, so don't enforce a deadline in the ci profile, as the expensive
profile already does.
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.

1 participant