Skip to content
This repository has been archived by the owner on Aug 8, 2018. It is now read-only.

Python 3.6 support #272

Open
kamikaze opened this issue Oct 31, 2017 · 7 comments
Open

Python 3.6 support #272

kamikaze opened this issue Oct 31, 2017 · 7 comments

Comments

@kamikaze
Copy link

please stop using dead Python version. We need Python 3.6+ to be supported

@kamikaze
Copy link
Author

gipc==0.4.0 is the problem. How about latest 0.6.0 ?

`$ pip install pyethapp
Collecting pyethapp
Downloading pyethapp-1.5.0-py2.py3-none-any.whl (335kB)
100% |████████████████████████████████| 337kB 3.4MB/s
Collecting scrypt (from pyethapp)
Downloading scrypt-0.8.0.tar.gz
Collecting leveldb (from pyethapp)
Downloading leveldb-0.194.tar.gz (228kB)
100% |████████████████████████████████| 235kB 4.9MB/s
Collecting ethereum>=1.5.1 (from pyethapp)
Downloading ethereum-2.2.0.tar.gz (152kB)
100% |████████████████████████████████| 153kB 6.2MB/s
Collecting statistics (from pyethapp)
Downloading statistics-1.0.3.5.tar.gz
Requirement already satisfied: decorator in ./projects/misc/.venv36/lib/python3.6/site-packages (from pyethapp)
Collecting lmdb (from pyethapp)
Downloading lmdb-0.93.tar.gz (870kB)
100% |████████████████████████████████| 880kB 2.0MB/s
Requirement already satisfied: requests in ./projects/misc/.venv36/lib/python3.6/site-packages (from pyethapp)
Collecting rlp>=0.4.4 (from pyethapp)
Downloading rlp-0.6.0.tar.gz
Collecting devp2p>=0.8.0 (from pyethapp)
Downloading devp2p-0.9.3.tar.gz (74kB)
100% |████████████████████████████████| 81kB 13.3MB/s
Collecting wheel (from pyethapp)
Downloading wheel-0.30.0-py2.py3-none-any.whl (49kB)
100% |████████████████████████████████| 51kB 8.1MB/s
Collecting CodernityDB (from pyethapp)
Downloading CodernityDB-0.5.0.tar.gz (45kB)
100% |████████████████████████████████| 51kB 10.9MB/s
Requirement already satisfied: click in ./projects/misc/.venv36/lib/python3.6/site-packages (from pyethapp)
Requirement already satisfied: pyyaml in ./projects/misc/.venv36/lib/python3.6/site-packages (from pyethapp)
Requirement already satisfied: pexpect in ./projects/misc/.venv36/lib/python3.6/site-packages (from pyethapp)
Collecting ipython<5.0.0,>=3.0.0 (from pyethapp)
Downloading ipython-4.2.1-py3-none-any.whl (737kB)
100% |████████████████████████████████| 737kB 2.4MB/s
Collecting gipc==0.4.0 (from pyethapp)
Downloading gipc-0.4.0.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-nz4fd6fx/gipc/setup.py", line 22, in
long_description=open("README.rst").read().decode('utf-8'),
AttributeError: 'str' object has no attribute 'decode'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-nz4fd6fx/gipc/`

@step21
Copy link

step21 commented Nov 3, 2017

Personally I think that is the least of the problems, but feel free to make it work and submit a PR. Apart from that, 2.7 is still widely used, like it or not.

@qtleeq
Copy link

qtleeq commented Nov 12, 2017

What is the best way of going about this? Just make a separate branch? I don't know anything about developing Python libraries that can use Python 2 and Python 3.

If pyethereum is Python 3 compatible, then this should be too.

@step21
Copy link

step21 commented Jan 9, 2018

I am not a maintainer, but I would make a separate branch, then submit a pull request for that. Personally, I would just be happy if it would run properly with Python 2. Whether thinkg work well between Python 2 and 3 depends. Minimum is changing print to a function and paying attention to how strings/bytestrings are handled.

@AndreMiras
Copy link

I'm using some of pyethapp components for a Python3 project I'm working on. Everything seems to work OK so far. But having it "officially" supported would be great.
I'm willing to work on a pull request that makes tests pass in Tox for Python 2 and 3, but only if the devs would eventually merge it. Are the maintainers interested?

@pdonorio
Copy link

pdonorio commented May 5, 2018

apart from that, 2.7 is still widely used, like it or not.

I'm not quite sure that is a good explanation for using a dead language (2.7) as "default" when developing, while not even supporting the latest stable release (3.6) of Python.

Anyway the problem with using Python3 in the ethereum ecosystem is related to all sub packages which are not able to be installed. Most of them have (gipc in this case is the first to fail, but there are a lot of others as well) the issue related to the README open in the setup.py. The error reported can be fixed to work both in Python2 and Python3 with:

import codecs
codecs.open(file, encoding='utf-8')

But how can we, for example, ask this fix to be applied to all the packages who fail that? Open an issue and fork and PR all of them?

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

No branches or pull requests

5 participants