Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Support Python 3 #132

Closed
frewsxcv opened this issue Aug 6, 2014 · 14 comments
Closed

Support Python 3 #132

frewsxcv opened this issue Aug 6, 2014 · 14 comments

Comments

@frewsxcv
Copy link

frewsxcv commented Aug 6, 2014

No description provided.

@heikoheiko
Copy link
Member

Python3:

  • miniupnpc: doesn't compile
  • ethereum-serpent: doesn't compile
  • pysha3 : ok
  • leveldb: ok

see also: #188

@heikoheiko heikoheiko mentioned this issue Dec 1, 2014
@heikoheiko
Copy link
Member

@vbuterin do we need to support py2.7?

Projects which will use pyethereum are probably new and should be build on py3 anyway.
Having to be compatible with py3 w/o being able to leverage its features would be unfortunate.

@heikoheiko
Copy link
Member

So there are two cases which we need to consider when deciding on python3 (the future) or python2.

pyeth as an application

Linux

  • Supported by all recent distributions and most older distributions (e.g. debian squeeze 2011)
  • Arch Linux even links python to python3, and Debian/Ubuntu and Fedora switch defaults

OS X / Windows

pyethereum used as a library

  • Most of the most popular libraries are py3 ready
  • Most projects who use it as a lib, are probably new projects and should use py3 anyway
    • if a major existing project can not support py3 (or py at all), they can still use the RPC-API
  • recent discusions on reddit and HN

@adamkrellenstein
Copy link

Isn't pybitcointools another Python 2-only dependency?

@vbuterin
Copy link
Contributor

It's actually py3-friendly now.
On Feb 18, 2015 4:41 AM, Adam Krellenstein notifications@github.com wrote:Isn't pybitcointools another Python 2-only dependency?

—Reply to this email directly or view it on GitHub.

@adamkrellenstein
Copy link

Hi, just wanted to let you guys know that @ouziel-slama and I are working on adding Python 3 support to pyethereum (and ethereum-serpent and rlp), so that we can use it (the VM, specifically) in https://github.com/CounterpartyXCP/counterpartyd. We've made some progress already, but we'd like to pass as many tests with our fork as possible, so that you guys are inclined to merge the patch upstream.

I guess the big question for us is do you want to preserve support for Python 2? Of course, I'm a big Py3k fan and would love to let Python 2 finally die ;), but it's up to you (and I'm not yet sure how much work it'll be to support both). @vbuterin?

Anyway, watch out for pull requests from us.

@vbuterin
Copy link
Contributor

vbuterin commented Mar 11, 2015 via email

@ouziel-slama
Copy link
Contributor

IMO, in what portion of distros is python3 available should not be a decisive element.
For end users, an "freeze" distribution with an installer should be available, else, with Python 2 or 3, they don't have the skills to install a python software.
For developers, most of them are using a virtualenv, and should not be a problem to install Python 3.
If all necessaries dependencies are available in Python 3 there is no reason to stay with Python 2.

@vbuterin
Copy link
Contributor

So, python packages generally don't come with "installers". The process is
either:

  1. sudo apt-get install python-pip
  2. pip install pyethereum

Or:

  1. git clone http://github.com/ethereum/pyethereum
  2. cd pyethereum
  3. sudo python setup.py install

That's the standard thing process that works with just about every python
package. If we make it any different from this, we lose a substantial
portion of users.

Also, plenty of people are still writing their code in python2. So, if they
have to switch over their entire architecture to py3 in order to use any
part of the pyethereum library code, then once again we lose users.

So, my general preference right now would be using six and trying to
maximally support both if we can. We've done it successfully with
pybitcointools; it passes all tests with py2, py3 and pypy right now.

@frewsxcv
Copy link
Author

So, python packages generally don't come with "installers". The process is either:

pip is bundled with Python starting in 2.7.9

@adamkrellenstein
Copy link

@vbuterin, the only people that are using pip or git are developers (not users), who of course should have no problem distinguishing between Python 2 and Python 3. Moreover, there's no problem with explicitly writing pip3 and python3 in all of the install instructions. That's what all new Python projects do, Counterparty included.

With regard to your second point, pyethereum is still in the proof-of-concept stage and obviously no production code depends on it. There aren't any projects that will have to switch over their architecture, and no one should be writing new code in Python 2. "Python 2.x is legacy, Python 3.x is the present and future of the language" (https://wiki.python.org/moin/Python2orPython3)

@PiDelport
Copy link

These are the currently open Python 3 PRs, just for easy reference: #238, #254, #329, #347.

#238 is big, while the other three are relatively small: would it be better to work toward getting #238 updated and merged first, or to try and fold the other three branches back into #238 first?

@pipermerriam
Copy link
Member

I believe #357 is ready for review and should close this issue.

@ofek
Copy link
Contributor

ofek commented Aug 17, 2017

@pipermerriam @vbuterin @joeykrug @heikoheiko Can this be closed?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants