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

* Warnings filter

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
This commit is contained in:
Freddy Boulton 2024-02-07 08:13:48 -08:00 committed by GitHub
parent e3b302dc01
commit 7e9b206a14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
"gradio": patch
---
feat:Stop using deprecated pydantic config class and filter gradio warnings from tests

View File

@ -63,8 +63,7 @@ else:
class PredictBody(BaseModel):
class Config:
arbitrary_types_allowed = True
model_config = {"arbitrary_types_allowed": True}
session_hash: Optional[str] = None
event_id: Optional[str] = None

View File

@ -162,3 +162,4 @@ exclude = ["gradio/node/*.py", ".venv/*", "gradio/_frontend_code/*.py"]
[tool.pytest.ini_options]
GRADIO_ANALYTICS_ENABLED = "False"
filterwarnings = ["ignore::UserWarning:gradio.*:", "ignore::DeprecationWarning:gradio.*:"]