fix: isolate Tencent TMT import from incompatible SDK - #1178
Open
BetterAndBetterII wants to merge 2 commits into
Open
BetterAndBetterII wants to merge 2 commits into
BetterAndBetterII wants to merge 2 commits into
Conversation
Add a failing test for PDFMathTranslate#1167: translator.py must still load when tencentcloud-sdk-python-tmt 3.1.129 has removed TextTranslateRequest, and the TMT dependency must be pinned to a compatible release. Co-authored-by: Yuzhong Zhang <BetterAndBetterII@users.noreply.github.com>
Stop loading TextTranslateRequest at translator module import so incompatible tencentcloud-sdk-python-tmt 3.1.129 no longer breaks other engines. Pin the dependency to 3.0.1257-3.1.121, the last releases that still ship the text-translate models. Co-authored-by: Yuzhong Zhang <BetterAndBetterII@users.noreply.github.com>
This branch has not been deployed
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.
Fresh installs pull
tencentcloud-sdk-python-tmt3.1.129, which removedTextTranslateRequest/TextTranslateResponse.pdf2zh/translator.pyimported those names at module load, so every engine (including Google) crashed before translation started.TencentTranslator.__init__so an incompatible or missing SDK only fails when Tencent is selected.tencentcloud-sdk-python-tmtto>=3.0.1257,<=3.1.121, the last releases that still ship the text-translate models.Fixes #1167