Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Why doesn't "filterwarnings" suppress this message?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Peter Otten, post: 4017551"] I can't confirm that: $ cat nowarning.py import sys if "--off" in sys.argv: import warnings warnings.filterwarnings(action="ignore", category=DeprecationWarning, module="feedparser") import feedparser $ python nowarning.py $ python -3 nowarning.py /usr/lib/python2.6/site.py:1: DeprecationWarning: The 'new' module has been removed in Python 3.0; use the 'types' module instead. """Append module search paths for third-party packages to sys.path. /usr/lib/pymodules/python2.6/feedparser.py:69: DeprecationWarning: the sgmllib module has been removed in Python 3.0 import sgmllib, re, sys, copy, urlparse, time, rfc822, types, cgi, urllib, urllib2 /usr/lib/pymodules/python2.6/feedparser.py:69: DeprecationWarning: in 3.x, rfc822 has been removed in favor of the email package import sgmllib, re, sys, copy, urlparse, time, rfc822, types, cgi, urllib, urllib2 $ python -3 nowarning.py --off /usr/lib/python2.6/site.py:1: DeprecationWarning: The 'new' module has been removed in Python 3.0; use the 'types' module instead. """Append module search paths for third-party packages to sys.path. $ python -V Python 2.6.4 Peter [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Why doesn't "filterwarnings" suppress this message?
Top