Commit 7661806
authored
[lib2to3] Make grammar pickling faster (#6491)
* Now uses pickle protocol 4
* Doesn't wrap the grammar's `__dict__` in ordered dictionaries anymore as
dictionaries in Python 3.6+ are ordered by default
This still produces deterministic pickles (that hash the same with MD5).
Tested with different PYTHONHASHSEED values.1 parent 2bea947 commit 7661806
2 files changed
Lines changed: 3 additions & 25 deletions
File tree
- Lib/lib2to3/pgen2
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 89 | + | |
101 | 90 | | |
102 | | - | |
103 | | - | |
| 91 | + | |
104 | 92 | | |
105 | 93 | | |
106 | 94 | | |
| |||
141 | 129 | | |
142 | 130 | | |
143 | 131 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 132 | | |
156 | 133 | | |
157 | 134 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments