Menu

Error on import mysqld

Help
2009-04-29
2012-09-19
  • Angelo Merlo (Soulless-BR)

    Hello friends!!!!

    i make a import MySQLdb on python and recive a next message on shell:

    "soulless-br@soulless-br-desktop:~$ python
    Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
    [GCC 4.3.3] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import MySQLdb
    /var/lib/python-support/python2.6/MySQLdb/init.py:34: DeprecationWarning: the sets module is deprecated
    from sets import ImmutableSet
    >>> "

    I'm installed a .deb of the MySQLdb (version 1.2.2-7ubuntu1)... My Ubutnu is 9.04 x86...

    Please tell me, whats wrong??
    Sorry for my bad english....

    Thank you!!!!

     
    • Ioannis Lalopoulos

      This is the warning that everyone gets with Python 2.6 and MySQL-Python 1.2.2.

      There is no need to be alarmed since deprecation means that the feature is working now but it may not be working in future versions of Python.

      In detail the sets module became deprecated in Python 2.6 due to the built-in set types that were introduced in Python 2.4

      If you want to get rid of the warning you can:

      1. Use Python 2.5 with MySQL-python 1.2.2
      2. Use Python 2.6 with MySQL-python 1.2.3c1
      3. Still use Python 2.6 and implement a patch in MYSQL-python 1.2.2 (http://sourceforge.net/forum/message.php?msg_id=5808948)
      4. Decide that this is a SEP (Somebody Else's Problem) and forget about it.
       

Log in to post a comment.