python3.0 MySQLdb

G

gert

I need something to connect to a database, preferably mysql, that
works in python3.0 please.
 
S

skip

gert> MySQLdb or something else for python3.0 ?

Given that Python 3.0 is so new and so few packages have been ported to it
yet, it might be helpful if you explained why Python 2.6 + MySQLdb isn't
sufficient for your needs.
 
M

Martin v. Löwis

I need something to connect to a database, preferably mysql, that
works in python3.0 please.

For postgres, psycopg2 works with Python 3 (if you use my patch).

Regards,
Martin
 
G

gert

Its for testing mod_wsgi trunk on Python3.0 in combination with a
database. Does anybody has a patch for MySQLdb ?
 
S

Steve Holden

Daniel said:
And your question is?
Surely it's fairly obvious that the question is "does such a thing
exist, and if so where can I find it?". If that isn't obvious then
please continue to lurk until it is. There's enough signal on this
channel that we can do without such noise.

regards
Steve
 
M

Martin v. Löwis

Steve said:
Surely it's fairly obvious that the question is "does such a thing
exist, and if so where can I find it?".

Interestingly enough, the question was slightly (but importantly)
different, though: the question really was "Does anybody has a patch for
MySQLdb?"; as my reference to the existing interface to PostgreSQL
was not sufficient for the OP.

Regards,
Martin
 
D

Daniel Fetchinson

I need something to connect to a database, preferably mysql, that
Interestingly enough, the question was slightly (but importantly)
different, though: the question really was "Does anybody has a patch for
MySQLdb?"; as my reference to the existing interface to PostgreSQL
was not sufficient for the OP.

Exactly. One could think about 3-4 different potentially useful
answers to the OP but when one sees 3-4 immediately right after
reading the post then probably there are a couple more still after
some thinking. So if the OP specifies exactly what he/she wants,
he/she will get more signal than noise.

Cheers,
Daniel
 
G

gert

Interestingly enough, the question was slightly (but importantly)
different, though: the question really was "Does anybody has a patch for
MySQLdb?"; as my reference to the existing interface to PostgreSQL
was not sufficient for the OP.

Yes it was enough, but I can not imagine it has not been done yet for
MySql either :)

It was a open statement where I expected like 10 different databases
responses. For example if you go to a dinner place you have never been
gone before and want to try something new and there is no menu
available. What do you ask ? You just say something similar. "I would
like to order a salet please with some red wine." I don't think any
one of you would expect the waiter to answer,"And your question is?" I
also think the waiter does not expect me to ask 10 similar questions
like "red wine 1991? red wine 1992? red wine 1993? until i hit
something that is on the menu"

So the final questions was, is there anything els on the menu besides
PostgreSQL, like MySql for example ? If not I will take PostgreSQL
please.
 
M

Martin v. Löwis

So the final questions was, is there anything els on the menu besides
PostgreSQL, like MySql for example ?

There is sqlite3 also; it is included in Python 3. Otherwise, I don't
think any other DB-API compliant database connectors have been ported
to Python 3 yet; it may take many months until somebody volunteers to
port a MySQL driver.

The difference to your restaurant example is that the market for red
wine is many hundred years old. The market for Python 3 modules is
just a month old. Hence, you have different offers for red wine, but
nearly none for Python 3 modules.

Regards,
Martin
 
D

Daniel Fetchinson

I need something to connect to a database, preferably mysql, that
Yes it was enough, but I can not imagine it has not been done yet for
MySql either :)

Well, this actually is the case: MySql has not been ported. As far as
I can see the mysql python module in general (meaning for the 2.x
branch) is not as well maintained as some others and questions about
windows vs. linux issues periodically come up on the mailing list. So
I would not be surprised if porting mysql to the 3.x branch will take
longer and will be less well-maintained than other database bindings.
It was a open statement where I expected like 10 different databases
responses. For example if you go to a dinner place you have never been
gone before and want to try something new and there is no menu
available. What do you ask ? You just say something similar. "I would
like to order a salet please with some red wine." I don't think any
one of you would expect the waiter to answer,"And your question is?" I
also think the waiter does not expect me to ask 10 similar questions
like "red wine 1991? red wine 1992? red wine 1993? until i hit
something that is on the menu"

So the final questions was, is there anything els on the menu besides
PostgreSQL, like MySql for example ? If not I will take PostgreSQL
please.

The 3.x branch just as the 2.x branch contains bindings to sqlite.
This you can use from day 1, the 3.0 release contains it.

Cheers,
Daniel
 
S

skip

Daniel> Well, this actually is the case: MySql has not been ported. As
Daniel> far as I can see the mysql python module in general (meaning for
Daniel> the 2.x branch) is not as well maintained as some others and
Daniel> questions about windows vs. linux issues periodically come up on
Daniel> the mailing list. So I would not be surprised if porting mysql
Daniel> to the 3.x branch will take longer and will be less
Daniel> well-maintained than other database bindings.

Unless you have direct evidence to the contrary people should take what you
wrote with a grain of salt. In my experience Andy Dustman has been quite
responsive to inputs about MySQLdb, when those inputs happen in the forum he
inhabits. That forum is the MySQL forum tool on SourceForge:

http://sourceforge.net/forum/?group_id=22307

If you're curious about MySQLdb on Python 3.0 that is the place to ask. Of
course, like all open source software if you provide a patch in the project
tracker things will happen faster.
 
D

Daniel Fetchinson

Daniel> Well, this actually is the case: MySql has not been ported. As
Daniel> far as I can see the mysql python module in general (meaning for
Daniel> the 2.x branch) is not as well maintained as some others and
Daniel> questions about windows vs. linux issues periodically come up on
Daniel> the mailing list. So I would not be surprised if porting mysql
Daniel> to the 3.x branch will take longer and will be less
Daniel> well-maintained than other database bindings.

Unless you have direct evidence to the contrary people should take what you
wrote with a grain of salt.

What I wrote is of course solely my own experience. When I needed to
use a database with python I looked around and tried to guess which db
binding is the most mature, stable, well-maintained, etc. Meaning, I'd
like to have the least amount of compilation/linking problems for both
windows and linux and I'd like to have the least amount of runtime
problems. I did what I guess anybody would have done: a google search
on the main database bindings. From this rather ad hoc research I
concluded that mysqldb has more problems than the other major
databases.
In my experience Andy Dustman has been quite
responsive to inputs about MySQLdb, when those inputs happen in the forum he
inhabits.

I agree with you and I didn't say anything which contradicts your
statement. Being very responsive to problems is absolutely compatible
with having some problems.
That forum is the MySQL forum tool on SourceForge:

http://sourceforge.net/forum/?group_id=22307

If you're curious about MySQLdb on Python 3.0 that is the place to ask. Of
course, like all open source software if you provide a patch in the project
tracker things will happen faster.

Sure, we agree again. But since my impression about the OP's question
was that his/her main intention is not really code contribution but
rather a solution to use, I'd say this is pretty much irrelevant for
the OP.

But yes, we agree on how development of open source projects go :)

Cheers,
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top