On the MySQLdb driver, this is true, but on pymysql, it returns a unicode
string instead. This prevents anyone from running queries containing
unicode characters in debug mode while using pymysql.
I can make a patch for this if necessary.
--
Ticket URL: <https://code.djangoproject.com/ticket/20542>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0
Comment:
Patches welcome.
--
Ticket URL: <https://code.djangoproject.com/ticket/20542#comment:1>
Comment (by russellm):
Is PyMySQL really a drop in replacement for MySQLdb? It looks to me like
the base package name is different, so I don't see how it is possible that
this works at all without either an import shim, or a completely different
database backend.
--
Ticket URL: <https://code.djangoproject.com/ticket/20542#comment:2>
Comment (by claudep):
I have a branch which more or less supports PyMySQL.
https://github.com/claudep/django/compare/pymysql
Quoting Alex (regarding the above branch):
''The right way to do this type of thing is to really split the adapter
part of a database backend away from the database part of it. So we can
easily have PyMySQL, MySQLdb, psycopg2, pg8000, py-postgresql, postgresql-
ctypes, and whatever else shows up, without needing to continually add to
the chain of `except ImportError`.''
--
Ticket URL: <https://code.djangoproject.com/ticket/20542#comment:3>
* cc: cmawebsite@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/20542#comment:4>
* status: new => closed
* resolution: => wontfix
Comment:
Closing now that mysqlclient is our official recommended connector.
--
Ticket URL: <https://code.djangoproject.com/ticket/20542#comment:5>