Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

This SO question is now more than two years old. MySQL is an incredibly popular database engine, Python is an incredibly popular programming language, and Python 3 has been officially released two years ago, and was available even before that.

What's more, the whole mysqldb module is just a layer translating Python's db-api to MySQL's API. It's not that big of a library.

I must be missing something here. How come almost* nobody in the entire open source community has spent the (I'm guessing) two weeks it takes to port this lib?

  1. Is Python 3 that unpopular?
  2. Is the combination of python and mysql not as common as I assume?
  3. Or maybe it's just a lot harder to port mysqldb than I assume?

Anyone know the inside story on this?

* Now I see that this guy has done it, which takes some of the wind out of my question, but it still seems to little and too late to make sense.

EDIT: OK, I'm aware that the stock answers for these kind of questions cover this one as well. Patches welcome, scratch your itch, we don't work for you and we don't have the time, etc. I actually took a shot at porting this about a year ago, but it was my first time doing anything with Python C extensions, and I failed.

My point in writing this was not a plea for somebody to write it, but genuine curiosity: it seems that some much more complicated libraries have been ported to python 3 already, and in the poll for which libraries should be ported, mysqldb is not even nominated! That suggests that maybe (2) is the right answer.

UPDATE: I found that there are several new libraries that provide mysql support under Python 3, I just wasn't googling hard enough. That explains everything.

share|improve this question

closed as not constructive by Walter, Eric King, gnat, Glenn Nelson, Robert Harvey Dec 4 '12 at 17:08

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

6 Answers 6

I think it is mostly 1 - if you have an existing project, you will not port it to python 3 overnight, especially since the benefit/cost ratio is so low. Several core libraries have just been ported this year, and I think it will take quite a few years before python 3 becomes even the dominant dialect of python.

Also, it seems that the mysqldb module is updated rather slowly, and for several reasons (better suited to the async frameworks that are so hyped ATM), other pure python drivers are being developed at the moment.

share|improve this answer

Because you haven't written it yet. ;-) It's all open-source, after all. Scratch your itch. I'm also still using Python 2.x (x=7 now). Google app engine requires 2.x. Most legacy code requires 2.x. And there isn't a whole lot more in 3.x that's that much better than the already pretty good Python 2.x.

share|improve this answer

The main reason is without a doubt a lack of time amongst the maintainers. It's as simple as that. If you want to help port it, they probably would appreciate it.

share|improve this answer

Like they say on python website python3 does not have backward compatibility (that is the purpose of having python 2.x and python 3.x together for download), so many libraries and programs are still adapting to the changes (and some of them will never do), also a lot of web hosts still uses python 2.x (some of them even python 2.4!), just because server versions of os's (unix mostly, since no there is actually no host that has only windows servers) like to really be stable, and don't update in the same way as the desktop versions. So if your library does not support python 3, 1) use python 2.x, 2) try to find another options, 3) help with the work...

share|improve this answer

I just don't think many people need it. If you're using Python for web development, Django has it's own database system and manages the databases for you. Is there another reason someone would need a large database? (That's an honest question, I'm still kind of new at this.)

share|improve this answer
    
Django doesn't use Python 3. docs.djangoproject.com/en/dev/intro/install –  MIA Dec 30 '10 at 17:22
    
@Jim: That another reason not many people need it. IMHO, most people who use Python would use Django and therefore not version 3. So no need for a v3 SQL module. –  John Dec 31 '10 at 17:14

This was also always a mystery to me!

...Therefore my answer is "I don't know".

I guess that as long as nobody invests time or money into it, it will not happen. I think also most of the python community are script kiddies who think "if it's not in p3, I'll simply use p2" and hence there is little pressure from the community.

I would even go further and find it should be part of the core libraries ...I mean, almost every programming language has mysql bindings included ...except python where hack your way. Not very pythonic in my opinion.

share|improve this answer
2  
See my update. PyMySQL is a drop-in replacement to MySQLdb that supports py3k. MySQLdb is simply a dead project. –  itsadok Dec 11 '12 at 7:18
    
Yeah, I used it. No idea about its quality but for now it does its job. I still think such a wrapper should be part of the built-in libraries, like any other modern PL –  arnaud Dec 11 '12 at 8:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.