Skip to content

Commit cfc453a

Browse files
authored
Merge pull request #568 from roycaihw/replace-async
Rename parameter async into async_req to support Python 3.7
2 parents 9b438ee + a4b61db commit cfc453a

Some content is hidden

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

57 files changed

+7144
-7142
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# v7.0.0a1
2-
**NOTE:**
3-
- We are doing an Alpha release for v7.0.0 because there will be an **ACTION REQUIRED** API breaking change in this client to support Python 3.7, which substitutes the currently being-used `async` reserved keyword [kubernetes-client/gen#67](https://github.com/kubernetes-client/gen/pull/67)
2+
**Breaking Change:**
3+
- **ACTION REQUIRED** Rename the currently being-used `async` parameter to `async_req` to support Python 3.7 because it's a reserved keyword in Python 3.7 [kubernetes-client/gen#67](https://github.com/kubernetes-client/gen/pull/67)
44

55
**Bug Fix:**
66
- Watch now properly deserializes custom resource objects and updates resource version [kubernetes-client/python-base#64](https://github.com/kubernetes-client/python-base/pull/64)

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,16 @@ supported versions of Kubernetes clusters.
8383

8484
#### Compatibility matrix
8585

86-
| | Kubernetes 1.4 | Kubernetes 1.5 | Kubernetes 1.6 | Kubernetes 1.7 | Kubernetes 1.8 | Kubernetes 1.9 | Kubernetes 1.10 |
87-
|--------------------|----------------|----------------|----------------|----------------|----------------|----------------|-----------------|
88-
| client-python 1.0 | + || - | - |- |- | |
89-
| client-python 2.0 | + | + || - |- |- | |
90-
| client-python 3.0 | + | + | + ||- |- | |
91-
| client-python 4.0 | + | + | + | + ||- | |
92-
| client-python 5.0 | + | + | + | + |+ || |
93-
| client-python 6.0 | + | + | + | + |+ |+ ||
94-
| client-python HEAD | + | + | + | + |+ |+ ||
86+
| | Kubernetes 1.4 | Kubernetes 1.5 | Kubernetes 1.6 | Kubernetes 1.7 | Kubernetes 1.8 | Kubernetes 1.9 | Kubernetes 1.10 | Kubernetes 1.11 |
87+
|--------------------|----------------|----------------|----------------|----------------|----------------|----------------|-----------------|-----------------|
88+
| client-python 1.0 | + || - | - |- |- | | |
89+
| client-python 2.0 | + | + || - |- |- | | |
90+
| client-python 3.0 | + | + | + ||- |- | | |
91+
| client-python 4.0 | + | + | + | + ||- | | |
92+
| client-python 5.0 | + | + | + | + |+ || | |
93+
| client-python 6.0 | + | + | + | + |+ |+ || |
94+
| client-python 7.0 | + | + | + | + |+ |+ |+ ||
95+
| client-python HEAD | + | + | + | + |+ |+ |+ ||
9596

9697
Key:
9798

@@ -119,6 +120,7 @@ between client-python versions.
119120
| 5.0 | Kubernetes main repo, 1.9 branch ||
120121
| 6.0 Alpha/Beta | Kubernetes main repo, 1.10 branch ||
121122
| 6.0 | Kubernetes main repo, 1.10 branch ||
123+
| 7.0 Alpha/Beta | Kubernetes main repo, 1.11 branch ||
122124

123125

124126
Key:

kubernetes/client/api_client.py

Lines changed: 3 additions & 3 deletions
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

Lines changed: 9 additions & 9 deletions
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)