#20377: BinaryField doesn't work on MySQL and Python 3 -------------------------------------+------------------------------------- Reporter: aaugustin | Owner: nobody Type: | Status: new Cleanup/optimization | Version: master Component: Database layer | Resolution: (models, ORM) | Triage Stage: Accepted Severity: Normal | Needs documentation: 0 Keywords: | Patch needs improvement: 0 Has patch: 0 | UI/UX: 0 Needs tests: 0 | Easy pickings: 0 | -------------------------------------+------------------------------------- Description changed by aaugustin:
Old 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. New description: An 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 [7476d96f]. This commit should be reverted once a production-grade, Python 3-compatible database adapter exists for MySQL. -- -- Ticket URL: <https://code.djangoproject.com/ticket/20377#comment:1> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.