SIGN IN SIGN UP

Add Python version checks to native parser (#21539)

The native parser (rust based) previously accepted newer Python syntax
without checking the configured target Python version, whereas the
legacy parser (fastparse) would report when a feature isn't available on
the target (although those would be blocking errors). This PR adds those
compatibility checks to the native parser so that it produces a non
blocking error.

The feature gates added are: 
- improved type parameter syntax for Python 3.12
- type parameter defaults for Python 3.13 
- type alias statements for Python 3.12
- exception groups (except*) for Python 3.11
- star unpack for Python 3.11
- t-strings for Python 3.14

I've also moved the tests that would now introduce a python version
check error to it's own test file so that it gets the correct Python
versoin

In a later PR, I will be adding support for checking this feature since
it requires modifying the rust parser a bit:
- Parentheses optional for multiple exception types in except
K
Kevin Kannammalil committed
fad733ff78852f1aa435485fead63ca7506849f8
Parent: 84a20bd
Committed by GitHub <noreply@github.com> on 6/4/2026, 12:49:38 PM