-
Notifications
You must be signed in to change notification settings - Fork 321
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
feature/465 drop support for python27 #466
feature/465 drop support for python27 #466
Conversation
Remove all references to Python 2.7 Refs: ethereum#465
Two tests failed, likely caused by 2to3 refactoring. WIP. |
@cryptomental This was on my TODO list. Thank you for taking this up. If you need any help let me know! |
2to3 tool applies a series of fixers to transform code into Python 3.x specific syntax. Used command: 2to3 -x dict -n -w populus/ Refs: ethereum#465
2358ced
to
c3392fa
Compare
Remove implementation and conditional import in __init__. Refs: ethereum#465
2to3 tool incorrectly changed __nonzero__ to __bool__, leaving two methods with the same name. Refs: ethereum#465
Thanks @voith ! Build is green and so will be master after the merge. I fixed the error introduced by 2to3 tool and also removed Python 2 version of six util. |
@@ -9,7 +9,7 @@ | |||
|
|||
|
|||
if sys.version_info.major == 2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this whole if
block shouldn't be necessary anymore.
@cryptomental Can you make the small change suggested by carver? |
@@ -12,7 +12,7 @@ class VyperBackend(BaseCompilerBackend): | |||
|
|||
def get_compiled_contracts(self, source_file_paths, import_remappings): | |||
try: | |||
from vyper import compiler | |||
from .vyper import compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seemed wrong to me and I've fixed this in #469. Although vyper
library and this module have the same name, import inside the function works fine.
@cryptomental I created a new PR #469 with your changes cherry-picked. I hope you don't mind! I have added the change that @carver suggested and also fixed a bug that was introduced in this PR. I also added the new style super calls in python3. |
What was wrong?
Python 2 Support ends. Additionally some dependencies no longer work for Python 2.7.
How was it fixed?
Use 2to3 tool to apply a set of fixers to convert code into Python3 specific syntax, remove Python 2.7 from tox, Travis and setup.py
Cute Animal Picture