Expose symbol scopes through _symtable - #8538
Conversation
Pack symbol scopes with definition flags in _symtable.symbols for Lib/symtable.py. Assisted-by: Codex:gpt-5
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review. 📝 WalkthroughWalkthrough
ChangesSymbol scope encoding
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to This is a localized behavior fix with no actionable merge-blocking risk remaining; merge after normal formatting and lint checks. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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. Comment |
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] lib: cpython/Lib/symtable.py dependencies:
dependent tests: (2 tests)
Legend:
|
Summary
_symtableomitted symbol scope information, causingLib/symtable.pyto report incorrect globals, locals, and free variables.Expose the missing scope information so the public
symtableAPI returns CPython-compatible results.Testing
cargo run --release -- -m test test_symtableAI assistance
Codex (GPT-5) was used to investigate and implement this change.
I reviewed and validated all AI-assisted work.
Summary by CodeRabbit