when I use MySQLdb get this message:
/var/lib/python-support/python2.6/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated from sets import ImmutableSet
I try filter the warning with
import warnings
warnings.filterwarnings("ignore", message="the sets module is deprecated from sets import ImmutableSet")
but, I not get changes.
any suggestion?
Many thanks.
From python documentation: you could filter your warning this way, so that if other warnings are caused by an other part of your code, there would still be displayed:
but as said by Alex Martelli, the best solution would be to update MySQLdb so that it doesn’t use deprecated modules.