Commit bb6ecb3
committed
Add ast.Constant support for Python 3.8+ in _ast_eval
Updated the _ast_eval function to handle ast.Constant nodes for compatibility with Python 3.8 and newer, where ast.Num is deprecated. This ensures correct evaluation of constants across Python versions.1 parent a230105 commit bb6ecb3
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
715 | 716 | | |
716 | 717 | | |
717 | 718 | | |
718 | | - | |
719 | | - | |
720 | | - | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
721 | 731 | | |
722 | 732 | | |
723 | 733 | | |
| |||
0 commit comments