Commit c34be6a
committed
Implement TypeAliasType, type annotations, and genericalias fixes
- TypeAliasType: lazy value evaluation via closures, __module__,
__parameters__, __iter__, evaluate_value, check_type_params,
IMMUTABLETYPE flag, Hashable/AsMapping/Iterable traits
- TypeAliasType constructor: positional-or-keyword arg validation,
duplicate/unexpected kwarg rejection
- type.__annotations__ setter: distinguish None assignment from deletion
- Annotation scope: name as __annotate__, format as positional-only,
__conditional_annotations__ uses Cell for both load and store
- Compiler: proper TypeParams/TypeAlias scope with closures,
find_ann covers match/try-except handlers
- symboltable: deduplicate TypeAlias value scope code
- GenericAlias: implement gaiterobject (generic_alias_iterator),
starred equality comparison, starred pickle via iterator reduce,
split attr_exceptions/attr_blocked for correct __dir__,
make_parameters/subs_parameters handle list/tuple args recursively,
repr_arg indexed access for mutation safety
- AST types: remove IMMUTABLETYPE (heap types, mutable)
- pymodule macro: preserve existing __module__ getset descriptors1 parent 8d16007 commit c34be6a
File tree
9 files changed
+214
-115
lines changed- Lib/test
- test_dataclasses
- crates
- codegen/src
- vm/src
- builtins
- stdlib
- ast
- types
9 files changed
+214
-115
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | 285 | | |
287 | 286 | | |
288 | 287 | | |
| |||
396 | 395 | | |
397 | 396 | | |
398 | 397 | | |
399 | | - | |
400 | 398 | | |
401 | 399 | | |
402 | 400 | | |
| |||
487 | 485 | | |
488 | 486 | | |
489 | 487 | | |
490 | | - | |
491 | 488 | | |
492 | 489 | | |
493 | 490 | | |
| |||
554 | 551 | | |
555 | 552 | | |
556 | 553 | | |
557 | | - | |
558 | 554 | | |
559 | 555 | | |
560 | 556 | | |
| |||
589 | 585 | | |
590 | 586 | | |
591 | 587 | | |
592 | | - | |
593 | 588 | | |
594 | 589 | | |
595 | 590 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
845 | 845 | | |
846 | 846 | | |
847 | 847 | | |
848 | | - | |
849 | 848 | | |
850 | 849 | | |
851 | 850 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1466 | 1466 | | |
1467 | 1467 | | |
1468 | 1468 | | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
1469 | 1474 | | |
1470 | 1475 | | |
1471 | 1476 | | |
| |||
1480 | 1485 | | |
1481 | 1486 | | |
1482 | 1487 | | |
1483 | | - | |
| 1488 | + | |
1484 | 1489 | | |
1485 | 1490 | | |
1486 | 1491 | | |
| |||
1982 | 1987 | | |
1983 | 1988 | | |
1984 | 1989 | | |
| 1990 | + | |
1985 | 1991 | | |
1986 | 1992 | | |
1987 | 1993 | | |
1988 | | - | |
1989 | | - | |
1990 | | - | |
| 1994 | + | |
1991 | 1995 | | |
1992 | 1996 | | |
1993 | 1997 | | |
| |||
0 commit comments