Repository navigation
Commit f29c9e6
committed
fix: support Cython 3.3 DictComprehensionAppendNode layout
Cython 3.3 replaced the `key_expr`/`value_expr` children of
`DictComprehensionAppendNode` with a single `dict_item` child (a
`DictItemNode` with `key`/`value`), which made cython-lint crash with
`AttributeError` on any dict comprehension with a single, non-tuple loop
target.
- add `_value_from_dict_comprehension_append_node` helper that selects the
attribute layout based on a Cython version check
- depend on `packaging` and compare `packaging.version.Version` objects
instead of raw string tuples, which compared incorrectly for multi-digit
version segments (e.g. `3.10` sorted before `3.3`)
Fixes #2011 parent 4e5b339 commit f29c9e6
2 files changed
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
102 | | - | |
| 105 | + | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| |||
336 | 339 | | |
337 | 340 | | |
338 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
339 | 351 | | |
340 | 352 | | |
341 | 353 | | |
| |||
629 | 641 | | |
630 | 642 | | |
631 | 643 | | |
632 | | - | |
| 644 | + | |
633 | 645 | | |
634 | 646 | | |
635 | 647 | | |
| |||
683 | 695 | | |
684 | 696 | | |
685 | 697 | | |
686 | | - | |
| 698 | + | |
687 | 699 | | |
688 | | - | |
689 | | - | |
| 700 | + | |
| 701 | + | |
690 | 702 | | |
691 | 703 | | |
692 | | - | |
| 704 | + | |
693 | 705 | | |
694 | 706 | | |
695 | 707 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments