SIGN IN SIGN UP

fix: transform NotRequired typed dictionary fields (#3995)

Fields wrapped in `NotRequired` currently skip alias, format, and nested
transformation metadata. Unwrap it alongside `Required` so optional
typed-dictionary fields serialize consistently, while omitted fields
stay omitted.

Carries forward @Shubham-Padkonde’s fix from #3872 with current main
merged in, preserving the original commit and authorship. Includes one
focused sync/async regression covering aliases, date formatting, nested
dictionaries, lists, and omission.

Validation: both regression cases fail on main; 69 transform/typing
tests pass on each Pydantic version. Ruff, mypy, strict Pyright, and the
custom-code budget pass. Security review found no new dependencies,
execution paths, network destinations, or credential handling.

Co-authored-by: Shubham Padkonde <shubhampadkonde12@gmail.com>
M
Marcus Wood committed
5544c18c19f125718ed9c4f7c42866c27060158e
Parent: 1c4830b
Committed by GitHub <noreply@github.com> on 9/30/2026, 12:06:03 AM