Bug 1088412

Summary: mysql.connector.django is not compatible with django-1.6.2
Product: [Fedora] Fedora Reporter: Jakub Dorňák <jdornak>
Component: mysql-connector-pythonAssignee: Remi Collet <fedora>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: fedora, hhorak, jdornak
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mysql-connector-python-1.1.6-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-26 09:14:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
'NoneType' object has no attribute 'converter' none

Description Jakub Dorňák 2014-04-16 15:26:46 UTC
Created attachment 886924 [details]
'NoneType' object has no attribute 'converter'

Description of problem:
MySQL connector for Django provided by mysql-connector-python is not compatible with django-1.6.2, which will be soon available in Fedora 20.


Version-Release number of selected component (if applicable):
mysql-connector-python-1.1.5-1.fc20.noarch
python-django-1.6.2-2.fc20.noarch
mariadb-server-5.5.36-1.fc20.x86_64


Steps to Reproduce:
1. create default project:
$ django-admin startproject test1; cd test1

2. create database:
$ echo create database test1 | mysql

3. setup django to use mysql.connector.django as database backend:
$ grep -A 4 -B 2 mysql.connector.django test1/settings.py
DATABASES = {
    'default': {
        'ENGINE': 'mysql.connector.django',
        'NAME': 'test1',
        'USER': 'root',
    }
}

4. sync db:
$ python manage.py syncdb

5. run server:
$ python manage.py runserver

6. visit admin site at: http://127.0.0.1:8000/admin/

Actual results:
Exception Type: AttributeError at /admin/
Exception Value: 'NoneType' object has no attribute 'converter'
(attached traceback)

Expected results:
Login page

Comment 1 Remi Collet 2014-04-16 15:30:45 UTC
So obvioulsy, if this upgrade of django breaks such thing, it should not be push to stable release F20.

Comment 2 Remi Collet 2014-04-16 16:09:28 UTC
I just push mysql-connector-python-1.1.6-1.fc20.noarch to testing.

Please test it 

According to changelog it fixes a bug with Django backend (but according to previous entries in changelog, it should work with 1.6).

Comment 3 Jakub Dorňák 2014-04-16 20:07:35 UTC
It works fine with these versions:
mysql-connector-python-1.1.6-1.fc20.noarch
python-django-1.6.2-2.fc20.noarch
mariadb-server-5.5.36-1.fc20.x86_64

Comment 4 Jakub Dorňák 2014-04-16 20:20:24 UTC
I am changing the severity, because I realized, that most of the applications probably use Django's default mysql backend, which uses MySQL-python. Therefore this should not affect them. I use django backend from mysql-connector-python, because MySQL-python is not available for python3.

This reminds me to note that it also works with python3 variants:
mysql-connector-python3-1.1.6-1.fc20.noarch
python3-django-1.6.2-2.fc20.noarch

Thank You for very fast update.

Comment 5 Fedora Update System 2014-04-17 06:40:22 UTC
mysql-connector-python-1.1.6-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mysql-connector-python-1.1.6-1.fc20

Comment 6 Fedora Update System 2014-04-18 15:39:25 UTC
Package mysql-connector-python-1.1.6-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mysql-connector-python-1.1.6-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5312/mysql-connector-python-1.1.6-1.fc20
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-04-26 09:14:24 UTC
mysql-connector-python-1.1.6-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.