GeezerVison is showing github.com — Honor preserve_exc truth conversion before interpreter calls by youknowdot · Pull Request #9759 · RustPython/RustPython
Conversation
youknowdot
commented
Nov 8, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Call the preserve_exc truth-value converter before restrict and interpreter-id resolution in _interpreters.call.
CPython 3.15's Clinic wrapper calls PyObject_IsTrue(preserve_exc) even though the implementation currently ignores the resulting flag. Skipping this conversion suppresses user callbacks and exceptions, and changes their priority relative to restrict and id errors.
This narrowly keeps the existing FuncArgs, ArgSpec, argument checks, and ownership unchanged. It does not migrate the module's 14 remaining generic signatures or claim full Clinic parity.
The regression covers conversion exceptions/order, tuple/dict checks preceding flag conversion, and temporary flags retaining their original lifetime and cleanup order for both **dict insertion orders. A wider typed-argument migration was deliberately excluded because it changed observable finalization order.
Validation
- Workspace tests, CAPI tests, workspace/CAPI strict Clippy, clean release build and normal commit hooks pass.
- Focused regression passes on CPython 3.15.1 and RustPython; the full existing
stdlib_subinterpreters.py snippet also passes on RustPython.
- All 273 pre-existing binding/error observations match the unchanged main binary. Four direct/
**dict call forms retain their original ownership order; the only added trace event is the required preserve_exc truth conversion.
- Full raw signature inventory is unchanged (16,227 observed paths); no Guard raw and inspected signature observations in CI #9628 baseline refresh is required for this patch.
test_interpreters.test_api was attempted but skipped entirely with GIL disabled (zero tests ran), not counted as passed coverage.
- The pytest wrapper is unavailable; its previously denied installation was not retried. The snippet was executed directly.
Summary by CodeRabbit
- Bug Fixes
- Corrected the order in which interpreter call options are validated, so errors in
preserve_exc are reported before errors in restrict or interpreter ID lookup.
- Invalid arguments are still rejected before either option is converted.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
Assisted-by: OpenAI Codex:GPT-6.1
coderabbitai
Bot
commented
Nov 8, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Caution
Review failed
The pull request is closed.
Walkthrough
-
_interpreters.call now evaluates preserve_exc truthiness before processing restrict or resolving the interpreter ID. Regression tests cover conversion order, error precedence, argument validation, and keyword-value lifetimes.
Changes: Interpreter call argument conversion
| Layer / File(s) |
Summary |
Flag conversion and regression coverage crates/vm/src/stdlib/_interpreters.rs, extra_tests/snippets/stdlib_subinterpreters.py |
_interpreters.call evaluates preserve_exc before restrict parsing and ID resolution. Regression tests check conversion errors, argument validation, and keyword-value cleanup order. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: youknowone
Merge Risk: Minimal · up to 8aa42
-
No concrete merge-blocking issue is identified in the supplied evidence. The conversion order and described regression coverage align with the intended behavior; merge remains subject to normal checks.
- [ ] 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.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-09T06:03:52.136298Z |
8aa42b1 |
Draft marked ready |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|