failed NO_PATCH NO_PATCH UNSUBMITTED empty_patch(None) ยท None tool calls ยท 0 s ยท fastapi/fastapi
๐ Fix handling arbitrary types when using `arbitrary_types_allowed=True` ๐ Fix handling arbitrary types when using `arbitrary_types_allowed=True` Related to https://github.com/fastapi/fastapi/discussions/14184, https://github.com/fastapi/fastapi/issues/14483
| # | Tool | Arguments | Result |
|---|---|---|---|
| No trace captured. | |||
ite-packages/pydantic/_internal/_generate_schema.py:1022: in _generate_schema_inner
return self._annotated_schema(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:2202: in _annotated_schema
schema = self._apply_annotations(source_type, annotations)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:2252: in _apply_annotations
schema = get_inner_schema(source_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_schema_generation_shared.py:83: in __call__
schema = self._handler(source_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:2425: in new_handler
schema = get_inner_schema(source)
^^^^^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_schema_generation_shared.py:83: in __call__
schema = self._handler(source_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:2423: in new_handler
schema = annotation_get_schema(source, get_inner_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/functional_serializers.py:64: in __get_pydantic_core_schema__
schema = handler(source_type)
^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_schema_generation_shared.py:83: in __call__
schema = self._handler(source_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:2425: in new_handler
schema = get_inner_schema(source)
^^^^^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_schema_generation_shared.py:83: in __call__
schema = self._handler(source_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:2231: in inner_handler
schema = self._generate_schema_inner(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:1043: in _generate_schema_inner
return self.match_type(obj)
^^^^^^^^^^^^^^^^^^^^
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:1165: in match_type
return self._unknown_type_schema(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pydantic._internal._generate_schema.GenerateSchema object at 0x105a9ea70>
obj = <class 'tests.test_arbitrary_types.get_client.<locals>.FakeNumpyArray'>
def _unknown_type_schema(self, obj: Any) -> CoreSchema:
> raise PydanticSchemaGenerationError(
f'Unable to generate pydantic-core schema for {obj!r}. '
'Set `arbitrary_types_allowed=True` in the model_config to ignore this error'
' or implement `__get_pydantic_core_schema__` on your type to fully support it.'
'\n\nIf you got this error by calling handler(<some type>) within'
' `__get_pydantic_core_schema__` then you likely need to call'
' `handler.generate_schema(<some type>)` since we do not call'
' `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.'
)
E pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'tests.test_arbitrary_types.get_client.<locals>.FakeNumpyArray'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.
E
E If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.
E
E For further information visit https://errors.pydantic.dev/2.13/u/schema-for-unknown-type
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/fastapi/lib/python3.13/site-packages/pydantic/_internal/_generate_schema.py:674: PydanticSchemaGenerationError
=============================== warnings summary ===============================
../../../../../../../Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/overlays/starlette-0.50.0-py3-none-any/starlette/testclient.py:45
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/overlays/starlette-0.50.0-py3-none-any/starlette/testclient.py:45: DeprecationWarning: The anyio.abc.BlockingPortal alias is deprecated, use anyio.from_thread.BlockingPortal instead.
_PortalFactoryType = Callable[[], AbstractContextManager[anyio.abc.BlockingPortal]]
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
1 failed, 2 passed, 1 warning in 0.93s