Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ContextVar instead of threading.local() #5625

Merged
merged 9 commits into from
Sep 21, 2023

Conversation

cbensimon
Copy link
Contributor

@cbensimon cbensimon commented Sep 20, 2023

Closes #5623

Also add gr.Request in the new LocalContext

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Sep 20, 2023

🪼 branch checks and previews

Name Status URL
🦄 Changes detected! Details

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Sep 20, 2023

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
gradio patch
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Use ContextVar instead of threading.local()

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.

@cbensimon
Copy link
Contributor Author

✅ New test is actually failing when reverting the fix : https://github.com/gradio-app/gradio/actions/runs/6250289188/job/16968822471?pr=5625#step:15:82

@cbensimon cbensimon marked this pull request as ready for review September 20, 2023 15:03
Copy link
Collaborator

@aliabid94 aliabid94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works great! Thanks @cbensimon!

@abidlabs
Copy link
Member

Thanks @cbensimon and @aliabid94!

@abidlabs abidlabs merged commit 9ccc479 into gradio-app:main Sep 21, 2023
12 of 16 checks passed
This was referenced Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gr.Info and gr.Warning bug with async handler + concurrent queue
4 participants