You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Python] "async" is now a reserved keyword in Python 3.7 #8328
Replace "async" variable/argument name use by anything else.
Reacted by Stephanie, Tomasz Prus, wzj103306, Karl Goldstein, Ryan Whittier, jmccaa, Kurt Peek, Prathik Kalakota, ashwinshastry, davidwzuora and 13 more
find path/ -type f -exec sed -i 's/async=params.get/is_async=params.get/g' {} +
find path/ -type f -exec sed -i 's/async=None/is_async=None/g' {} +
find path/ -type f -exec sed -i 's/if not async/if not is_async/g' {} +
Activity
austindrenski commentedon Aug 20, 2018
@ehlertjd Was this closed via #1345?
ehlertjd commentedon Aug 20, 2018
@austindrenski Nope! I'm using a copy of the swagger templates and updated them in my copy. I just referenced this issue for posterity.
gkatzioura commentedon Aug 23, 2018
A workaround for those with this issue using sed
find path/ -type f -exec sed -i 's/async=params.get/is_async=params.get/g' {} +
find path/ -type f -exec sed -i 's/async=None/is_async=None/g' {} +
find path/ -type f -exec sed -i 's/if not async/if not is_async/g' {} +
xavierhardy commentedon Aug 25, 2018
You should use snake_case (PEP8: https://www.python.org/dev/peps/pep-0008/#function-and-variable-names). I'd rather use
async_oris_async, but that does not really matter.There already is a pull request on that topic: #8401