You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Vishnu Kosuri
f83a382ee9
Fix get_model_fields to unwrap Annotated before issubclass check
When a pydantic RootModel is parameterised with Annotated[SomeModel, Field(...)],
pydantic stores the root field annotation verbatim as Annotated[SomeModel, FieldInfo(...)].
get_model_fields passed that annotation directly to lenient_issubclass, which returned
False for the Annotated wrapper (it is not a type). This caused model_config to be
forwarded to ModelField, which then passed it to TypeAdapter. Pydantic raises
PydanticUserError when config is supplied together with a BaseModel/dataclass type.
Fix: strip one level of Annotated wrapping before the issubclass check, using the
public get_origin / get_args API from the standard typing module.
Fixes #14805 (alternative to PR #14805 without private pydantic internals)
Co-Authored-By: Claude Sonnet 4.6 <[email protected] >
4 months ago
..
.agents/skills/ fastapi
📝 Update Skill, optimize context, trim and refactor into references (#15031)
4 months ago
_compat
Fix get_model_fields to unwrap Annotated before issubclass check
4 months ago
dependencies
✨ Add support for streaming JSON Lines and binary data with `yield` (#15022)
5 months ago
middleware
📝 Use `WSGIMiddleware` from `a2wsgi` instead of deprecated `fastapi.middleware.wsgi.WSGIMiddleware` (#14756)
5 months ago
openapi
✨ Add support for Server Sent Events (#15030)
4 months ago
security
🎨 Update internal types for Python 3.10 (#14898)
5 months ago
__init__.py
🔖 Release version 0.135.1
4 months ago
__main__.py
♻️ Add support for `pip install "fastapi[standard]"` with standard dependencies and `python -m fastapi` (#11935)
2 years ago
applications.py
♻️ Refactor logic to handle OpenAPI and Swagger UI escaping data (#14986)
5 months ago
background.py
🎨 Update internal types for Python 3.10 (#14898)
5 months ago
cli.py
♻️ Add support for `pip install "fastapi[standard]"` with standard dependencies and `python -m fastapi` (#11935)
2 years ago
concurrency.py
♻️ Upgrade internal syntax to Python 3.9+ 🎉 (#14564)
7 months ago
datastructures.py
🐛 Fix JSON Schema for files, use `contentMediaType` instead of `format: binary` (#14953)
5 months ago
encoders.py
🎨 Update internal types for Python 3.10 (#14898)
5 months ago
exception_handlers.py
⬆️ Upgrade Starlette supported version range to >=0.40.0,<0.49.0 (#14077)
10 months ago
exceptions.py
🎨 Update internal types for Python 3.10 (#14898)
5 months ago
logger.py
🔊 Refactor logging (#781)
7 years ago
param_functions.py
📝 Fix doctrings for `max_digits` and `decimal_places` (#14944)
4 months ago
params.py
🎨 Update internal types for Python 3.10 (#14898)
5 months ago
py.typed
✨ add py.typed to ship typing information (#209)
7 years ago
requests.py
⬆ Require Pydantic > 1.0 (#1862)
6 years ago
responses.py
✨ Add support for Server Sent Events (#15030)
4 months ago
routing.py
🐛 Fix, avoid yield from a TaskGroup, only as an async context manager, closed in the request async exit stack (#15038)
4 months ago
sse.py
✨ Add support for Server Sent Events (#15030)
4 months ago
staticfiles.py
✨ Improve type annotations, add support for mypy --strict, internally and for external packages (#2547)
6 years ago
templating.py
✨ Improve type annotations, add support for mypy --strict, internally and for external packages (#2547)
6 years ago
testclient.py
✨ Improve type annotations, add support for mypy --strict, internally and for external packages (#2547)
6 years ago
types.py
🎨 Update internal types for Python 3.10 (#14898)
5 months ago
utils.py
🎨 Update internal types for Python 3.10 (#14898)
5 months ago
websockets.py
✨ Export `WebSocketState` in `fastapi.websockets` (#4376)
4 years ago