Repository navigation
Fix strict tokenizer lexical error propagation - #9935
youknowone wants to merge 2 commits into
Conversation
Propagate lexical errors without treating parser recovery as tokenizer failure. Preserve extra-token tolerance and CPython diagnostic positions and token ordering. Remove the passing canonical invalid-syntax expectedFailure marker. Implementation and differential validation were AI-assisted. Assisted-by: Codex:model-unspecified
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default. Goddamn.
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 f*ckin' support helps us grow. Hold the f*ck up — If you like it, consider giving us a shout-out. |
📦 Library DependenciesThe following Lib/ modules were modified. I ain't playin'. Here are their dependencies: [x] lib: cpython/Lib/tokenize.py dependencies:
dependent tests: (181 tests)
Legend:
|
Merging this muthaf*ckin' PR will not alter performance
Comparing Footnotes
|
Keep genuine nested f/t-string brace errors while allowing pdb convenience variables through extra-token mode. Reuse bracket tracking rather than suppressing lexical errors globally. Assisted-by: Codex:model-unspecified
Summary
test_invalid_syntaxexpectedFailure marker. No new repository tests or changes to canonical assertions.Verification
bf68333baseline.test_tokenizepasses (132 tests run).Remaining limits
This is not complete tokenizer parity. Ruff splits invalid Unicode identifiers such as
a€b, so strict mode may emit the valid prefix before the correct diagnostic, and extra-token boundaries differ — no bullsh*t. A private lexer workaround is deliberately not added. A continuation ending in bare CR still has an EOF line/offset difference; LF/CRLF probes match. Oh, you gonna love this: Existing eager readline/callback ordering and numeric-keyword SyntaxWarning/filter behavior remain outside this muthaf*ckin' change — no bullsh*t.AI assistance
Check it: Implementation, differential probes, and independent review used OpenAI Codex. The f*ckin' runtime does not expose an exact model version, so the commit records
Assisted-by: Codex:model-unspecifiedrather than inventing one.