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
Switch to py3 #87
Comments
But yes we should make raiden py3 compatible and have a separate tox environment for |
I'm going to work on this for next sprint. As most of our dependencies already announced they're deprecating py2 support, I'd like to work in the direction of full migration to python3 when this gets fully solved. |
As discussed in the sprint planning meeting I have completely changed my mind since last year and I am wondering why do we want to keep py2 compatibiity instead of just deprecating it? @konradkonrad @heikoheiko @hackaugusto Are there any reasons to support both py2 and py3 instead of just opting for a complete switch to py3? The way I see it having a hybrid approach we end up putting quite a bit more work on ourselves as we have to write hybrid code for both python versions. |
Fix upcoming solc 0.5.0 breaking changes
Q: Shall we also break py2 compatibility and use new py3 features?
Yes, py3 only.
General information about the transition can be found in
Preparation
encode('hex')
with a py3 compatible variant (More py3 fixes #1158)decode('hex')
with a py3 compatible variant (More py3 fixes #1158)web3.py
andpy-evm
.caniusepython3
lists 5 dependencies that need to be updated:Switch
[value|keys|items]iter
future
imports__future__
importsbytearray
objects work differentlyFix tests
This is an overview over which tests have been fixed already. See the
palango/py3-fixes
branchOnce on python3
Check division operators
Remove python 2 variants
See where
list(...)
around olditer
calls is neededswitch HTTP statuses to https://docs.python.org/3.6/library/http.html HTTPStatus
Add type annotations to important interfaces
Run
mypy
analysis, see where type signatures make senseAdapt linux and macOS build infrastructure for py3
py3 porting gotchas
None
now returnb''
str
now returnbytes
, we have to define how we want to handle thisThe text was updated successfully, but these errors were encountered: