Opened 12 years ago

Last modified 10 years ago

#20377 closed Cleanup/optimization

BinaryField doesn't work on MySQL and Python 3 — at Initial Version

Reported by: Aymeric Augustin Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Someday/Maybe
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

A unofficial port of MySQLdb appears to be the only solution to connect to MySQL from Python 3 at this time, see [e81e319f].

Unfortunately, its handling of binary data is very buggy. For instance, this code is almost certainly wrong:

def Binary(x):
    return str(x)

There are other problems, like attempting to decode all bytestrings as UTF-8.

With no short-term solution in sight, tests involving BinaryField were marked as expected failures on MySQL and Python 3 in [7476d96].

This commit should be reverted once a production-grade, Python 3-compatible database adapter exists for MySQL.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top