-
Notifications
You must be signed in to change notification settings - Fork 6k
[Python] "async" is now a reserved keyword in Python 3.7 #8328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@austindrenski Nope! I'm using a copy of the swagger templates and updated them in my copy. I just referenced this issue for posterity. |
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' {} + |
You should use snake_case (PEP8: https://www.python.org/dev/peps/pep-0008/#function-and-variable-names). I'd rather use There already is a pull request on that topic: #8401 |
Description
"async" is now a reserved keyword in Python 3.7.
"async" is used as variable and argument name multiple time in swagger-codegen Python client.
This make the client non working on Python 3.7 (Raises SyntaxError).
Swagger-codegen version
2.3.1
Swagger declaration file content or url
https://github.com/Accelize/apyfal/blob/master/rest_api/input_spec.json
Command line used for generation
java -jar swagger-codegen-cli-2.3.1.jar generate -i input_spec.json -o output -l python"
Steps to reproduce
Import generated client in Python 3.7.
Related issues/PRs
None found.
Suggest a fix/enhancement
Replace "async" variable/argument name use by anything else.
The text was updated successfully, but these errors were encountered: