Skip to content

Conversation

@davidhewitt
Copy link
Contributor

@davidhewitt davidhewitt commented Oct 23, 2025

Change Summary

This changes the lookup strategy when passing dict subclasses as inputs to models to be equivalent of input.get(field_name, PydanticUndefined), and then assumes the value is not present if PydanticUndefined is returned.

Related issue number

Fixes pydantic/pydantic#12376

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 23, 2025

CodSpeed Performance Report

Merging #1853 will not alter performance

Comparing dh/defaultdict (11104ea) with main (eed392b)

Summary

✅ 163 untouched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2.12.0: defaultdict values incorrectly used instead of field defaults

1 participant