Opened 7 years ago

Closed 20 months 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 7 years ago.
Patch of a DB backend supporting MySQL Connector/Python

Download all attachments as: .zip

Change History (19)

Changed 7 years ago by geertjanvdk

Attachment: myconnpy.patch.gz added

Patch of a DB backend supporting MySQL Connector/Python

comment:1 Changed 7 years ago by Russell Keith-Magee

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
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 Changed 6 years ago by dulepov

Cc: wwbj2r68n2@… added
Keywords: myconnpy added

comment:3 Changed 5 years ago by Matt McClanahan

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

comment:4 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:6 Changed 4 years ago by Aymeric Augustin

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 Changed 3 years ago by Daniel.Sears@…

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

See https://python3wos.appspot.com/

comment:8 Changed 3 years ago by Aymeric Augustin

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 Changed 3 years ago by Daniel.Sears@…

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 Changed 3 years ago by Aymeric Augustin

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 Changed 3 years ago by anonymous

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 Changed 2 years ago by Tim Graham

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

comment:13 Changed 2 years ago by Markus Amalthea Magnuson

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 Changed 2 years ago by Markus Amalthea Magnuson

Cc: markus.magnuson@… added

comment:15 Changed 2 years ago by INADA Naoki

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

comment:16 Changed 2 years ago by Collin Anderson

Cc: cmawebsite@… added

comment:17 Changed 20 months ago by Collin Anderson

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

comment:18 Changed 20 months ago by Tim Graham

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