Re: [sqlalchemy] prevent (raise exceptions) on bytestring values for non-byte types

2021-07-29 Thread Mike Bayer
The Unicode datatype will emit a warning if you pass it a bytestring. you can use that instead of String, or use a datatype with your own assertions based on https://docs.sqlalchemy.org/en/14/core/custom_types.html#coercing-encoded-strings-to-unicode On Thu, Jul 29, 2021, at 5:17 PM,

[sqlalchemy] prevent (raise exceptions) on bytestring values for non-byte types

2021-07-29 Thread 'Jonathan Vanasco' via sqlalchemy
I am finally at the tail end of migrating my largest (and hopefully last) Python2 application to Python3. An issue that has popped up a lot during this transition, is when a py3 bytestring gets submitted into SqlAlchemy. When that happens, it looks like SqlAlchemy just passes the value into