Repository navigation
Replace Cython with the CPython limited API (abi3) - #716
Closed
adeebshihadeh wants to merge 2 commits into
Closed
adeebshihadeh wants to merge 2 commits into
adeebshihadeh wants to merge 2 commits into
Conversation
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.
Drops the Cython build dependency. The
ipcandvisionipcbindings are now handwritten C++ against the CPython limited API, so we ship onecp311-abi3wheel per platform instead of one per Python version. A single wheel passes the full test suite on Python 3.11, 3.12, 3.13 and 3.14.Same public API and module names (
msgq.ipc_pyx,msgq.visionipc.visionipc_pyx).Benchmark (in-process, ns/op, best of 3, pinned core)
send+recv, 64 Bsend+recv, 1 KiBsend+poll+recvreceive(non_blocking=True), emptyall_readers_updated()Cross-process 1 KiB ping-pong is within noise (~145–150k msgs/s for both). The stripped
.sois about half the size, andipcbuilds in ~1 s instead of ~5 s (cythonize + compile).Small behavior changes
Poller.poll()returns the registeredSubSocketobjects instead of new non-owning wrappersPubSocket.send()accepts any buffer, not onlybytesEvent.wait(),wait_for_one_event(),VisionIpcClient.connect()andavailable_streams()release the GIL while blocking; non-blockingreceiveno longer doesVisionBufkeeps its client alive and can't be instantiated directly.pxdfiles are no longer shipped, socimportfrom msgq is no longer possible