swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.73k stars 6.02k forks source link

[Python] Lazy initialisation of thread pool in client #11141

Open jorisgillis opened 2 years ago

jorisgillis commented 2 years ago
Description
Swagger-codegen version

Version 3.0.27. Python client generation (both urlliib3 and asyncio)

Swagger declaration file content or url

Any swagger content.

Command line used for generation

java -jar swagger-codegen.jar -i -l python [--library asyncio]

Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

This was fixed in swagger codegen 2.

mdtlyf commented 2 years ago

hi guys, any updates on this issue?

jorisgillis commented 2 years ago

The pull request is still open. Still needs a review to be merged.

nicolastomeo commented 2 years ago

It would be nice to have this merged. For instance current state prevents usage of a python swagger code generated library in aws lambda (3.8 environment) where multiprocessing.Pool is not supported.

vfreysz commented 5 months ago

If anyone could make the merge it would be super nice ! I'm having issue with Pyodide and a python swagger code generated library.

vfreysz commented 3 months ago

I was trying to have a look on the issue but it's hard to find where the multithread initialisation hapend in the new version. Does anyone have a starting point ?