{{ message }}
bpo-41194: Convert _ast extension to PEP 489 - #21293
Merged
Merged
Conversation
Convert the _ast extension module to PEP 489 "Multiphase initialization". Replace the global _ast state with a module state.
Member
Author
corona10
approved these changes
Jul 3, 2020
corona10
left a comment
Member
There was a problem hiding this comment.
Looks good with a simple question :)
Member
Author
But https://travis-ci.org/github/python/cpython/builds/704696576 is the build and it completed. I don't get it :-(
|
Member
Author
|
I close/reopen my issue to force a new Travis CI build :-( |
Member
|
I did same thing on #21294 :( |
Member
|
re-open :) |
vstinner
added a commit
that referenced
this pull request
Aug 10, 2020
* bpo-41194: Convert _ast extension to PEP 489 (GH-21293) Convert the _ast extension module to PEP 489 "Multiphase initialization". Replace the global _ast state with a module state. (cherry picked from commit b1cc6ba) * bpo-41204: Fix compiler warning in ast_type_init() (GH-21307) (cherry picked from commit 1f76453)
encukou
reviewed
Aug 25, 2020
Member
There was a problem hiding this comment.
As noted in https://bugs.python.org/issue41631, this is incorrect :(
PyImport_GetModule looks in sys.modules, which is modifiable by the user, and so it's not guaranteed to return _ast.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Convert the _ast extension module to PEP 489 "Multiphase
initialization". Replace the global _ast state with a module state.
https://bugs.python.org/issue41194