-
Notifications
You must be signed in to change notification settings - Fork 42
Update to Python 3 #62
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
Conversation
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
However master already supports it, so lets use master until a official release is there.
Forbid augmented assignment of - attributes - subscripts
According to python2_7.ast and python3_{4,5,6}.ast these attributes are always
present. => No need for the hasattr checks.
The previous way worked great if there was a body to append the unpack statements. Unfortunately, tuple parameters are also allowed as parameters for lambda functions. lambda functions don't have a body where statements are allowed :( => No way to use the existing code. The new way wraps the tuple unpacking into a single expresion, by using nested lambdas. This expression can now be used wrap tuple parameters of lambda functions.
Python3 update
Revert "Python3 update"
Undo the changes in the old code
Fix the Python-3 variant which was not equivalent to the Python-2 one.
There's a backport this package part of `future` which provides other builtins (and breaks tests if it's installed).
Do not attempt to import builtins on Python 2.7
RestrictedPython expects it to be present in RestrictedPython.transformer.RestrictingNodeTransformer.transform_slice().
Add `slice()` to safe_builtins.
fix some spelling and conventions
Allow to create new classes with `safe_builtins` activated.
… circular imports
add PendingDeprecationWarnings to all old Implementation Modules
Enable default metaclass.
# Conflicts: # .gitignore # .travis.yml # docs/CHANGES.rst # setup.py
+ run doctest on source code
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.
This is (nearly) a complete rewrite of the package using the Python
astmodule instead of using the old and un maintainedcompilermodule.The API was kept the same.