Repository navigation
Fix except-star wrapper types and traceback - #9646
youknowone merged 2 commits into
Conversation
Assisted-by: OpenAI Codex:model version not exposed
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 30 minutes. View limit details
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. |
The wrapped naked exception traceback test passed twice in hosted Windows CI for the except-star correction. Remove only its obsolete expectedFailure marker using update_lib; preserve the inherited test body and C-only skip. Assisted-by: OpenAI Codex:model version not exposed
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. |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] lib: cpython/Lib/traceback.py dependencies:
dependent tests: (178 tests)
Legend:
|
Summary
Use the builtin
BaseExceptionGroupconstructor for new except-star wrappers and combined raised groups. It selectsExceptionGroupfor ordinary exceptions and permits aBaseExceptionGroupwhen a child is aKeyboardInterrupt,SystemExit, or another non-ExceptionBaseException, as CPython 3.15 does.For a naked exception matched by
except*, give the new wrapper a traceback at the current handler instruction rather than copying the child's original traceback. The child keeps its original traceback.exception_group_matchdocuments that its caller must attach that handler traceback; the frame'sCHECK_EG_MATCHis the sole in-repository caller.This does not change the existing leaf-identity-based reraised-exception classification, malformed/no-location bytecode handling, or the separate subgroup derivation work in #9588. The extra group-type check is on the except-star matching path; no benchmark was run.
Validation
_PyEval_ExceptionGroupMatch,_PyExc_CreateExceptionGroup, and the VM's lasti, source location, traceback and frame-materialization conventions.rustfmt,git diff --check, and normal repository hooks passed. Source merge-trees were clean against Share exception group construction and filtering controls #9588, Drop replaced frame traces outside locks #9596 and Drop replaced exception and traceback fields outside locks #9600.test_traceback.test_exception_group_wrapped_nakedandtest_except_starcover related ordinary-exception behavior, but direct coverage for a naked non-ExceptionBaseException and mixed reraised groups was not found. Existing expected-failure markers are unchanged pending exact hosted CI evidence.