mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-17 00:21:19 +00:00
[python] add socket_options to configuration for the rest client (#7795)
* [python] add socket_options to configuration for the rest client * (python-experimental) add socket_options to configuration for the rest client This mirrors work done on the python generator * (python-experimental) add test to cover socket_options is passed on from configuration Co-authored-by: steve brazier <steve.brazier@trioptima.com>
This commit is contained in:
@@ -277,6 +277,10 @@ conf = petstore_api.Configuration(
|
||||
# Enable client side validation
|
||||
self.client_side_validation = True
|
||||
|
||||
self.socket_options = None
|
||||
"""Options to pass down to the underlying urllib3 socket
|
||||
"""
|
||||
|
||||
def __deepcopy__(self, memo):
|
||||
cls = self.__class__
|
||||
result = cls.__new__(cls)
|
||||
|
||||
@@ -76,6 +76,9 @@ class RESTClientObject(object):
|
||||
if configuration.retries is not None:
|
||||
addition_pool_args['retries'] = configuration.retries
|
||||
|
||||
if configuration.socket_options is not None:
|
||||
addition_pool_args['socket_options'] = configuration.socket_options
|
||||
|
||||
if maxsize is None:
|
||||
if configuration.connection_pool_maxsize is not None:
|
||||
maxsize = configuration.connection_pool_maxsize
|
||||
|
||||
Reference in New Issue
Block a user