Skip to content

Commit 402e9e3

Browse files
author
flynnzzhang
committed
Merge remote-tracking branch 'upstream/master'
2 parents 879d16f + 85edb4b commit 402e9e3

File tree

6 files changed

+205
-21
lines changed

6 files changed

+205
-21
lines changed

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ support proxies
141141

142142
## [v1.7.3](https://github.com/tencentyun/cos-python-sdk-v5/compare/v1.7.2...v1.7.3) - 2019-08-06
143143

144-
optimize object download
145-
146144
### Merged
147145

148146
- optimize object download [`#94`](https://github.com/tencentyun/cos-python-sdk-v5/pull/94)

qcloud_cos/cos_client.py

Lines changed: 153 additions & 14 deletions
Large diffs are not rendered by default.

qcloud_cos/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '5.1.9.18'
1+
__version__ = '5.1.9.19'

requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
certifi<=2021.10.8;python_version<'3.0' # certifi新版本不支持python2,这里需要使用低版本
2-
requests>=2.8
31
dicttoxml
42
six
53
crcmod

setup.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1+
# -*- coding: utf-8 -*-
2+
13
from setuptools import setup, find_packages
24
from platform import python_version_tuple
35
import io
6+
import sys
47

58

69
def requirements():
710
with open('requirements.txt', 'r') as fileobj:
8-
requirements = [line.strip() for line in fileobj]
11+
requirements = []
12+
13+
# certifi2021.10.8之后的版本不再支持python2和python3.6之前的版本
14+
if sys.version_info.major < 3 or \
15+
(sys.version_info.major == 3 and sys.version_info.minor < 6):
16+
requirements.append('certifi<=2021.10.8')
17+
18+
# requests2.27.1之后的版本不再支持python2和python3.7之前的版本
19+
if sys.version_info.major < 3 or \
20+
(sys.version_info.major == 3 and sys.version_info.minor < 7):
21+
requirements.append('requests>=2.8,<=2.27.1')
22+
else:
23+
requirements.append('requests>=2.8')
24+
25+
requirements.extend([line.strip() for line in fileobj])
926
return requirements
1027

1128

@@ -16,7 +33,7 @@ def long_description():
1633

1734
setup(
1835
name='cos-python-sdk-v5',
19-
version='1.9.18',
36+
version='1.9.19',
2037
url='https://www.qcloud.com/',
2138
license='MIT',
2239
author='tiedu, lewzylu, channingliu',

ut/test.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1949,6 +1949,37 @@ def test_ci_list_doc_transcode_jobs():
19491949
assert (response['JobsDetail'])
19501950

19511951

1952+
def test_ci_live_video_auditing():
1953+
if TEST_CI != 'true':
1954+
return
1955+
# 提交视频流审核任务
1956+
response = client.ci_auditing_live_video_submit(
1957+
Bucket=ci_bucket_name,
1958+
Url='rtmp://example.com/live/123',
1959+
Callback='http://callback.com/',
1960+
DataId='testdataid-111111',
1961+
UserInfo={
1962+
'TokenId': 'token',
1963+
'Nickname': 'test',
1964+
'DeviceId': 'DeviceId-test',
1965+
'AppId': 'AppId-test',
1966+
'Room': 'Room-test',
1967+
'IP': 'IP-test',
1968+
'Type': 'Type-test',
1969+
},
1970+
BizType="44f32597a627d013962c54d459a9ab6e",
1971+
)
1972+
assert (response['JobsDetail']['JobId'])
1973+
jobId = response['JobsDetail']['JobId']
1974+
time.sleep(5)
1975+
response = client.ci_auditing_live_video_cancle(
1976+
Bucket=ci_bucket_name,
1977+
JobID=jobId,
1978+
)
1979+
print(response)
1980+
assert (response['JobsDetail'])
1981+
1982+
19521983
def test_sse_c_file():
19531984
"""测试SSE-C的各种接口"""
19541985
bucket = test_bucket
@@ -2071,6 +2102,7 @@ def test_sse_c_file():
20712102
test_ci_list_media_transcode_jobs()
20722103
test_ci_create_doc_transcode_jobs()
20732104
test_ci_list_doc_transcode_jobs()
2105+
test_ci_live_video_auditing()
20742106
test_get_media_info()
20752107
test_get_snapshot()
20762108
test_get_pm3u8()

0 commit comments

Comments
 (0)