From 8c090c978d2fe7ac4b1490f95a623eb89312050f Mon Sep 17 00:00:00 2001 From: Ignacio Campos Rivera Date: Tue, 4 Jan 2022 08:08:03 +0100 Subject: [PATCH] feat(python-asyncio): add support for proxy config using system env vars (#11171) Co-authored-by: Ignacio Campos --- .../src/main/resources/python-legacy/asyncio/rest.mustache | 3 ++- .../src/main/resources/python/asyncio/rest.mustache | 3 ++- samples/client/petstore/python-asyncio/petstore_api/rest.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python-legacy/asyncio/rest.mustache b/modules/openapi-generator/src/main/resources/python-legacy/asyncio/rest.mustache index 538a69bf8eb..61ad3f2ffa3 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/asyncio/rest.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/asyncio/rest.mustache @@ -62,7 +62,8 @@ class RESTClientObject(object): # https pool manager self.pool_manager = aiohttp.ClientSession( - connector=connector + connector=connector, + trust_env=True ) async def close(self): diff --git a/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache b/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache index 3744b62c81e..d69e7fd8312 100644 --- a/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache +++ b/modules/openapi-generator/src/main/resources/python/asyncio/rest.mustache @@ -60,7 +60,8 @@ class RESTClientObject(object): # https pool manager self.pool_manager = aiohttp.ClientSession( - connector=connector + connector=connector, + trust_env=True ) async def close(self): diff --git a/samples/client/petstore/python-asyncio/petstore_api/rest.py b/samples/client/petstore/python-asyncio/petstore_api/rest.py index 75ee140efba..263fe1daafb 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/rest.py +++ b/samples/client/petstore/python-asyncio/petstore_api/rest.py @@ -70,7 +70,8 @@ class RESTClientObject(object): # https pool manager self.pool_manager = aiohttp.ClientSession( - connector=connector + connector=connector, + trust_env=True ) async def close(self):