Skip to content

Conversation

@davidhewitt
Copy link
Contributor

Change Summary

This PR follows up from #1857 and moves field_name into the State struct.

The goal is that the state can contain everything that's changing, which will also eventually cover include / exclude.

This PR ends up being a bit hefty because it adds lifetimes onto a ton of serializer methods. I think when we make further progress it might be possible to remove those again. The lifetimes are now in a much better place, in particular on the Extra struct.

Related issue number

N/A

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 24, 2025

CodSpeed Performance Report

Merging #1858 will not alter performance

Comparing dh/state-field-name (4deaba6) with main (f1239f8)

Summary

✅ 163 untouched

@davidhewitt davidhewitt merged commit 49b72b2 into main Oct 25, 2025
32 checks passed
@davidhewitt davidhewitt deleted the dh/state-field-name branch October 25, 2025 20:28
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 participants