Geert JM Vanderkelen

MySQL Connector/Python v1.1.1 alpha: With Pooling and Django!

MySQL Connector/Python v1.1.1 alpha: With Pooling and Django!

Connector/Python v1.1.1 is available for testing. It’s the second of a series of alpha releases which will bring some new features. Check out the Change History if you want to keep up with what is being added and changed.

Notable changes for v1.1.1:

Connector/Python v1.1.1 is alpha and although in good shape, it’s advised not to use it in production just yet.

Some useful links:

8 thoughts on “MySQL Connector/Python v1.1.1 alpha: With Pooling and Django!

  1. Antonio Martínez

    I have just tried to use it on Django, but I get the following error:

    AttributeError: ‘str’ object has no attribute ‘decode’

    I just run the example on Django tutorial to connect to MySQL

    I have Django 1.5.2 and PHP 3.3

    ¿Any ideas how to solve it?

  2. Antonio Martínez

    I have just fixed it in a pragmatic way.

    I went to the line 278 function “last_executed_query” and instead of returning the statement decoded, I returned itself.

    According to the documentation the str are already unicode in Python 3.x.

    After this all the tables were created.

    Please, tell me if this fix has sense to you or is a complete disaster.

    Sorry for the noise and thanks so much for your work and effort.

  3. Pablo Bargues

    Hi Geert, thanks for your work, it finally enabled me to use Django on Python 3!
    Due to django’s last version, 1.6 from one or two weeks ago, I have found the need for another fix for the error: “TypeError: sql_for_inline_foreign_key_references() takes 4 positional arguments but 5 were given” (only for this django version, not the older ones):
    The file “/mysql/connector/django/creation.py” has the function sql_for_inline_foreign_key_references(self, field, known_models, style) which needs another parameter, leaving it like:
    sql_for_inline_foreign_key_references(self, model, field, known_models, style)
    I hope this can help you and others.

  4. Beverly Block

    I’m also getting the “TypeError: sql_for_inline_foreign_key_references() takes 4 positional arguments but 5 were given” with Django 1.6.1. Has there really been no fix to this in over 2 months? I asked about it on Stack Overflow, but got no useful response, and I’m stuck with beta testing now several weeks late.

    Removing all foreign keys is, obviously, not a feasible workaround…

Leave a Reply

Your email address will not be published. Required fields are marked *

23 − 21 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>