-
Notifications
You must be signed in to change notification settings - Fork 212
Detect __pyx_capi__ changes in testing #1067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
/ok to test |
|
Would this have caught the issues mentioned in #1030? |
Yes, symbols would have been removed from |
This theoretically would detect the change as described here. It's basically reverse engineering what Cython does when it does its custom "dynamic linking". I would have liked to have tested it directly, but it's surprisingly hard to build 11.7 today, and there don't seem to be any wheels or conda packages available. |
/ok to test |
As a way of detecting changes in "Cython ABI" (which is loosely defined, see #1030), this adds the contents of the
__pyx_capi__
dictionary to JSON files in the repository, and then adds a unit test to detect any changes.I think this may be useful as a first defense against ABI changes, however it's not a complete solution. This can not detect changes in structs or enums used across Cython modules.
There is also the risk of annoyance any time new functions are added, which is a completely "ABI safe" operation, but we need to update the baselines in order to detect unsafe operations (deletions) in the future. An alternative approach might be to download a baseline wheel and compare the ABI against it directly -- that could be done in CI but would be harder to run locally.
Closes #1030