fix(deps): add missing requests-toolbelt dependency to pyproject.toml#273
Open
verseon0980 wants to merge 1 commit intoOpenGradient:mainfrom
Open
fix(deps): add missing requests-toolbelt dependency to pyproject.toml#273verseon0980 wants to merge 1 commit intoOpenGradient:mainfrom
verseon0980 wants to merge 1 commit intoOpenGradient:mainfrom
Conversation
Signed-off-by: verseon0980 <klokrc74@gmail.com>
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.
Problem
requests-toolbeltis imported at the top level ofsrc/opengradient/client/model_hub.py:This file is imported by
client/__init__.py, which is imported byopengradient/__init__.py. This means the very first line of anyuser code:
crashes immediately on a clean install with:
requests-toolbeltis not listed anywhere in thedependenciessection of
pyproject.toml. Sopip install opengradientdoes notinstall it. The entire SDK is broken for any user who installs it in
a fresh environment.
Affected files:
src/opengradient/client/model_hub.py(line 9)pyproject.toml(dependencies section)Fix
Added
requests-toolbelt>=0.9.1to thedependencieslist inpyproject.toml. This ensures it is installed automatically whenevera user runs
pip install opengradient.No code changes needed. The import in
model_hub.pyis correct.Only the dependency declaration was missing.
Changes
pyproject.toml: added"requests-toolbelt>=0.9.1"to thedependencieslist under[project]