Repository navigation
Conversation
b-long
commented
Oct 4, 2026
b-long
commented
Oct 24, 2026
This comment was marked as outdated.
This comment was marked as outdated.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #409 +/- ##
===========================================
+ Coverage 74.31% 89.34% +15.03%
===========================================
Files 25 33 +8
Lines 4653 4929 +276
===========================================
+ Hits 3458 4404 +946
+ Misses 960 525 -435
+ Partials 235 0 -235 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
b-long
marked this pull request as ready for review
November 3, 2026 02:06
Member
Author
|
If anyone has time, I'd love a code review on this PR as it is fairly large. That said, I have increased test coverage significantly, and I am happy to field bugs after this is merged and released. Please let me know if you find something that you'd like to see fixed, and thank you for any/all feedback. 🙇 |
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.
Relates-to: #408
Adds opt-in alternatives to pybindgen, selected with
GOPY_BACKEND. The default stayspybindgen; its only output change is the Makefile fix below.gopy execapicfficfficapipybind11pybind11, C++ compilercapinanobindnanobind, C++ compilercapiEach backend runs in its own CI job on Linux, macOS and Windows (Python 3.11 and 3.12) without pybindgen installed. A benchmark job compares per-call time and memory across backends.
Notes
capireuses the default Go shim and build but writes the C module itself, matching pybindgen's argument handling and errors. It's the simplest way to drop pybindgen.cffi,pybind11andnanobindshare a plain-C Go shim that avoids the CPython C API. Functions needing a rawPyObject*are skipped withignoring function not supported by GOPY_BACKEND=<name>: ....gopy exebuilds withcapiwhen one of those three is selected: an executable embeds the interpreter through the C API anyway, andcapibinds everything they do.gopy genwrites forpybindgenandcapilinked against a separate<pkg>_golibrary with no rpath, so it didn't import as-is. cgo now builds one shared library, asgopy builddoes.TestMakefileruns for every backend.gopy pkgandgopy exenow restore the working directory when done.2015-present.Test coverage
Project coverage rises from 74.31% to 89.34% (+15.0 points), with 93.16% patch coverage (Codecov). New tests:
_examples/callbacks, additions to_examples/pyerrorsand_examples/slices, and Go unit tests inbind/.About 5 of those points come from setting
partials_as_hitsincodecov.ymlto matchgo tool cover;masterscores 79.4% under that rule, so ~10 points are new coverage.