Repository navigation
Add PyOS_vsnprintf & PyOS_snprintf to the capi - #9409
Conversation
PyOS_vsnprintf % PyOS_snprintf to the capiPyOS_vsnprintf & PyOS_snprintf to the capi
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Add snprintf wrappers crates/capi/src/pyerrors.rs |
Adds PyOS_snprintf and PyOS_vsnprintf. The latter returns -666 when size exceeds c_int::MAX - 1. When size > 0 and the destination is non-null, it writes a terminating NUL at str[size - 1]. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Feature
Suggested reviewers: youknowone
Merge Risk: 
Minimal · up to 5b6a5
-
No merge-blocking risk is established; normal build and test checks remain appropriate.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title names the two C APIs the PR adds, PyOS_vsnprintf and PyOS_snprintf, and the raw summary confirms both are added to crates/capi/src/pyerrors.rs. The title matches the main change and the commit message.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 1 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
One of checkbox below must be checked.
Summary
Summary by CodeRabbit