Skip to content

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

Merged
benjaminp merged 1 commit intopython:3.6from
miss-islington:backport-8a58771-3.6
Dec 22, 2017
Merged

[3.6] bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (GH-4977)#4979
benjaminp merged 1 commit intopython:3.6from
miss-islington:backport-8a58771-3.6

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

@miss-islington miss-islington 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

…les (pythonGH-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)
@miss-islington
Copy link
Copy Markdown
Contributor Author

@benjaminp: Backport status check is done, and it's a success ✅ .

@benjaminp benjaminp merged commit c1b8eb8 into python:3.6 Dec 22, 2017
@miss-islington
Copy link
Copy Markdown
Contributor Author

Thanks, @benjaminp!

@miss-islington miss-islington deleted the backport-8a58771-3.6 branch December 22, 2017 20:51
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.

4 participants