Commit f9648ba
committed
gh-155292: Skip updating unicodedata with mismatched interpreter
mkstringprep uses things like str.lower(), so it generates the wrong
result if run in an interpreter with a different Unicode data version
than the target.
This means that updating the Unicode version is a two-step process:
run makeunicodedata.py, then compile, then run mkstringprep.py.
The two steps can (and should) be combined when re-running
regen-unicodedata to verify that the data is up to date.
The GH-155292 fix only considered that case.
Change makeunicodedata.py to only run mkstringprep.py when the
current interpreter is up to it. Otherwise, show a reminder.
As an extra complication, download the input (RFC 3454) in
the "first step", since an out-of-date stringprep.py's freshness
assertion may prevent downloads.1 parent 3b56438 commit f9648ba
2 files changed
Lines changed: 30 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
819 | 822 | | |
820 | 823 | | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
821 | 830 | | |
822 | 831 | | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
823 | 844 | | |
824 | 845 | | |
825 | 846 | | |
| |||
934 | 955 | | |
935 | 956 | | |
936 | 957 | | |
937 | | - | |
938 | 958 | | |
939 | 959 | | |
940 | 960 | | |
941 | 961 | | |
942 | 962 | | |
943 | | - | |
944 | | - | |
| 963 | + | |
945 | 964 | | |
946 | 965 | | |
947 | 966 | | |
948 | 967 | | |
949 | 968 | | |
950 | 969 | | |
951 | 970 | | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
952 | 978 | | |
953 | 979 | | |
954 | 980 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 6 | | |
10 | 7 | | |
11 | 8 | | |
| |||
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 52 | + | |
64 | 53 | | |
65 | 54 | | |
66 | 55 | | |
| |||
0 commit comments