This is an umbrella issue to collect all the syntax errors that are raised by the CPython compiler. These are different than the ones that are raised by the parser. IOW, the source code which raises these errors are valid as per the grammar.
A lot of them are mentioned in this comment. These all would be part of E999 rule.
Version-related errors
The following are both version-related and detected by the compiler. Many of them were originally tracked in #6591.
3.13
3.11
3.10
This is an umbrella issue to collect all the syntax errors that are raised by the CPython compiler. These are different than the ones that are raised by the parser. IOW, the source code which raises these errors are valid as per the grammar.
awaitoutside async function (PLE1142) ([syntax-errors]awaitoutside async functions #17363)yieldoutside function (F704) ([syntax-errors]yield,yield from, andawaitoutside functions #17298)returnoutside function (F706) ([syntax-errors]returnoutside function #17300)awaitin annotations (extending theyieldand named expression handling from [syntax-errors] Invalid syntax in annotations #17101) ([syntax-errors] Extend annotation checks toawait#17282)matchpattern (case {"x": 1, "x": 2}:) ([syntax-errors] Detect duplicate keys inmatchmapping patterns #17129)globaldeclaration (PLE0118) ([syntax-errors] Reimplement PLE0118 #17135)returnandyield#16520 ([syntax-errors] Starred expressions in return, yield, and for #17134)case [a, b, a]:)SyntaxError: name capture 'x' makes remaining patterns unreachableSyntaxError: wildcard makes remaining patterns unreachable[(a := ...) for a in b]#14395A lot of them are mentioned in this comment. These all would be part of
E999rule.Version-related errors
The following are both version-related and detected by the compiler. Many of them were originally tracked in #6591.
3.13
(cpython#111123) ([syntax-errors] Document behavior ofglobaldeclarations intrynodesglobaldeclarations intrynodes before 3.13 #17285)exceptblocks if the variable is only referenced in anelseblockelseblocks if the variable is only referenced in anexceptblock3.11
3.10
del __debug__is a syntax error on Python 3.10+ (cpython#89163)