Skip to content

[2.7] bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (GH-4977)#4980

Merged
benjaminp merged 1 commit into2.7from
backport-8a58771-2.7
Dec 22, 2017
Merged

[2.7] bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (GH-4977)#4980
benjaminp merged 1 commit into2.7from
backport-8a58771-2.7

Conversation

@benjaminp
Copy link
Copy Markdown
Contributor

@benjaminp benjaminp commented Dec 22, 2017

This is more complicated than it should be because we need to preserve the
useful mtime-based regeneration feature that lib2to3.pgen2.driver.load_grammar
has. We only look for the pickled grammar file with pkgutil.get_data and only if
the source file does not exist..
(cherry picked from commit 8a58771)

https://bugs.python.org/issue24960

…mar files (GH-4977)

This is more complicated than it should be because we need to preserve the
useful mtime-based regeneration feature that lib2to3.pgen2.driver.load_grammar
has. We only look for the pickled grammar file with pkgutil.get_data and only if
the source file does not exist..
(cherry picked from commit 8a58771)
@benjaminp benjaminp force-pushed the backport-8a58771-2.7 branch from fbcc8e0 to a1d7bad Compare December 22, 2017 20:42
@benjaminp benjaminp merged commit 770a802 into 2.7 Dec 22, 2017
@benjaminp benjaminp deleted the backport-8a58771-2.7 branch December 22, 2017 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants