python3.0 MySQLdb

Discussion in 'Python' started by gert, Jan 12, 2009.

  1. gert

    gert Guest

    I need something to connect to a database, preferably mysql, that
    works in python3.0 please.
    gert, Jan 12, 2009
    #1
    1. Advertising

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


    And your question is?


    --
    Psss, psss, put it down! - http://www.cafepress.com/putitdown
    Daniel Fetchinson, Jan 12, 2009
    #2
    1. Advertising

  3. gert

    gert Guest

    On Jan 12, 8:25 pm, "Daniel Fetchinson" <>
    wrote:
    > > I need something to connect to a database, preferably mysql, that
    > > works in python3.0 please.

    >
    > And your question is?


    MySQLdb or something else for python3.0 ?
    gert, Jan 12, 2009
    #3
  4. gert

    Guest


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

    >>
    >> And your question is?


    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.

    --
    Skip Montanaro - - http://smontanaro.dyndns.org/
    , Jan 12, 2009
    #4
  5. > 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
    Martin v. Löwis, Jan 12, 2009
    #5
  6. gert

    gert Guest

    Its for testing mod_wsgi trunk on Python3.0 in combination with a
    database. Does anybody has a patch for MySQLdb ?
    gert, Jan 12, 2009
    #6
  7. gert

    Steve Holden Guest

    Daniel Fetchinson wrote:
    >> I need something to connect to a database, preferably mysql, that
    >> works in python3.0 please.

    >
    > 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
    --
    Steve Holden +1 571 484 6266 +1 800 494 3119
    Holden Web LLC http://www.holdenweb.com/
    Steve Holden, Jan 13, 2009
    #7
  8. Steve Holden wrote:
    > Daniel Fetchinson wrote:
    >>> I need something to connect to a database, preferably mysql, that
    >>> works in python3.0 please.

    >> 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?".


    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
    Martin v. Löwis, Jan 13, 2009
    #8
  9. >>>> I need something to connect to a database, preferably mysql, that
    >>>> works in python3.0 please.
    >>> 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?".

    >
    > 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


    --
    Psss, psss, put it down! - http://www.cafepress.com/putitdown
    Daniel Fetchinson, Jan 14, 2009
    #9
  10. gert

    gert Guest

    On Jan 13, 11:58 pm, "Martin v. Löwis" <> wrote:
    > Steve Holden wrote:
    > > Daniel Fetchinson wrote:
    > >>> I need something to connect to a database, preferably mysql, that
    > >>> works in python3.0 please.
    > >> 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?".

    >
    > 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.
    gert, Jan 14, 2009
    #10
  11. > 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
    Martin v. Löwis, Jan 14, 2009
    #11
  12. >> >>> I need something to connect to a database, preferably mysql, that
    >> >>> works in python3.0 please.
    >> >> 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?".

    >>
    >> 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 :)


    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

    --
    Psss, psss, put it down! - http://www.cafepress.com/putitdown
    Daniel Fetchinson, Jan 14, 2009
    #12
  13. gert

    Guest

    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.

    --
    Skip Montanaro - - http://smontanaro.dyndns.org/
    , Jan 14, 2009
    #13
  14. > 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



    --
    Psss, psss, put it down! - http://www.cafepress.com/putitdown
    Daniel Fetchinson, Jan 14, 2009
    #14
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrey Tatarinov

    python3: 'where' keyword

    Andrey Tatarinov, Jan 7, 2005, in forum: Python
    Replies:
    97
    Views:
    1,779
    Andrey Tatarinov
    Jan 16, 2005
  2. Andrey Tatarinov

    Python3: on removing map, reduce, filter

    Andrey Tatarinov, Jan 9, 2005, in forum: Python
    Replies:
    18
    Views:
    1,210
    Steven Bethard
    Jan 11, 2005
  3. Replies:
    37
    Views:
    825
    Steve Holden
    Jan 14, 2005
  4. Helmut Jarausch

    python3 - the hardest hello world ever ?

    Helmut Jarausch, Oct 14, 2008, in forum: Python
    Replies:
    23
    Views:
    794
  5. Andrew Berg
    Replies:
    0
    Views:
    321
    Andrew Berg
    Jun 16, 2012
Loading...

Share This Page