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

subclasses of bytes converted to bytes #3706

Closed
samuelcolvin opened this issue Jan 20, 2022 · 0 comments · Fixed by #3707
Closed

subclasses of bytes converted to bytes #3706

samuelcolvin opened this issue Jan 20, 2022 · 0 comments · Fixed by #3707
Labels
bug V1 Bug related to Pydantic V1.X

Comments

@samuelcolvin
Copy link
Member

See duo-labs/py_webauthn#113 (comment)

In short (I think) cython is converting subclasses of bytes to raw bytes in here:

https://github.com/samuelcolvin/pydantic/blob/9d631a3429a66f30742c1a52c94ac18ec6ba848d/pydantic/validators.py#L79

Fix should be as simple as changing the type hint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug V1 Bug related to Pydantic V1.X
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant