corpetty/py-etherscan-api

Syntax error on install

denilen opened this issue · 3 comments

bash-3.2$ python setup.py install
running install
running build
running build_py
running install_lib
byte-compiling /Library/Python/2.7/site-packages/etherscan/accounts.py to accounts.pyc
File "/Library/Python/2.7/site-packages/etherscan/accounts.py", line 24
def get_transaction_page(self, page=1, offset=10000, sort='asc', internal=False) -> list:
^
SyntaxError: invalid syntax

I am not sure if you have come to this conclusion or not already but the reason for the failed install is because you are using python 2.7. The use of the -> annotation (from Python 3) makes this module incompatible with Python 2. However, there is an alternative annotation syntax that could be used but that would up to @corpetty if he would want those changes to be implemented.

I have chosen to not be backwards compatible with python2. I would recommend upgrading to python3 to use this package. A pull request of a fork that is compatible is always welcome.

thx