Bug #76752 Connector/Python Django backend doesn't work with Django 1.8

Submitted: 20 Apr 2015 11:19 Modified: 19 Jun 2015 16:58
Reporter: Tomas Heger Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / Python Severity:S3 (Non-critical)
Version:2.0.3 OS:Any
Assigned to: CPU Architecture:Any
Tags: Django

[20 Apr 2015 11:19] Tomas Heger
Description:
Django 1.8 changed the database backend API:
https://docs.djangoproject.com/en/1.8/releases/1.8/#database-backend-api

Thus, the Django backend that is a part of Connector/Python doesn't work with Django 1.8 which is the current version.

When I try and use the Connector/Python backend with Django 1.8, I get the following error when trying to manage.py runserver:

django.core.exceptions.ImproperlyConfigured: 'mysql.connector.django' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
    u'base', u'mysql', u'oracle', u'postgresql_psycopg2', u'sqlite3'
Error was: cannot import name BaseDatabaseFeatures

How to repeat:
Create a project with Django 1.8 and set it to use mysql.connector.django. 
Try and run the server using manage.py runserver.

Suggested fix:
Adjust the backend to the changes in Django API. See the release notes for details:
https://docs.djangoproject.com/en/1.8/releases/1.8/#database-backend-api
[30 Apr 2015 9:09] Peeyush Gupta
Thanks for the bug report.

We will soon work on supporting Django 1.8.
[30 Apr 2015 9:11] Tomas Heger
Thank you. Is there any ETA for this?
[30 Apr 2015 11:18] Brian Tyndall
I have made an attempt to update the connector to Django 1.8,  which seems to work ok, and can be used for testing:

https://github.com/multiplay/mysql-connector-python/compare/master...Tyndie:django18
[8 May 2015 11:05] Николай Осауленко
Any update on this issue? I'm still getting this error event with a Brian's solution.
[11 May 2015 9:55] Brian Tyndall
My link was just a diff, try using https://github.com/multiplay/mysql-connector-python
[13 May 2015 21:32] Rui Zheng
@Brian Tyndall
Thanks a lot. Just gave the folk on your repo. It works like a charm.
[19 Jun 2015 16:58] Paul DuBois
Noted in 2.1.3 changelog.

Connector/Python is now compatible with Django 1.8.
[28 Jul 2015 17:09] Chris Pappalardo
Anyone know when MySQL Connector/Python 2.1.3 with this bug fix is to be released?
[13 Aug 2015 6:14] Ankit Mishra
Guys, I am also getting the same error. Any help how we can use python 2.7.10 with MySQL connector.Thanks.
[28 Oct 2015 11:58] Victor Cajes
There is a new version of the mysql-connector-python that you have uploaded to pypi at https://pypi.python.org/pypi/mysql-connector-python/2.0.4

Many people are now using Django 1.8, and this connector 2.0.4 does not work with Django 1.8

But the version 2.1.3 works fine with Django. Link to version 2.1.3 http://dev.mysql.com/downloads/connector/python/

Could you please update your pypi repository to this latest version please? Because we need to include this in a requeriments.txt file!

Thank you so much for this!

Victor Cajes @ PythonDev
[8 Nov 2015 4:25] Megha Bodke
Please update your pypi repository to this latest version.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.042 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.