-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Cannot use str
as argument to PlainSerializer
#9447
Comments
aphedges
added
bug V2
Bug related to Pydantic V2
pending
Awaiting a response / confirmation
labels
May 16, 2024
Unlike |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initial Checks
Description
PlainSerializer
does not accept the built-in objectstr
as itsfunc
argument. I previously reported this as #8967, and it was reported fixed in #9031 / 5c8afe6. However, the newly added test usesfloat
instead ofstr
as the argument toPlainSerializer
, butfloat
does not trigger this bug.I have included a stack trace of the thrown exception below:
Stack trace
Example Code
Python, Pydantic & OS Version
The text was updated successfully, but these errors were encountered: