Fix multipart ModuleNotFoundError by renaming import to python_multipart#10188
Merged
Conversation
Collaborator
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/e364074fae7fee0a4afdd6c87de272f74f1fafbd/gradio-5.8.0-py3-none-any.whlInstall Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@e364074fae7fee0a4afdd6c87de272f74f1fafbd#subdirectory=client/python"Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/e364074fae7fee0a4afdd6c87de272f74f1fafbd/gradio-client-1.8.0.tgzUse Lite from this PR <script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/e364074fae7fee0a4afdd6c87de272f74f1fafbd/dist/lite.js""></script> |
Collaborator
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
Member
|
Thanks @archiloque. You're right in making this change. It seems to be a consequence of this PR. We should rename the |
python_multipart
python_multipartmultipart ModuleNotFoundError by renaming import to python_multipart
abidlabs
approved these changes
Dec 12, 2024
Member
|
Merging, thanks again @archiloque! |
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.
(I'm not experienced about Python's dependency and packaging, sorry if my analysis or suggestions are wrong)
I'm using Gradio on a project that depends on https://pypi.org/project/python-multipart/ through Gradio and https://pypi.org/project/multipart/ through another dependecy.
I tried to update the Gradio version to 5.8.0 and now I get an error at startup.
From Kludex/python-multipart#180 (comment) , my understanding is that the issue comes from the fact that python-multipart changed their package name to
python-multipartwith some compatibility, but the compatibility, but it doesn't work in my case.Since Gradio depends on
python-multipart>=0.0.18, the code can be updated to use the new package name.I've tried to run the Gradio tests localy and they don't all pass on
maineven when using dev containers, but I don't see any new test failure after the change.As the fix is two lines of import, I feel that "please create an issue before you create this PR, unless the fix is very small" applies to this case.
Thanks !