This repository was archived by the owner on Apr 6, 2026. It is now read-only.
Add a Python binding for kernel-abi-check#225
Merged
Conversation
ed6b560 to
42b70d4
Compare
We want to make a `kernels check` command, so we need to make these available in Python-land. This is mostly a straightforward mirroring from the Rust API.
0da3adb to
1ccc29a
Compare
ivarflakstad
approved these changes
Sep 24, 2025
ivarflakstad
left a comment
Member
There was a problem hiding this comment.
Not an expert at the requirements/design, but that's not really in question here either. In any case the pyo3 usage looks good to me :)
Comment on lines
+158
to
+162
| _ => { | ||
| return Err(PyValueError::new_err(format!( | ||
| "Unsupported binary format: {binary_format:?}" | ||
| ))); | ||
| } |
Member
There was a problem hiding this comment.
Nit: if we currently support all enums then maybe it's better to not include the _ case as all it does is move catching this case from compile time to runtime.
Member
Author
There was a problem hiding this comment.
We need a catch-other, because the enum is non-exhaustive: https://docs.rs/object/latest/object/enum.BinaryFormat.html#variants
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We want to make a
kernels checkcommand, so we need to make these available in Python-land. This is mostly a straightforward mirroring from the Rust API.