Vyper: Python 3.7 raise an syntax error for generator with a comma

Created on 11 Jul 2018  路  3Comments  路  Source: vyperlang/vyper

Version Information

  • vyper Version: 0.1.0b1
  • pyethereum Version: N/A
  • OS: osx
  • Python Version (python --version): 3.7.0
  • Environment (output of pip freeze): pip3 freeze
    aiohttp==2.3.10
    appnope==0.1.0
    asn1crypto==0.24.0
    async-lru==0.1.0
    async-timeout==3.0.0
    attrdict==2.0.0
    backcall==0.1.0
    certifi==2018.4.16
    cffi==1.11.5
    chardet==3.0.4
    coincurve==7.1.0
    cryptography==2.2.2
    cytoolz==0.9.0.1
    decorator==4.3.0
    eth-abi==1.1.1
    eth-account==0.2.3
    eth-bloom==1.0.0
    eth-hash==0.1.4
    eth-keyfile==0.5.1
    eth-keys==0.2.0b3
    eth-rlp==0.1.2
    eth-utils==1.0.3
    hexbytes==0.1.0
    idna==2.7
    idna-ssl==1.1.0
    ipython==6.4.0
    ipython-genutils==0.2.0
    jedi==0.12.1
    lru-dict==1.1.6
    lxml==4.2.3
    multidict==4.3.1
    netdisco==1.5.0
    netifaces==0.10.7
    parsimonious==0.8.0
    parso==0.3.1
    pexpect==4.6.0
    pickleshare==0.7.4
    plyvel==1.0.4
    prompt-toolkit==1.0.15
    ptyprocess==0.6.0
    py-ecc==1.4.3
    py-evm==0.2.0a18
    pycparser==2.18
    pycryptodome==3.6.4
    pyethash==0.1.27
    Pygments==2.2.0
    pysha3==1.0.2
    python-dateutil==2.7.3
    requests==2.19.1
    rlp==1.0.1
    simplegeneric==0.8.1
    six==1.11.0
    toolz==0.9.0
    traitlets==4.3.2
    trie==1.3.7
    uPnPClient==0.0.8
    urllib3==1.23
    vyper==0.1.0b1
    wcwidth==0.1.7
    web3==4.4.1
    websockets==5.0.1
    yarl==1.2.6
    zeroconf==0.20.0

What's your issue about?

Run make test for Vyper master branch, report the following error:

File "/Users/vici/vyper-env/lib/python3.7/site-packages/vyper-0.1.0b1-py3.7.egg/vyper/parser/parser_utils.py", line 3, in
File "/Users/vici/vyper-env/lib/python3.7/site-packages/py_evm-0.2.0a18-py3.7.egg/evm/__init__.py", line 14, in
from evm.chains import ( # noqa: F401
File "/Users/vici/vyper-env/lib/python3.7/site-packages/py_evm-0.2.0a18-py3.7.egg/evm/chains/__init__.py", line 1, in
from .base import ( # noqa: F401
File "/Users/vici/vyper-env/lib/python3.7/site-packages/py_evm-0.2.0a18-py3.7.egg/evm/chains/base.py", line 630
(ancestor.hash, ancestor)
^
SyntaxError: Generator expression must be parenthesized

How can it be fixed?

.../vyper-env/lib/python3.7/site-packages/py_evm-0.2.0a18-py3.7.egg/evm/chains/base.py

recent_ancestors = dict(
(ancestor.hash, ancestor)
for ancestor in self.get_ancestors(MAX_UNCLE_DEPTH + 1),
)

FIX: remove the comma in generator.

Cute Animal Picture

cat

bug

Most helpful comment

@vici0 I am in the process of removing py_evm as dependency so should indirectly solve the above as well ;)

All 3 comments

@vici0 I am in the process of removing py_evm as dependency so should indirectly solve the above as well ;)

@vici0 please try with the latest master. The py-evm dependencies have been removed.

Closing, please create a new issue if this still occurs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

travs picture travs  路  3Comments

ben-kaufman picture ben-kaufman  路  4Comments

fubuloubu picture fubuloubu  路  3Comments

pipermerriam picture pipermerriam  路  3Comments

robinsierra picture robinsierra  路  3Comments