Skip to content

Revert by_alias default value change for to_json() and to_jsonable_python() #1672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

Viicos
Copy link
Member

@Viicos Viicos commented Mar 18, 2025

Fixes pydantic/pydantic#11577.

Regression in #1640.

to_json() and to_jsonable_python() are probably much more commonly used than the SchemaSerializer dump methods and as such, we should preserve existing behavior.

Change Summary

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

Sorry, something went wrong.

…le_python()`
Copy link

codspeed-hq bot commented Mar 18, 2025

CodSpeed Performance Report

Merging #1672 will not alter performance

Comparing by-alias-revert (eb4e0c1) with main (ac17f0c)

Summary

✅ 157 untouched benchmarks

@Viicos Viicos requested a review from davidhewitt March 18, 2025 18:08
@Viicos Viicos merged commit f977516 into main Mar 20, 2025
29 checks passed
@Viicos Viicos deleted the by-alias-revert branch March 20, 2025 13:36
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.

alias_generator no longer affects examples
1 participant