Re: Django 1.6.0 over python 3: mysql?

568 views
Skip to first unread message

ajendrex

unread,
Nov 23, 2012, 4:43:47 PM11/23/12
to django...@googlegroups.com
I decided to use postgresql and move on :)

On Friday, November 23, 2012 11:02:10 AM UTC-3, ajendrex wrote:
Hello,

I'm new to django and I'm going directly to use it over python 3 (I have been using python 3 for mor than one year). However, the MySQLdb library doesn't support python 3 yet. Is there a way of connecting django to mysql over python3? If not, any plan to get it in the near future?

Russell Keith-Magee

unread,
Nov 23, 2012, 8:59:52 PM11/23/12
to django...@googlegroups.com
Hi,

The short answer is that MySQLdb is outside the control of the Django project. Django itself is now Python 3 compatible. The compatibility of other libraries is up to their respective maintainers.

That said, I doubt you'll regret the move to PostgreSQL :-)

Yours,
Russ Magee %-)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/n1hMGSYAR74J.

To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Ian Clelland

unread,
Dec 7, 2012, 12:28:24 AM12/7/12
to django...@googlegroups.com
On Fri, Nov 23, 2012 at 6:02 AM, ajendrex <hurb...@gmail.com> wrote:
Hello,

I'm new to django and I'm going directly to use it over python 3 (I have been using python 3 for mor than one year). However, the MySQLdb library doesn't support python 3 yet. Is there a way of connecting django to mysql over python3? If not, any plan to get it in the near future?


I'm sorry I didn't see this when you asked (two weeks ago now).

I wholeheartedly support your move to PostgreSQL, but if anyone else on the list is stuck in the same situation, about a year ago I adapted the Django MySQL backend to use PyMySQL[1], which is a pure python interface to MySQL, is essentially a drop-in replacement for MySQLdb, and *is* Python 3-compatible.

You can just easy_install (or pip install) django-mysql-pymysql, and use 'mysql_pymysql' as your database backend, and you should be set.

If it breaks, feel free to submit improvements at https://github.com/clelland/django-mysql-pymysql :)

Alternately, you could wait a bit; Andy Dustman mentioned on his blog a couple of months ago that a soon-upcoming version of MySQLdb could be released with Python 3 support [2]



--
Regards,
Ian Clelland
<clel...@gmail.com>
Reply all
Reply to author
Forward
0 new messages