Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 22, 2017

Conversation

benjaminp
Copy link
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