Infra: add bindings/python into root workspace#2506
Open
kevinjqliu wants to merge 15 commits into
Open
Conversation
kevinjqliu
commented
May 25, 2026
Contributor
Author
kevinjqliu
left a comment
There was a problem hiding this comment.
i also made some refactor to .github/actions/overwrite-package-version/action.yml, .github/workflows/release_python.yml, and .github/workflows/release_python_nightly.yml to align Cargo workspace version with pyproject toml version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
What changes are included in this PR?
Migrates
bindings/pythonfrom a standalone, excluded crate into the root Cargo workspace.This lets
pyiceberg_core_rustinherit workspace versions, dependency declarations, package metadata, and the root lockfile instead of maintaining a parallel Rust dependency setup underbindings/python.Changes
bindings/pythonas a workspace member.bindings/python/Cargo.tomlto inherit shared package metadata and dependencies with{ workspace = true }.bindings/python/Cargo.lock; Python bindings now use the rootCargo.lock.pyo3/extension-modulefrom workspace Cargo features and requirematurin >= 1.9.4, so maturin sets extension-module build mode only for Python extension builds.py-releaseCargo profile for Python wheel builds and configure maturin/release workflows to use it.check-rustCI job; Rust validation is covered by the main workspace CI.cargo metadata.overwrite-package-versionto accept a PEP 440versioninput and write it topyproject.toml.pyproject.tomlinstead of the workspaceCargo.toml, since.devand-rc.Nversions are not valid Cargo semver and can break workspace dependency resolution.Notes
Plain Cargo workspace builds now include
pyiceberg_core_rust, while actual Python wheels continue to be built through maturin. The Python-specific release optimization settings are isolated in thepy-releaseprofile so normal Rust release builds are not affected.make buildnow buildsbindings/pythonas part of the workspace because it runscargo build --all-targets --all-features --workspace. This is intentional for now: after removingpyo3/extension-module, the Python Rust crate can be built by plain Cargo, so the main workspace build can validate it.A possible follow-up improvement is to exclude
bindings/pythonfrom the default root build/test path withworkspace.default-members, while keeping full validation incargo check --workspace, clippy, and the maturin-based Python CI/release workflows. That would avoid building the Python cdylib in normal Rust builds while still keeping workspace dependency inheritance and CI coverage.Are these changes tested?
Yes
Tested affected workflows on my fork:
.github/workflows/release_python.yml, https://github.com/kevinjqliu/iceberg-rust/actions/runs/26416510024.github/workflows/release_python_nightly.yml, https://github.com/kevinjqliu/iceberg-rust/actions/runs/26416510760