chtd / psycopg2cffi

Port to cffi with some speed improvements
Other
177 stars 43 forks source link

Encode values to bytes in Python 3 #57

Closed DebauchedSloth closed 8 years ago

DebauchedSloth commented 8 years ago

This solves a problem in GeoDjango in python 3, where the Geo objects are coming in as objects and are converted for the DB as strings. By forcing encoding, we ensure that they are able to be inserted.

Without the encoding change, the final join (return b''.join(parts)) will fail with a type conversion error.

lopuhin commented 8 years ago

Thank you!

DebauchedSloth commented 8 years ago

Thanks!

On Fri, Dec 18, 2015 at 8:40 AM, Konstantin Lopuhin < notifications@github.com> wrote:

Thank you!

— Reply to this email directly or view it on GitHub https://github.com/chtd/psycopg2cffi/pull/57#issuecomment-165780797.

Greg White (781) 248-4852