Skip to content

Updated type of source in compile() from Any #1524

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

Closed
wants to merge 1 commit into from

Conversation

ashwch
Copy link
Contributor

@ashwch ashwch commented Aug 6, 2017

Python 2:

source can either be a Unicode string, a Latin-1 encoded string or an AST object.

Python 3:

source can either be a normal string, a byte string, or an AST object.

@gvanrossum
Copy link
Member

Hm... The mypy test failures seem to be due to 3f9fafb (#1515). This would seem strange, but I think it is due to the addition of a dependency from builtins on ast (and implicitly on _ast). The builtins module and a small number of others are part of an import cycle that is always imported (because everything depends on builtins), and within this import cycle, strange things happen because it's part of bootstrapping the basic types.

Alas, I don't know how to fix this -- but I think it's wise to just close this rather than to try and worry too much about it.

@ashwch
Copy link
Contributor Author

ashwch commented Aug 7, 2017

Ouch! :-(

@ashwch ashwch closed this Aug 7, 2017
@ashwch ashwch deleted the improve-compile-source-type branch August 7, 2017 23:47
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.

2 participants