| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Assisted-by: OpenAI Codex:gpt-5
|
Caution Review failedThe pull request is closed. Configuration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: 0d54839a-8b9d-49c2-8236-de9b078a6285 📥 CommitsReviewing files that changed from the base of the PR and between 212c0d0 and 71cd9bd. 📒 Files selected for processing (2)
📝 Walkthrough WalkthroughThe compiler now restores symbol-table cursors after compiling duplicated finally bodies. Regression tests cover returns, loop control flow, nested scopes, single cleanup execution, and generator return values. Changestry/finally compilation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: shaharnaveh ✨ Finishing Touches 🧪 Generate unit tests (beta)
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. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
Assisted-by: OpenAI Codex:gpt-5
| Back | FazBrowse Home | New Git URL |
Summary
Root cause
Leaving a try block early compiles its finally body once for the early-exit path and again for the statement's normal cleanup paths. The first copy consumed the nested-scope symbol-table cursors. When the later copy reached a comprehension or another nested scope, codegen reported SyntaxError: no symbol table available.
Saving and restoring all three cursor components around the early-exit copy makes that speculative emission cursor-neutral, matching the existing treatment of duplicated codegen paths.
This surfaced while importing pytest: _pytest/pytester.py has a generator hook that returns from a try and uses comprehensions in finally.
Validation
Summary by CodeRabbit
Bug Fixes
Tests