0rpc / zerorpc-python

zerorpc for python
http://www.zerorpc.io
Other
3.18k stars 382 forks source link

async is a keyword from python 3.7 causing incompatibility in tests. #232

Open tirkarthi opened 4 years ago

tirkarthi commented 4 years ago

async is a keyword from Python 3.7 so tests will fail with SyntaxError in Python 3.7 and above

rg 'async='
tests/test_client_async.py
56:    async_result = client.add(1, 4, async=True)
87:    async_result = client.lolita(async=True)
90:    async_result = client.add(1, 4, async=True)
bombela commented 4 years ago

Ok so we might still be able to keep async on the function side, for backward compatibility, and add a new alias keyword. Just need to find a good name...

async_result = client.add(1, 4, async_result=True) maybe...

VeNoMouS commented 4 years ago

workaround

while... really not ideal, a workaround for the existing code..

client.add(**{'async': True, 'a': 1, 'b': 4})