danpaquin / coinbasepro-python

The unofficial Python client for the Coinbase Pro API
MIT License
1.82k stars 732 forks source link

WebsocketClient syntax error prevents client from working #386

Open peterzal opened 4 years ago

peterzal commented 4 years ago

A syntax error was introduced here https://github.com/danpaquin/coinbasepro-python/pull/381/files#diff-57a4208fce375ee0b398b308ead6930aR33

This results in the test suite failing as well as prevents the client from working

============================================================================================================ test session starts =============================================================================================================
platform linux2 -- Python 2.7.17, pytest-4.6.9, py-1.8.1, pluggy-0.13.1
rootdir: /home/peterzal/coinbasepro-python
collected 0 items / 2 errors                                                                                                                                                                                                                 

=================================================================================================================== ERRORS ===================================================================================================================
____________________________________________________________________________________________ ERROR collecting tests/test_authenticated_client.py _____________________________________________________________________________________________
../.local/lib/python2.7/site-packages/_pytest/python.py:507: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
../.local/lib/python2.7/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
../.local/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:304: in load_module
    exec(co, mod.__dict__)
tests/test_authenticated_client.py:5: in <module>
    from cbpro.authenticated_client import AuthenticatedClient
cbpro/__init__.py:3: in <module>
    from cbpro.websocket_client import WebsocketClient
E     File "cbpro/websocket_client.py", line 33
E       *,
E        ^
E   SyntaxError: invalid syntax
________________________________________________________________________________________________ ERROR collecting tests/test_public_client.py ________________________________________________________________________________________________
../.local/lib/python2.7/site-packages/_pytest/python.py:507: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
../.local/lib/python2.7/site-packages/py/_path/local.py:701: in pyimport
    __import__(modname)
../.local/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:304: in load_module
    exec(co, mod.__dict__)
tests/test_public_client.py:6: in <module>
    from cbpro.public_client import PublicClient
cbpro/__init__.py:3: in <module>
    from cbpro.websocket_client import WebsocketClient
E     File "cbpro/websocket_client.py", line 33
E       *,
E        ^
E   SyntaxError: invalid syntax
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================================================================== 2 error in 0.31 seconds ===========================================================================================================
mcardillo55 commented 3 years ago

So from the comments of this commit, it looks like this idea was based on PEP3102, which requires Python 3. Python 2 has been officially unsupported by the PSF for a while now. Are we still attempting to maintain Python 2 compatibility?

Londo-Mollari commented 3 years ago

Issue confirmed: This code does not run on Python 2.7, but does run on Python 3.6.

Tectract commented 3 years ago

There are a TON of people locked to Python2.7 still. Argh