core[patch]: check for model_fields attribute (#25108)

`__fields__` raises a warning in pydantic v2
This commit is contained in:
ccurme
2024-08-07 16:32:56 -04:00
committed by GitHub
parent 6e9a8b188f
commit 803eba3163
2 changed files with 5 additions and 1 deletions

View File

@@ -1746,6 +1746,7 @@ def test__is_message_content_type(obj: Any, expected: bool) -> None:
@pytest.mark.skipif(PYDANTIC_MAJOR_VERSION != 2, reason="Testing pydantic v2.")
@pytest.mark.parametrize("use_v1_namespace", [True, False])
@pytest.mark.filterwarnings("error")
def test__get_all_basemodel_annotations_v2(use_v1_namespace: bool) -> None:
A = TypeVar("A")