gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Explicit urllib3 requirement

Open whitphx opened this issue 1 year ago • 8 comments

Description

Improvements of #7725

  • Add urllib3 to requirements.txt as an explicit dependency.
  • Use urllib3 instead of requests because it's a more 'primitive' dependency in that requests depends on it too, and it's explicitly declared as a required package in requirements.txt.

For future readers: urllib3 is already shipped with Gradio as a dependency of the huggingface_hub pacakge, so this change doesn't introduce additional package installations.

whitphx avatar Mar 18 '24 10:03 whitphx

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
:unicorn: Changes detecting...

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/5bc45db8a025264f62ef29764abda7e5aecd52a6/gradio-4.21.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@5bc45db8a025264f62ef29764abda7e5aecd52a6#subdirectory=client/python"

gradio-pr-bot avatar Mar 18 '24 10:03 gradio-pr-bot

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
gradio minor
  • [ ] Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Explicit urllib3 requirement

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

gradio-pr-bot avatar Mar 18 '24 10:03 gradio-pr-bot

Ahh, I missed that the already installed ver. of urllib3 is 1.x. It's not valuable for Wasm-support anyway. The CI failure is because this PR upgraded it to >=2.2.0. Will try to resolve the errors, but it might be hard as some more packages than requests are depending on urllib3<2. If it's not possible until the next release, plz skip this PR and revert #7725 as well if necessary.

whitphx avatar Mar 18 '24 10:03 whitphx

Just fyi I've reverted https://github.com/gradio-app/gradio/pull/7725 @whitphx

abidlabs avatar Mar 18 '24 15:03 abidlabs

TODO: After finishing this PR, we should restore the examples attrs in the sample apps removed in #7661

whitphx avatar Mar 24 '24 03:03 whitphx

Maybe we should give this up and simply use the pyodide-http patcher.

whitphx avatar Mar 28 '24 11:03 whitphx

We could add as a dependency only for Gradio-Lite, right? Not for gradio?

abidlabs avatar Mar 28 '24 15:03 abidlabs

@abidlabs My concern is urllib3>=2 may conflict with the existing dependencies even if it's only for Lite, while it will be tried first 👍

whitphx avatar Mar 29 '24 04:03 whitphx

Any progress with this @whitphx? Should we keep this PR open or can we close?

abidlabs avatar Apr 11 '24 14:04 abidlabs

I'm going to close this PR and create another one 👍

whitphx avatar Apr 12 '24 04:04 whitphx