python-trio / hip

A new Python HTTP client for everybody
Other
79 stars 22 forks source link

Fix syncify script for Python 3.7 #26

Closed pquentin closed 5 years ago

pquentin commented 6 years ago

In Python 3.7, “async” and “await” are now tokenized as NAME token. A fix suggested by @njsmith that would also work for Python 2 would be to stop looking at token type and just look for tokens whose text is "async" or "await" since they can only have one meaning in bleached code anyway.

pquentin commented 5 years ago

Fixed in https://github.com/python-trio/unasync, we now support 3.5+, 3.8-dev included.