Skip to content

feat(python): ship async and HTTP profiling in the default wheel - #595

Merged
AndreaBozzo merged 2 commits into
masterfrom
feature/587-ship-async-in-default-wheel
Aug 16, 2026
Merged

AndreaBozzo merged 2 commits into
masterfrom
feature/587-ship-async-in-default-wheel

Conversation

@AndreaBozzo

@AndreaBozzo AndreaBozzo commented Aug 16, 2026 •

Copy link
Copy Markdown
Owner

Closes #587

These features are now deemed 'good enough' for straight pypi availability. dataprof.asyncio, profile_url_async and remote Parquet are documented in docs/python/README.md

Changes

pyproject.toml and release.yml: shipped feature set becomes python,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 rustls enters 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.

⚠️ aarch64 glibc floor moves 2.17 → 2.28

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/BLOB columns as null and #554 leaves quality = None. It is also the expensive half, +1.79 MiB marginal.

Validation

Built locally with no explicit --features, confirming pyproject.toml drives it:

{"async_streaming": true, "url_profiling": true, "remote_parquet": true,
 "database": false, "database_connectors": []}
async profile OK: 2 rows, 2 cols
  • 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 build

The 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/ty are unaffected.

Not in scope

pyproject.toml and release.yml now state the feature list twice and must agree. That duplication is #589; I added a comment at both sites rather than fixing it here.

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
@github-actions github-actions Bot added github_actions Pull requests that update GitHub Actions code area: python Python bindings and API labels Aug 16, 2026
@AndreaBozzo
AndreaBozzo requested a lite review from Copilot August 16, 2026 10:39
@AndreaBozzo AndreaBozzo self-assigned this Aug 16, 2026
@AndreaBozzo AndreaBozzo added this to the 0.11.0 milestone Aug 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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, and parquet-async (in both pyproject.toml and the release workflow).
  • Raise the Linux aarch64 manylinux baseline to 2_28 to unblock ring builds (glibc floor 2.17 → 2.28 on aarch64 only).
  • Adjust macOS aarch64 baseline RUSTFLAGS to 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.

Comment on lines 414 to +420
- 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' }}

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

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
@AndreaBozzo
AndreaBozzo merged commit f65c602 into master Aug 16, 2026
25 of 26 checks passed
@AndreaBozzo
AndreaBozzo deleted the feature/587-ship-async-in-default-wheel branch August 16, 2026 11:17
@github-project-automation github-project-automation Bot moved this to Done in dataprof Aug 16, 2026
AndreaBozzo added a commit that referenced this pull request Aug 16, 2026
`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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: python Python bindings and API github_actions Pull requests that update GitHub Actions code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Ship async and HTTP streaming in the default PyPI wheel

2 participants