Skip to content

Commit

Permalink
Adding retries option to override default value 3 of urllib3 (#2460)
Browse files Browse the repository at this point in the history
* adding retries option to override default value 3 of urllib3

* running petstore for python

* adding files for samples in petstore run

* running ensure-up-to-date
  • Loading branch information
chowmean authored and wing328 committed Mar 22, 2019
1 parent 2101780 commit 45ad72b
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ class Configuration(six.with_metaclass(TypeWithDefault, object)):
self.proxy = None
# Safe chars for path_param
self.safe_chars_for_path_param = ''
# Adding retries to override urllib3 default value 3
self.retries = None

@property
def logger_file(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ class RESTClientObject(object):
if configuration.assert_hostname is not None:
addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501

if configuration.retries is not None:
addition_pool_args['retries'] = configuration.retries

if maxsize is None:
if configuration.connection_pool_maxsize is not None:
maxsize = configuration.connection_pool_maxsize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def __init__(self):
self.proxy = None
# Safe chars for path_param
self.safe_chars_for_path_param = ''
# Adding retries to override urllib3 default value 3
self.retries = None

@property
def logger_file(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def __init__(self):
self.proxy = None
# Safe chars for path_param
self.safe_chars_for_path_param = ''
# Adding retries to override urllib3 default value 3
self.retries = None

@property
def logger_file(self):
Expand Down
2 changes: 2 additions & 0 deletions samples/client/petstore/python/petstore_api/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def __init__(self):
self.proxy = None
# Safe chars for path_param
self.safe_chars_for_path_param = ''
# Adding retries to override urllib3 default value 3
self.retries = None

@property
def logger_file(self):
Expand Down
3 changes: 3 additions & 0 deletions samples/client/petstore/python/petstore_api/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def __init__(self, configuration, pools_size=4, maxsize=None):
if configuration.assert_hostname is not None:
addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501

if configuration.retries is not None:
addition_pool_args['retries'] = configuration.retries

if maxsize is None:
if configuration.connection_pool_maxsize is not None:
maxsize = configuration.connection_pool_maxsize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def __init__(self):
self.proxy = None
# Safe chars for path_param
self.safe_chars_for_path_param = ''
# Adding retries to override urllib3 default value 3
self.retries = None

@property
def logger_file(self):
Expand Down
3 changes: 3 additions & 0 deletions samples/openapi3/client/petstore/python/petstore_api/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def __init__(self, configuration, pools_size=4, maxsize=None):
if configuration.assert_hostname is not None:
addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501

if configuration.retries is not None:
addition_pool_args['retries'] = configuration.retries

if maxsize is None:
if configuration.connection_pool_maxsize is not None:
maxsize = configuration.connection_pool_maxsize
Expand Down

0 comments on commit 45ad72b

Please sign in to comment.