Bug #71229 Wrong number of positional args when using connector + Django 1.6
Submitted: 25 Dec 2013 18:56 Modified: 4 Feb 2014 11:38
Reporter: Ryan Macy Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / Python Severity:S3 (Non-critical)
Version:1.1.4 OS:Any
Assigned to: Peeyush Gupta CPU Architecture:Any
Tags: Django, python

[25 Dec 2013 18:56] Ryan Macy
Description:
When using mysql-connector-python and Django 1.6.x you'll receive an exception complaining about the number of available positional arguments to `sql_for_inline_foreign_key_references()` and the number of arguments passed in. This is due to a recent change in Django.

How to repeat:
Install and attempt to connect to MySQL (any supported version) with django (1.6.x) using the `mysql.connector.django` engine.

Suggested fix:
Change:

    def sql_for_inline_foreign_key_references(self, field, known_models, style):
        "All inline references are pending under MySQL"
        return [], True

To:

    def sql_for_inline_foreign_key_references(self, *args):
        "All inline references are pending under MySQL"
        return [], True
[6 Jan 2014 8:49] Geert Vanderkelen
There's more changed to Django 1.6, and we're already working to catch up with that release and the changes.

Thanks for the report!
[4 Feb 2014 11:38] Geert Vanderkelen
Fixed in v1.1.5