Skip to content
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

29 tasks done
heikoheiko opened this issue Jul 8, 2016 · 3 comments
29 tasks done

Switch to py3 #87

heikoheiko opened this issue Jul 8, 2016 · 3 comments


Copy link

heikoheiko commented Jul 8, 2016

Q: Shall we also break py2 compatibility and use new py3 features?
Yes, py3 only.

General information about the transition can be found in


  • replace encode('hex') with a py3 compatible variant (More py3 fixes #1158)
  • replace decode('hex') with a py3 compatible variant (More py3 fixes #1158)
  • use compatible imports
  • get rid of own dependency forks
    • pystun
      • looks like this is not maintained any more, what do we do about it? Seems to work for now.
    • ethereum
      • We'll stay with 1.6.1 for now. It's compatible with py3 and doesn't break the API. In the long term we want to move to and py-evm.
  • Check library dependencies, caniusepython3 lists 5 dependencies that need to be updated:
    • filelock
    • gevent-websocket
    • marshmallow-polyfield
    • miniupnpc
    • tinyrpc


  • Remove usage of [value|keys|items]iter
  • Remove future imports
  • Remove __future__ imports
  • bytearray objects work differently

Fix tests

This is an overview over which tests have been fixed already. See the palango/py3-fixes branch

  • unit
  • smart_contracts
  • property
  • long_running
  • integration
  • api

Once on python3

py3 porting gotchas

  • Blockchain calls that used to return None now return b''
  • Blockchain calls that used to return str now return bytes, we have to define how we want to handle this
Copy link

LefterisJP commented Oct 20, 2016

@heikoheiko Please let's not break py2 compatibility.

But yes we should make raiden py3 compatible and have a separate tox environment for py3 just like we have in pyethereum.

@andrevmatos andrevmatos self-assigned this Nov 16, 2017
@andrevmatos andrevmatos added this to the Next minor release milestone Nov 16, 2017
Copy link

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.

Copy link

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.

@palango palango changed the title py3 compatibility Switch to py3 Dec 6, 2017
err508 pushed a commit that referenced this issue Aug 22, 2018
Fix upcoming solc 0.5.0 breaking changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

6 participants