Skip to content

Commit a23bc4f

Browse files
authored
auto release for 0.7.0
auto incr version
1 parent 8012682 commit a23bc4f

File tree

5 files changed

+32
-11
lines changed

5 files changed

+32
-11
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 0.7.0 (2019-11-21)
2+
3+
FEATURES:
4+
5+
- Add ssl options of client (#37)
6+
7+
ENHANCEMENTS:
8+
9+
- Add testing report use ucloud test framework (#38)
10+
111
## 0.6.2 (2019-10-25)
212

313
ENHANCEMENTS:

ucloud/core/client/_client.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44

55
from ucloud import version
66
from ucloud.core.client._cfg import Config
7-
from ucloud.core.transport import Transport, RequestsTransport, Request, SSLOption
7+
from ucloud.core.transport import (
8+
Transport,
9+
RequestsTransport,
10+
Request,
11+
SSLOption,
12+
)
813
from ucloud.core.typesystem import encoder
914
from ucloud.core.utils import log
1015
from ucloud.core.utils.middleware import Middleware
@@ -80,7 +85,7 @@ def logged_response_handler(self, resp):
8085

8186
@staticmethod
8287
def _parse_dict_config(
83-
config: dict
88+
config: dict,
8489
) -> typing.Tuple[Config, auth.Credential]:
8590
return Config.from_dict(config), auth.Credential.from_dict(config)
8691

@@ -94,9 +99,15 @@ def _send(self, action: str, args: dict, **options) -> dict:
9499
timeout = options.get("timeout") or self.config.timeout
95100

96101
resp = self.transport.send(
97-
req, ssl_option=SSLOption(self.config.ssl_verify, self.config.ssl_cacert,
98-
self.config.ssl_cert, self.config.ssl_key),
99-
timeout=timeout, max_retries=max_retries
102+
req,
103+
ssl_option=SSLOption(
104+
self.config.ssl_verify,
105+
self.config.ssl_cacert,
106+
self.config.ssl_cert,
107+
self.config.ssl_key,
108+
),
109+
timeout=timeout,
110+
max_retries=max_retries,
100111
).json()
101112

102113
for handler in self.middleware.response_handlers:

ucloud/core/transport/_requests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def _send(self, req: Request, **options: typing.Any) -> requests.Response:
6868
session.mount("http://", adapter=adapter)
6969
session.mount("https://", adapter=adapter)
7070

71-
ssl_option = options.get('ssl_option')
71+
ssl_option = options.get("ssl_option")
7272
kwargs = self._build_ssl_option(ssl_option) if ssl_option else {}
7373

7474
req.request_time = time.time()
@@ -88,14 +88,14 @@ def _send(self, req: Request, **options: typing.Any) -> requests.Response:
8888

8989
@staticmethod
9090
def _build_ssl_option(ssl_option):
91-
kwargs = {'verify': ssl_option.ssl_verify and ssl_option.ssl_cacert}
91+
kwargs = {"verify": ssl_option.ssl_verify and ssl_option.ssl_cacert}
9292
if not ssl_option.ssl_cert:
9393
return kwargs
9494

9595
if ssl_option.ssl_key:
96-
kwargs['cert'] = (ssl_option.ssl_cert, ssl_option.ssl_key)
96+
kwargs["cert"] = (ssl_option.ssl_cert, ssl_option.ssl_key)
9797
else:
98-
kwargs['cert'] = ssl_option.ssl_cert
98+
kwargs["cert"] = ssl_option.ssl_cert
9999
return kwargs
100100

101101
def _load_adapter(

ucloud/core/transport/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def __init__(
9494
ssl_verify: bool = True,
9595
ssl_cacert: str = None,
9696
ssl_cert: str = None,
97-
ssl_key: str = None
97+
ssl_key: str = None,
9898
):
9999
self.ssl_verify = ssl_verify
100100
self.ssl_cacert = ssl_cacert

ucloud/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.6.2"
1+
version = "0.7.0"

0 commit comments

Comments
 (0)