python: remove non-async code path from the aiohttp generator#16601
python: remove non-async code path from the aiohttp generator#16601wing328 merged 3 commits intoOpenAPITools:masterfrom
Conversation
This removes all the non-async code from the aiohttp generator: * all the methods that should be asynchronous are marked as `async` * the `async_req` parameter is gone; calls are directly awaitables now * the async calls into a thread pool are gone and the thread pool is gone too (now useless) Closes: OpenAPITools#15824 Closes: OpenAPITools#5539 Related: OpenAPITools#763 Related: OpenAPITools#3696
|
I noticed GitHub Actions doesn't run tests for the client in https://github.com/OpenAPITools/openapi-generator/tree/master/samples/openapi3/client/petstore/python-aiohttp: I can also take a look to add a new workflow to test this specific client, just let me know. |
Or another sample client (like an aiohttp-based echo API client for instance) |
|
FYI @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @arun-nalla (2019/11) @krjakbrjak (2023/02) |
|
looks good to me. the change seems to be transparent to end uesrs consuming the python sdk as all tests still pass without any need to update the test. |
This removes all the non-async code from the aiohttp generator:
asyncasync_reqparameter is gone; calls are directly awaitables nowCloses: #15824
Closes: #5539
Related: #763
Related: #3696
The code is extracted from #15878, readjusted to remove the typing changes and fixed for the aiohttp client tests to pass.
@krjakbrjak @wing328
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.For Windows users, please run the script in Git BASH.
master(7.0.1 - patch release),7.1.x(minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)