steemit / steem-python

The official Python (3) library for the Steem Blockchain.
https://steem.io
MIT License
153 stars 98 forks source link

Remove Breaking Python 3 Syntax #138

Closed cyon1c closed 6 years ago

cyon1c commented 6 years ago

A significant number of python3-isms have been removed from the library already. While working through importing the Steem object, a large majority of the python3 syntax was removed. Now working on removing any uncovered by the tests.

DoctorLai commented 6 years ago

I have a similar issue when running the CLI steempy

Traceback (most recent call last):
  File "/usr/local/bin/steempy", line 3, in <module>
    import steem
  File "/usr/local/lib/python2.7/dist-packages/steem/__init__.py", line 2, in <module>
    from .steem import Steem
  File "/usr/local/lib/python2.7/dist-packages/steem/steem.py", line 1, in <module>
    from .commit import Commit
  File "/usr/local/lib/python2.7/dist-packages/steem/commit.py", line 815
    def delegate_vesting_shares(self, to_account: str, vesting_shares: str, account=None):

SyntaxError: invalid syntax

I have installed Python3.6.3 and Python 2.7.14 on Ubuntu 17.0

cyon1c commented 6 years ago

@DoctorLai for the time being, if you are able to run the CLI with Python 3, you shouldn't have any issues. We are actively adding compatibility for Python 2.

holgern commented 6 years ago

Why adding python 2 support? Support ends 2020.