Opened 14 years ago

Closed 9 years ago

#12500 closed New feature (wontfix)

Support for MySQL Connector/Python

Reported by: geertjanvdk Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1
Severity: Normal Keywords: backend mysql myconnpy
Cc: wwbj2r68n2@…, markus.magnuson@…, cmawebsite@… Triage Stage: Someday/Maybe
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This is a feature request/proposal for including MySQL Connector/Python, a pure Python database driver) support in Django. It will make it hopefully much easyier for people to get working with Django and MySQL on all platforms.

Attached you'll find the backend which is a patched agains Django 1.2 rev 12083. For now it works well.
We'll probably put some ideas/workaround found in the original MySQL backend, back in MySQL Connector/Python.

More information and download of MySQL Connector/Python here: https://launchpad.net/myconnpy

Attachments (1)

myconnpy.patch.gz (6.2 KB ) - added by geertjanvdk 14 years ago.
Patch of a DB backend supporting MySQL Connector/Python

Download all attachments as: .zip

Change History (19)

by geertjanvdk, 14 years ago

Attachment: myconnpy.patch.gz added

Patch of a DB backend supporting MySQL Connector/Python

comment:1 by Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedSomeday/Maybe

Database backends should be first be maintained as external projects. Once you have demonstrated a long-term commitment to maintaining the external project, and you can demonstrate a non-trivial demand for your backend, we may consider introducing the backend into core.

comment:2 by dulepov, 14 years ago

Cc: wwbj2r68n2@… added
Keywords: myconnpy added

comment:3 by Matt McClanahan, 13 years ago

Component: UncategorizedDatabase layer (models, ORM)
Severity: Normal
Type: New feature

comment:4 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 by Aymeric Augustin, 12 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:6 by Aymeric Augustin, 11 years ago

Resolution: wontfix
Status: newclosed

I'm not aware of "non-trivial demand" for this backend over the last three years. If I've missed it, please reopen.

comment:7 by Daniel.Sears@…, 11 years ago

One reason to consider this is that MySQLdb does not currently support Python 3.

See https://python3wos.appspot.com/

comment:8 by Aymeric Augustin, 11 years ago

Resolution: wontfix
Status: closednew

Hmm. In fact, I'm going to reopen this myself, for the reasons explained here:

https://groups.google.com/d/msg/django-developers/8r_RVmUe5ys/09lCwJl-L1kJ

comment:9 by Daniel.Sears@…, 10 years ago

This looks like a moot point now that Oracle is shipping their own Django back-end for MySQL:

http://dev.mysql.com/doc/connector-python/en/connector-python-django-backend.html

comment:10 by Aymeric Augustin, 10 years ago

I still believe we should switch Django's built-in MySQL backend to MySQL Connector, because it’ll provide a better experience for MySQL users, especially under Python 3.

An external backend is less discoverable than a built-in one, all the more if it isn't even mentioned in the docs (we could fix that in the short term).

comment:11 by anonymous, 10 years ago

The latest releases of PyMySQL work with Django + Python 3.3. So if the backend changes, it would be nice if PyMySQL can remain compatible.

comment:12 by Tim Graham, 10 years ago

#22370 details a failing test with the connector (unclear to me if the problem is ours or theirs).

comment:13 by Markus Amalthea Magnuson, 10 years ago

Note that MySQL Connector from Oracle does not work with Django 1.7, due to the various TEST_* settings being deprecated. See ticket #22584 for more info on this.

(I have sent a bug report to Oracle as well.)

It might not even be a good idea to refer to this adapter in the 1.7 documentation, as is currently done here:

https://docs.djangoproject.com/en/1.7/ref/databases/#mysql-db-api-drivers

Until fixed on Oracle's side, following the documentation's advice for Python 3 will result in non-functioning tests.

comment:14 by Markus Amalthea Magnuson, 10 years ago

Cc: markus.magnuson@… added

comment:15 by INADA Naoki, 10 years ago

FYI, MySQL Connector/Python 1.2.2 GA has been released.

comment:16 by Collin Anderson, 10 years ago

Cc: cmawebsite@… added

comment:17 by Collin Anderson, 9 years ago

I think we should close this now that we officially recommend mysqlclient. (mysqlclient works on Python 3.)

comment:18 by Tim Graham, 9 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top