Skip to content
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

Fix PlainSerializer usage with std type constructor #9031

Merged
merged 3 commits into from Mar 17, 2024

Conversation

sydney-runkle
Copy link
Member

@sydney-runkle sydney-runkle commented Mar 17, 2024

Ensure that you can use str, float, etc as the argument to PlainSerializer instead of the redundant lambda x: str(x), etc. Thanks @dmontagu for the help with the suggested fix!

Fix #8967

Selected Reviewer: @dmontagu

@sydney-runkle sydney-runkle added the relnotes-fix Used for bugfixes. label Mar 17, 2024
Copy link

cloudflare-pages bot commented Mar 17, 2024

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0e95690
Status: ✅  Deploy successful!
Preview URL: https://01b49cc8.pydantic-docs2.pages.dev
Branch Preview URL: https://fix-std-type-plain-ser.pydantic-docs2.pages.dev

View logs

@sydney-runkle
Copy link
Member Author

Please review

Copy link

codspeed-hq bot commented Mar 17, 2024

CodSpeed Performance Report

Merging #9031 will not alter performance

Comparing fix_std_type_plain_ser (0e95690) with main (1cfb22e)

Summary

✅ 10 untouched benchmarks

Copy link
Member

@adriangb adriangb left a comment

Choose a reason for hiding this comment

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

Looks simple!

@sydney-runkle sydney-runkle enabled auto-merge (squash) March 17, 2024 21:37
@sydney-runkle sydney-runkle merged commit 5c8afe6 into main Mar 17, 2024
53 checks passed
@sydney-runkle sydney-runkle deleted the fix_std_type_plain_ser branch March 17, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot use built-in callable as argument to PlainSerializer
3 participants