Repository navigation
feat(python): ship async and HTTP profiling in the default wheel - #595
Conversation
dataprof.asyncio, profile_url_async and remote Parquet were documented but absent from every published wheel: the release job built --features python, and that feature is empty in crates/dataprof-python/Cargo.toml. Adds python-async, async-streaming and parquet-async to the shipped set, so pip install dataprof reaches the async API without a source build. Database stays out (#588): #365 silently records DECIMAL/temporal/UUID/BLOB columns as null and #554 leaves quality None. Wheel grows 3.72 -> 5.25 MiB on Linux x86_64 (1.41x), still with no Python dependencies. Two release.yml defects were dormant until rustls entered the graph, and are fixed here because the feature change is what triggers them: - Linux aarch64 moves to manylinux_2_28. The manylinux2014 cross image ships GCC 4.8.5, which does not define __ARM_ARCH, and ring's assembly refuses to build without it; upstream closed that WONTFIX (briansmith/ring#1728). This raises the aarch64 glibc floor from 2.17 to 2.28, dropping CentOS/RHEL 7 and Ubuntu before 18.10 on that architecture only. x86_64 is unaffected. - macOS aarch64 drops -C target-cpu=generic, which strips neon/aes/sha2/pmull. ring asserts those are statically present on aarch64-apple-darwin. Every arm64 Mac has them, so the flag bought no compatibility and cost speed. Refs #587
There was a problem hiding this comment.
Pull request overview
Updates the packaging/release configuration so the published dataprof Python wheels include the async/HTTP/remote-Parquet surface that’s already documented and implemented behind feature flags, while also fixing aarch64/macOS baseline build settings that break once rustls/ring enter the dependency graph.
Changes:
- Expand the default maturin feature set to include
python-async,async-streaming, andparquet-async(in bothpyproject.tomland the release workflow). - Raise the Linux aarch64 manylinux baseline to
2_28to unblockringbuilds (glibc floor 2.17 → 2.28 on aarch64 only). - Adjust macOS aarch64 baseline
RUSTFLAGSto drop-C target-cpu=generic.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pyproject.toml |
Sets the default maturin feature list for PEP 517 builds to include async/streaming/remote Parquet. |
.github/workflows/release.yml |
Ships the same feature set in wheel builds and updates platform-specific wheel-matrix settings (manylinux aarch64 + macOS aarch64 flags). |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - name: Build wheels (${{ matrix.cpu_profile }}) | ||
| uses: PyO3/maturin-action@v1 | ||
| with: | ||
| target: ${{ matrix.target }} | ||
| args: --release --out dist --find-interpreter --features python | ||
| args: --release --out dist --find-interpreter --features python,python-async,async-streaming,parquet-async | ||
| sccache: 'true' | ||
| manylinux: auto | ||
| manylinux: ${{ matrix.manylinux || 'auto' }} |
There was a problem hiding this comment.
Good catch, and correct on both points. #587's definition of done does require the assertion against an installed wheel, and wheel_smoke.py was the right place: that job already installs the built wheel into a bare venv on three OSes and guards against importing the source tree.
Added in 811b751.
It asserts the compiled export (from dataprof._dataprof import profile_url_async) and runs a real asyncio.run(profile_file(...)). The call matters: importing dataprof.asyncio proves nothing, because the module and its function objects import fine on a wheel with no async support and the ImportError is deferred to call time by _check_async(). An import-only check passes on a wheel that has none of this.
It also pins the other half of the contract, that database is absent, so the #588 decision cannot drift into the wheel unnoticed either.
Verified both halves actually discriminate rather than assuming it:
| wheel | fails at |
|---|---|
| baseline, no async | capabilities() reports async_streaming |
| full feature set, has database | capabilities() reports database is absent |
The module docstring also needed updating: it previously excluded "a compiled async extension" from the base-wheel contract, which this PR changes.
capabilities() reads compile-time cfg flags, so a feature-list drift between pyproject.toml and release.yml, or a cfg-gating mistake, would ship a wheel missing the async exports with nothing failing. The python-wheel-smoke job already installs the built wheel into a bare venv on three OSes, which is the right place to catch it. Asserts the compiled export (profile_url_async) and runs a real asyncio.run(profile_file(...)), because importing dataprof.asyncio proves nothing: the module and its function objects import fine on a wheel with no async support, and the ImportError is deferred to call time. Also pins the other half of the contract: database must be absent while #365 and #554 are open (#588). Verified both halves discriminate. Against a baseline wheel it fails on async_streaming; against a full-feature wheel it fails on "database is absent". Refs #587
`uv run` syncs the project before running, which compiles the extension through the PEP 517 backend. The lint job never needed it: ruff reads source, and ty resolves the native module from the checked-in .pyi stubs. It became load-bearing when #595 added async-streaming and parquet-async to [tool.maturin] features. rustls/tokio/reqwest entered the graph and the build alone took 5m06s against a 5-minute timeout, which GitHub surfaces as a cancelled job rather than a timeout. The margin is what changed, not the correctness: the same job passed in 4m44s on #570 and was killed at 5m13s on the master push of #595. Syncs with --no-install-project and runs the three checks with --no-sync, matching the wheel-smoke job. Verified all three still pass with the project uninstalled from .venv.
Closes #587
These features are now deemed 'good enough' for straight pypi availability.
dataprof.asyncio,profile_url_asyncand remote Parquet are documented indocs/python/README.mdChanges
pyproject.tomlandrelease.yml: shipped feature set becomespython,python-async,async-streaming,parquet-async.release.yml, Linux aarch64 baseline leg:manylinux: 2_28.release.yml, macOS aarch64 baseline leg: drop-C target-cpu=generic.The last two are pre-existing defects, dormant until
rustlsenters the dependency graph. They are fixed here because enabling async is what triggers them, and shipping the feature without them breaks two wheels on the next release. Both were reproduced and verified fixed in #586.manylinux2014's aarch64 cross image ships GCC 4.8.5, which does not define__ARM_ARCH. ring's assembly hard-errors without it, and upstream closed that WONTFIX (briansmith/ring#1728), so a newer image is the fix rather than a workaround.This drops CentOS/RHEL 7 and Ubuntu before 18.10 on aarch64 only; x86_64 stays on manylinux2014. All dropped platforms are EOL (RHEL 7 ended June 2024). Linux aarch64 skews modern in practice: Graviton, Docker on Apple Silicon, recent Pi OS.
This needs to be called out in 0.11.0's release notes. I did not edit
docs/release-notes.md, which describes 0.10.0 and is rewritten per release.Size
3.72 → 5.25 MiB on Linux x86_64, cp310, against the published 0.10.0 wheel. 1.41x. Still zero Python dependencies; the growth is statically linked Rust.
Database is deliberately excluded (#588): #365 silently records
DECIMAL/temporal/UUID/BLOBcolumns as null and #554 leavesquality = None. It is also the expensive half, +1.79 MiB marginal.Validation
Built locally with no explicit
--features, confirmingpyproject.tomldrives it:uv run pytest python/tests/→ 964 passed, 9 skipped (all 9 database-gated, expected)uv run pytest python/tests/test_async_url_api.py→ 10 passed against the default build, which previously required a source buildThe matrix changes themselves were validated in #586 across all five release targets with the full feature set. This PR ships a strict subset of that set, so the build is covered; what is not independently re-run is async-only on aarch64 and macOS specifically.
No Rust or Python source changed, so
cargo fmt/clippy/ruff/tyare unaffected.Not in scope
pyproject.tomlandrelease.ymlnow state the feature list twice and must agree. That duplication is #589; I added a comment at both sites rather than fixing it here.