Skip to content

Commit

Permalink
Stop using deprecated pydantic config class and filter gradio warning…
Browse files Browse the repository at this point in the history
…s 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>
  • Loading branch information
3 people committed Feb 7, 2024
1 parent e3b302d commit 7e9b206
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-garlics-hide.md
@@ -0,0 +1,5 @@
---
"gradio": patch
---

feat:Stop using deprecated pydantic config class and filter gradio warnings from tests
3 changes: 1 addition & 2 deletions gradio/data_classes.py
Expand Up @@ -63,8 +63,7 @@ def schema(cls, **_kwargs):


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
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -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.*:"]

0 comments on commit 7e9b206

Please sign in to comment.