Skip to content

Commit b10c7b6

Browse files
committed
Rename parameter async into async_req to support Python 3.7
as Python 3.7 treats async as a reserved keyword.
1 parent 9b438ee commit b10c7b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+7131
-7131
lines changed

kubernetes/client/api_client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def __deserialize(self, data, klass):
278278
def call_api(self, resource_path, method,
279279
path_params=None, query_params=None, header_params=None,
280280
body=None, post_params=None, files=None,
281-
response_type=None, auth_settings=None, async=None,
281+
response_type=None, auth_settings=None, async_req=None,
282282
_return_http_data_only=None, collection_formats=None, _preload_content=True,
283283
_request_timeout=None):
284284
"""
@@ -298,7 +298,7 @@ def call_api(self, resource_path, method,
298298
:param response: Response data type.
299299
:param files dict: key -> filename, value -> filepath,
300300
for `multipart/form-data`.
301-
:param async bool: execute request asynchronously
301+
:param async_req bool: execute request asynchronously
302302
:param _return_http_data_only: response data without head status code and headers
303303
:param collection_formats: dict of collection formats for path, query,
304304
header, and post parameters.
@@ -313,7 +313,7 @@ def call_api(self, resource_path, method,
313313
If parameter async is False or missing,
314314
then the method will return the response directly.
315315
"""
316-
if not async:
316+
if not async_req:
317317
return self.__call_api(resource_path, method,
318318
path_params, query_params, header_params,
319319
body, post_params, files,

kubernetes/client/apis/admissionregistration_api.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ def get_api_group(self, **kwargs):
3939
"""
4040
get information of a group
4141
This method makes a synchronous HTTP request by default. To make an
42-
asynchronous HTTP request, please pass async=True
43-
>>> thread = api.get_api_group(async=True)
42+
asynchronous HTTP request, please pass async_req=True
43+
>>> thread = api.get_api_group(async_req=True)
4444
>>> result = thread.get()
4545
46-
:param async bool
46+
:param async_req bool
4747
:return: V1APIGroup
4848
If the method is called asynchronously,
4949
returns the request thread.
5050
"""
5151
kwargs['_return_http_data_only'] = True
52-
if kwargs.get('async'):
52+
if kwargs.get('async_req'):
5353
return self.get_api_group_with_http_info(**kwargs)
5454
else:
5555
(data) = self.get_api_group_with_http_info(**kwargs)
@@ -59,18 +59,18 @@ def get_api_group_with_http_info(self, **kwargs):
5959
"""
6060
get information of a group
6161
This method makes a synchronous HTTP request by default. To make an
62-
asynchronous HTTP request, please pass async=True
63-
>>> thread = api.get_api_group_with_http_info(async=True)
62+
asynchronous HTTP request, please pass async_req=True
63+
>>> thread = api.get_api_group_with_http_info(async_req=True)
6464
>>> result = thread.get()
6565
66-
:param async bool
66+
:param async_req bool
6767
:return: V1APIGroup
6868
If the method is called asynchronously,
6969
returns the request thread.
7070
"""
7171

7272
all_params = []
73-
all_params.append('async')
73+
all_params.append('async_req')
7474
all_params.append('_return_http_data_only')
7575
all_params.append('_preload_content')
7676
all_params.append('_request_timeout')
@@ -117,7 +117,7 @@ def get_api_group_with_http_info(self, **kwargs):
117117
files=local_var_files,
118118
response_type='V1APIGroup',
119119
auth_settings=auth_settings,
120-
async=params.get('async'),
120+
async_req=params.get('async_req'),
121121
_return_http_data_only=params.get('_return_http_data_only'),
122122
_preload_content=params.get('_preload_content', True),
123123
_request_timeout=params.get('_request_timeout'),

kubernetes/client/apis/admissionregistration_v1alpha1_api.py

+72-72
Large diffs are not rendered by default.

kubernetes/client/apis/admissionregistration_v1beta1_api.py

+135-135
Large diffs are not rendered by default.

kubernetes/client/apis/apiextensions_api.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ def get_api_group(self, **kwargs):
3939
"""
4040
get information of a group
4141
This method makes a synchronous HTTP request by default. To make an
42-
asynchronous HTTP request, please pass async=True
43-
>>> thread = api.get_api_group(async=True)
42+
asynchronous HTTP request, please pass async_req=True
43+
>>> thread = api.get_api_group(async_req=True)
4444
>>> result = thread.get()
4545
46-
:param async bool
46+
:param async_req bool
4747
:return: V1APIGroup
4848
If the method is called asynchronously,
4949
returns the request thread.
5050
"""
5151
kwargs['_return_http_data_only'] = True
52-
if kwargs.get('async'):
52+
if kwargs.get('async_req'):
5353
return self.get_api_group_with_http_info(**kwargs)
5454
else:
5555
(data) = self.get_api_group_with_http_info(**kwargs)
@@ -59,18 +59,18 @@ def get_api_group_with_http_info(self, **kwargs):
5959
"""
6060
get information of a group
6161
This method makes a synchronous HTTP request by default. To make an
62-
asynchronous HTTP request, please pass async=True
63-
>>> thread = api.get_api_group_with_http_info(async=True)
62+
asynchronous HTTP request, please pass async_req=True
63+
>>> thread = api.get_api_group_with_http_info(async_req=True)
6464
>>> result = thread.get()
6565
66-
:param async bool
66+
:param async_req bool
6767
:return: V1APIGroup
6868
If the method is called asynchronously,
6969
returns the request thread.
7070
"""
7171

7272
all_params = []
73-
all_params.append('async')
73+
all_params.append('async_req')
7474
all_params.append('_return_http_data_only')
7575
all_params.append('_preload_content')
7676
all_params.append('_request_timeout')
@@ -117,7 +117,7 @@ def get_api_group_with_http_info(self, **kwargs):
117117
files=local_var_files,
118118
response_type='V1APIGroup',
119119
auth_settings=auth_settings,
120-
async=params.get('async'),
120+
async_req=params.get('async_req'),
121121
_return_http_data_only=params.get('_return_http_data_only'),
122122
_preload_content=params.get('_preload_content', True),
123123
_request_timeout=params.get('_request_timeout'),

0 commit comments

Comments
 (0)