]> granicus.if.org Git - python/commit
[lib2to3] Make grammar pickling faster (#6491)
authorŁukasz Langa <lukasz@langa.pl>
Tue, 17 Apr 2018 00:33:59 +0000 (17:33 -0700)
committerGitHub <noreply@github.com>
Tue, 17 Apr 2018 00:33:59 +0000 (17:33 -0700)
commit76618061b92e23a53b78b7ec3a173cb0e7749b4a
treebf9566760688e23d116ad8ae0d241c7091950463
parent2bea9476286ad8e2e87bf0415ff743b1487c5018
[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.
Lib/lib2to3/pgen2/grammar.py
Misc/NEWS.d/next/Library/2018-04-16-16-21-09.bpo-23403.rxR1Q_.rst [new file with mode: 0644]