Skip to content

Commit 90fb431

Browse files
authored
fix python 2 compatible helpers for nested unicode (#19)
BUG FIXES: - Fix python 2 compatible helpers for nested CJK charset
1 parent 1e8f87b commit 90fb431

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

tests/test_core/test_encoder.py

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
({"foo": True}, {"foo": "true"}),
1515
({"foo": False}, {"foo": "false"}),
1616
({"IP": ["127.0.0.1"]}, {"IP.0": "127.0.0.1"}),
17+
({"TemplateParams": [u"中文"]}, {"TemplateParams.0": u"中文"}),
1718
({"IP": ["foo", "bar"]}, {"IP.0": "foo", "IP.1": "bar"}),
1819
({"IP": [{"foo": "bar"}]}, {"IP.0.foo": "bar"}),
1920
],

ucloud/core/typesystem/encoder.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# -*- coding: utf-8 -*-
22

3+
from ucloud.core.utils.compat import str
4+
35

46
def encode(d):
57
result = {}

ucloud/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# -*- coding: utf-8 -*-
22

3-
version = "0.9.1"
3+
version = "0.9.2"

0 commit comments

Comments
 (0)