Currently, I get a warning every time I run a Python script that uses MySQLdb:
/var/lib/python-support/python2.6/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated from sets import ImmutableSet
I would prefer not to interfere with their lib if possible. I am on a Ubuntu server. Does anyone know an easy way to fix this warning?
thanks
UPDATE : Fixed based on the suggestions below and this link: https://bugzilla.redhat.com/show_bug.cgi?id=505611
import warnings warnings.filterwarnings('ignore', '.*the sets module is deprecated.*', DeprecationWarning, 'MySQLdb') import MySQLdb
python mysql
James
source share