feat(python): bind pairwise streams - #885
Open
maxi-maxima wants to merge 2 commits into
Open
Conversation
maxi-maxima
marked this pull request as ready for review
August 19, 2026 02:34
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.
Closes #882
What changed
PyStream::pairwisebinding that keeps the previousPyElementas resettable engine statepairwise().split()composes without another conversion pathStream.pairwise()method and document it besidedifference()Why
The Rust
pairwiseop already reaches all three engines, but its typed(T, T)output cannot pass through the ordinary erased#[pyop]route as onePyElement. The Python binding therefore needs the same state machine at the erased edge and must explicitly materialize a Python tuple.Validation
cargo fmt --all -- --checkcargo metadata --no-deps --format-version 1git diff --checkpython -m py_compile crates/wingfoil-python/tests/test_interop.pyThe Rust lint/test commands and
maturin develop && pytestcannot start on this Windows host because the MSVC linker (link.exe) is not installed. The PR is draft so the upstream Linux checks can provide the executable validation before it is marked ready.