Repository navigation
Use python strings for field names - #12631
Merged
Merged
Conversation
CodSpeed Performance ReportMerging #12631 will improve performances by 6.74%Comparing Summary
Benchmarks breakdown
|
Contributor
Deploying pydantic-docs with
|
| Latest commit: |
3758050
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f4afec07.pydantic-docs.pages.dev |
| Branch Preview URL: | https://dh-py-backed-field-names.pydantic-docs.pages.dev |
davidhewitt
force-pushed
the
dh/py-backed-field-names
branch
from
December 16, 2025 13:10
0f5c6f8 to
3758050
Compare
davidhewitt
marked this pull request as ready for review
December 16, 2025 14:36
Viicos
approved these changes
Dec 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
Similar to #12571
The idea is again that field names are typically being stored at the moment as both Python
Pyand RustString.By replacing these with PyO3's
PyBackedStrwe avoid needing to copy data into new Rust strings, while still being able to access the data as&strwhen needed.Related issue number
This is yet another step on the way to making #12550 apply as a reasonable diff.
Checklist