如何忽略pymysql警告信息
在python中使用pymysql库时,你可能会碰到由pymysql生成的警告信息:

诸如:
Warning: (1681, 'Integer display width is deprecated and will be removed in a future release.')
这是在创建表时使用了 BIGINT(20)。
出现这些警告的原因很多,比如因为MySQL版本不同所导致的SQL语句问题,又或者访问一个不存在的表;
如果这些警告对我们的程序并没有多大影响,其实可以选择忽略它们;
from warnings import filterwarnings
filterwarnings("ignore",category=pymysql.Warning)