| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Add Python 3.15 compile(module=...) warning filtering. Move format-spec diagnostics to a fallible, literal-aware AST boundary; preserve nested literal warnings while excluding raw text and comments, map function-type fragments to source locations, and suppress duplicate type-comment emissions with per-call tracking. Keep unrelated legacy warning-detection and exact diagnostic metadata gaps documented by differential probes. Add focused flag, source-location, exception, reentrancy, filtering and literal-boundary regression coverage. Assisted-by: Codex:model-version-unavailable
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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.
| Back | FazBrowse Home | New Git URL |
Summary
Add Python 3.15's keyword-only compile(module=...) argument for SyntaxWarning filtering, including AST-only compilation and type comments. This is an independent native prerequisite for the 3.15 importlib/bootstrap migration; the advertised Python version and bundled libraries remain unchanged.
The implementation does not run a new whole-source warning scan before every AST parse or keep mutable warning context in VM-global/thread-local state.
Reference: CPython v3.15.0rc2, commit 435c9e5a798c99653e3ab64ce29baed0e4f3dfee. Its importlib source loader supplies this module context when compiling source.
Validation
Independent branch at a86db2711a26ece3781f39fea7b48c042f59bb3f:
Remaining scope limits
This does not claim full compiler-warning parity. Existing missing warnings for ordinary AST-only literals and some ordinary-source/raw/template paths, and unrelated parser/traversal ordering, remain outside this change.
The shared diagnostic formatter also retains precise differences from CPython: three nested-template error cases point at the actual backslash rather than CPython's shifted position; three function-type cases append a newline to SyntaxError.text; one existing codegen case lacks end fields and differs in source text. These do not change module filtering, exception identity/type, valid-source acceptance, or duplicate suppression. They are recorded rather than hidden behind skips or CPython-specific caret adjustments.
AI assistance
OpenAI Codex assisted with implementation, CPython comparison, tests, review, and this description under maintainer direction. The runtime did not expose the exact model version. Results are automated Linux x86_64 verification; no additional human-use or untested-platform validation is claimed.