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

Stop using deprecated pydantic config class and filter gradio warnings from tests #7333

Merged
merged 6 commits into from Feb 7, 2024

Conversation

freddyaboulton
Copy link
Collaborator

Description

We're using a deprecated pydantic api (https://docs.pydantic.dev/2.5/migration/#changes-to-config) so migrating to the new api.

In addition, warnings raised by our own code (gr.LogoutButton, etc) are clogging up the pytest warning log which makes it hard to review/see legit warnings. These warnings are usually raised because we're testing an API we've deprecated but not removed.

🎯 PRs Should Target Issues

Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.

Not adhering to this guideline will result in the PR being closed.

Tests

  1. PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests: bash scripts/run_all_tests.sh

  2. You may need to run the linters: bash scripts/format_backend.sh and bash scripts/format_frontend.sh

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Feb 6, 2024

🪼 branch checks and previews

Name Status URL
Spaces building...
Website ready! Website preview
🦄 Changes detected! Details

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Feb 6, 2024

🦄 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.

Stop using deprecated pydantic config class and filter gradio warnings from tests

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.

@abidlabs
Copy link
Member

abidlabs commented Feb 7, 2024

cool thanks @freddyaboulton!

@abidlabs abidlabs added the v: patch A change that requires a patch release label Feb 7, 2024
@freddyaboulton freddyaboulton merged commit 7e9b206 into main Feb 7, 2024
7 checks passed
@freddyaboulton freddyaboulton deleted the fix-pydantic-warning-filter-pytest-warnings branch February 7, 2024 16:13
@freddyaboulton
Copy link
Collaborator Author

Thanks @abidlabs !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v: patch A change that requires a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants