Skip to content

Conversation

@Viicos
Copy link
Member

@Viicos Viicos commented Oct 13, 2025

Change Summary

Fixes pydantic/pydantic#12357.

Related issue number

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

@Viicos Viicos requested a review from davidhewitt October 13, 2025 08:36
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 13, 2025

CodSpeed Performance Report

Merging #1834 will improve performances by 13.2%

Comparing wrap-validator-field-name (48b1d54) with main (1e1c962)

Summary

⚡ 1 improvement
✅ 162 untouched

Benchmarks breakdown

Benchmark BASE HEAD Change
test_set_of_ints_core_json_duplicates 434.5 µs 383.8 µs +13.2%

Copy link
Contributor

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I think in the longer term I want something like #1786 to aggressively simplify/optimize InternalValidator and just have the &mut ValidationState be carried inside it, but that needs some experimentation in PyO3.

This will do for now.

@davidhewitt davidhewitt merged commit 0425954 into main Oct 13, 2025
32 checks passed
@davidhewitt davidhewitt deleted the wrap-validator-field-name branch October 13, 2025 09:53
@Viicos
Copy link
Member Author

Viicos commented Oct 13, 2025

Yeah all the clones happening here aren't ideal.

davidhewitt pushed a commit to pydantic/pydantic that referenced this pull request Oct 20, 2025
davidhewitt pushed a commit to pydantic/pydantic that referenced this pull request Oct 22, 2025
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: field name is missing when there are multiple field validators

2 participants