Fix BosClient upload API compatibility#3242
Open
ShigureNyako wants to merge 1 commit into
Open
Conversation
Author
|
已完成自查:改动仅包含 3 个独立 BOS 上传脚本的 API 兼容处理,旧版与新版 SDK 的方法解析验证均已通过。@SigureMo 麻烦 review,感谢! |
Co-authored-by: SigureMo <SigureMo@users.noreply.github.com> Co-authored-by: Codex <noreply@openai.com>
ShigureNyako
force-pushed
the
fix/bosclient-upload-api-compatibility
branch
from
July 20, 2026 17:47
f078020 to
613697c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Paddle Model-Benchmark 流水线 使用新版
bce-python-sdk时,BosClient只提供拼写正确的put_super_object_from_file;但 PaddleTest 的部分 workflow 仍固定在只提供旧 typo APIput_super_obejct_from_file的版本。因此上传脚本需要同时兼容两代 API。
Changes
tools/bos_tools.py、tools/bos_upload.py和publish_scripts/PypiIndexUpdate.py增加兼容方法解析。put_super_object_from_file,缺失时回退到旧 APIput_super_obejct_from_file。Validation
git diff --checkpython3 -m compileall -q tools/bos_tools.py tools/bos_upload.py publish_scripts/PypiIndexUpdate.pyBosClient验证:bce-python-sdk==0.8.74、0.9.29解析到旧 typo API;bce-python-sdk==0.9.67、0.9.72解析到正式 API。未执行真实 BOS 上传:该操作需要 AK/SK 凭据,并会产生外部写入。
Related Issues