Skip to content

Commit b0b17bf

Browse files
authored
Merge pull request #473 from weakish/ua-python-version
feat: collect python version in UA header
2 parents 9a99a79 + 94d4e68 commit b0b17bf

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

leancloud/client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ def new_func(*args, **kwargs):
8484
"Content-Type": "application/json;charset=utf-8",
8585
"X-LC-Id": APP_ID,
8686
"X-LC-Prod": USE_PRODUCTION,
87-
"User-Agent": "AVOS Cloud python-{0} SDK".format(leancloud.__version__),
87+
"User-Agent": "AVOS Cloud python-{0} SDK ({1}.{2})".format(
88+
leancloud.__version__,
89+
leancloud.version_info.major,
90+
leancloud.version_info.minor,
91+
),
8892
}
8993
md5sum = hashlib.md5()
9094
current_time = six.text_type(int(time.time() * 1000))

0 commit comments

Comments
 (0)