diff --git a/README.md b/README.md index c65abe3..af1ba81 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,47 @@ +Version 3.20.9.1 + +New Features: + +Documentation & Demo: + +Resolved Issues: +1. Fixed the issue that an exception is thrown if both the checkSum and enableCheckpoint parameters are specified as True when calling the uploadFile API. + +------------------------------------------------------------------------------------------------- + +Version 3.20.5 + +New Features: +1. Added APIs related to asynchronous fetch policies, including ObsClient.setBucketFetchPolicy, ObsClient.getBucketFetchPolicy, and ObsClient.deleteBucketFetchPolicy. +2. Added APIs related to asynchronous fetch tasks, including ObsClient.setBucketFetchJob and ObsClient.getBucketFetchJob. +3. Added service orchestration APIs. For details, see obs/workflow.py. + +Documentation & Demo: +1. Added sections of asynchronous fetch and service orchestration in OBS Python SDK Developer Guide. +2. Added sections of asynchronous fetch and service orchestration APIs in OBS Python SDK API Reference. +3. Added the topic of asynchronous fetch policy status to section "Pre-defined Constants" and the topics of the response results of the asynchronous fetch APIs and service orchestration APIs to section "Data Types" in OBS Python SDK API Reference. + +Resolved Issues: + +------------------------------------------------------------------------------------------------- + +Version 3.20.1 + +New Features: +1. Added the ObsClient.headObject API for determining whether an object exists. +2. Added the ObsClient.setBucketRequestPayment and ObsClient.getBucketRequestPayment APIs respectively for configuring the Requester Pays function and obtaining related configuration. +3. Supports the Requester Pays header by configuring the extensionHeaders parameter when calling an API. + +Documentation & Demo: +1. Added the topic of checking whether an object exists to section "Object Management" in OBS Python SDK Developer Guide; added the API for checking whether an object exists to section "Bucket-Related APIs" in OBS Python SDK API Reference. +2. Added the topic of Requester Pays to section "Bucket Management" in OBS Python SDK Developer Guide; added the APIs for configuring the Requester Pays function and obtaining related configuration to section "Bucket-Related APIs" in OBS Python SDK API Reference; added the response result of obtaining Requester Pays configuration and extended additional header to section "Data Types" in OBS Python SDK API Reference. +3. Added the topic of Requester Pays configuration to section "Pre-defined Constants" in OBS Python SDK API Reference. +4. Added the description of extended additional headers to the API method definitions in OBS Python SDK API Reference. + +Resolved Issues: + +------------------------------------------------------------------------------------------------- + Version 3.19.11 Documentation & Demo: diff --git a/README_CN.md b/README_CN.md index 06a844d..b7b9f34 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,4 +1,47 @@ -Version 3.19.11 +Version 3.20.9.1 + +新特性: + +资料&demo: + +修复问题: +1. 修复调用uploadFile接口同时指定checkSum和enableCheckpoint参数为True时抛出异常的问题; + +------------------------------------------------------------------------------------------------- +Version 3.20.5 + +新特性: +1. 新增异步抓取策略相关接口(ObsClient.setBucketFetchPolicy/ObsClient.getBucketFetchPolicy/ObsClient.deleteBucketFetchPolicy); +2. 新增异步抓取任务相关接口(ObsClient.setBucketFetchJob/ObsClient.getBucketFetchJob); +3. 新增服务编排接口(详见obs.workflow.py); + +资料&demo: +1. 开发指南文档新增异步抓取、服务编排章节; +2. 接口参考文档新增异步抓取接口、服务编排接口章节; +3. 接口参考文档预定义常量章节新增异步抓取策略状态,数据类型章节新增异步抓取接口、服务编排接口相关响应结果的描述; + +修复问题: + +------------------------------------------------------------------------------------------------- + +Version 3.20.1 + +新特性: +1. 新增判断对象是否存在的接口(ObsClient.headObject); +2. 新增设置桶请求者付费配置和获取桶请求者付费配置的接口(ObsClient.setBucketRequestPayment/ObsClient.getBucketRequestPayment); +3. 新增对请求者付费头域的支持,可以通过设置接口的extensionHeaders参数来配置携带请求者付费头域; + +资料&demo: +1. 开发指南文档管理对象章节新增判断对象是否存在,接口参考文档对象相关接口章节新增判断对象是否存在; +2. 开发指南文档管理桶章节新增管理桶请求者付费,接口参考文档桶相关接口章节新增设置桶的请求者付费配置和获取桶的请求者付费配置,数据类型章节新增获取桶请求者付费配置响应结果及拓展附加头域; +3. 接口参考文档预定义常量章节新增请求者付费配置; +4. 接口参考文档各接口方法定义中新增对拓展附加头域的描述; + +修复问题: + +------------------------------------------------------------------------------------------------- + +Version 3.19.11 资料&demo: diff --git a/release/huaweicloud-obs-sdk-python_3.20.9.1.tar.gz b/release/huaweicloud-obs-sdk-python_3.20.9.1.tar.gz new file mode 100644 index 0000000..0972cae Binary files /dev/null and b/release/huaweicloud-obs-sdk-python_3.20.9.1.tar.gz differ diff --git a/release/huaweicloud-obs-sdk-python_3.20.9.1.tar.gz.sha256 b/release/huaweicloud-obs-sdk-python_3.20.9.1.tar.gz.sha256 new file mode 100644 index 0000000..0604f96 --- /dev/null +++ b/release/huaweicloud-obs-sdk-python_3.20.9.1.tar.gz.sha256 @@ -0,0 +1 @@ +783c756fe7a7cb7195885b53c0013c7c04b5e0c19403aec258f800260352cba5 *huaweicloud-obs-sdk-python_3.20.9.1.tar.gz diff --git a/src/obs/const.py b/src/obs/const.py index db4b500..2c0c95a 100644 --- a/src/obs/const.py +++ b/src/obs/const.py @@ -85,7 +85,7 @@ DEFAULT_TASK_NUM = 8 DEFAULT_TASK_QUEUE_SIZE = 20000 -OBS_SDK_VERSION = '3.20.9' +OBS_SDK_VERSION = '3.20.9.1' V2_META_HEADER_PREFIX = 'x-amz-meta-' V2_HEADER_PREFIX = 'x-amz-' diff --git a/src/obs/transfer.py b/src/obs/transfer.py index 91961ee..252118e 100644 --- a/src/obs/transfer.py +++ b/src/obs/transfer.py @@ -272,7 +272,8 @@ def _check_upload_record(self, record): self.obsClient.log_client.log(INFO, '{0} was changed, clear the record.'.format(self.fileName)) return False if self.checkSum and len(record['fileStatus']) >= 3: - checkSum = util.md5_file_encode_by_size_offset(file_path=self.fileName, size=self.size, offset=0) + checkSum = util.base64_encode( + util.md5_file_encode_by_size_offset(file_path=self.fileName, size=self.size, offset=0)) if record['fileStatus'][2] and record['fileStatus'][2] != checkSum: self.obsClient.log_client.log(INFO, '{0} content was changed, clear the record.'.format(self.fileName)) return False @@ -305,7 +306,7 @@ def _slice_file(self): def _prepare(self): fileStatus = [self.size, self.lastModified] if self.checkSum: - fileStatus.append(util.md5_file_encode_by_size_offset(self.fileName, self.size, 0)) + fileStatus.append(util.base64_encode(util.md5_file_encode_by_size_offset(self.fileName, self.size, 0))) if self.headers is None: self.headers = UploadFileHeader() diff --git a/src/setup.py b/src/setup.py index 0dca853..cae14b5 100644 --- a/src/setup.py +++ b/src/setup.py @@ -21,7 +21,7 @@ setup( name='esdk-obs-python', - version='3.20.9', + version='3.20.9.1', packages=find_packages(), zip_safe=False, description='OBS Python SDK',