mirror of
https://github.com/jeffknupp/sandman2.git
synced 2026-04-25 00:25:49 +03:00
[GH-ISSUE #37] sqlalchemy_utils.PasswordType makes JSONEncoder's serialization barf #24
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
pull-request
question
refactoring
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/sandman2-jeffknupp#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Datamance on GitHub (Jul 31, 2016).
Original GitHub issue: https://github.com/jeffknupp/sandman2/issues/37
Here's my stacktrace:
You just might wanna make the api machinery a little more robust, to handle bytes serialization.
@jeffknupp commented on GitHub (Jul 31, 2016):
JSON, as a format, does not have a way to encode arbitrary binary data. That's a limit of the format, not the API.
@Datamance commented on GitHub (Jul 31, 2016):
@jeffknupp then maybe have default serialization for binary data properties turned off? I'm guessing that you're going to have other devs who want to get user data from databases that use bcrypt to protect passwords.
I'm assuming this is something I can get around by extending sandman2.model.Model?
@jeffknupp commented on GitHub (Aug 5, 2016):
Yes, the proper way to address this would be to extend
sandman2.model.Model. I'm 👎 on excluding types from serialization as it would either require a catch-all rule that would be difficult to maintain or an explicit list of (database-specific) excluded types which would be even more error-prone.