Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Python 2.6: How to turn off cgitb.py's DeprecationWarning:BaseException.message has been deprecated

Reply
Thread Tools

Re: Python 2.6: How to turn off cgitb.py's DeprecationWarning:BaseException.message has been deprecated

 
 
Thomas Jollans
Guest
Posts: n/a
 
      09-24-2010
On Friday 24 September 2010, it occurred to http://www.velocityreviews.com/forums/(E-Mail Removed) to exclaim:
> Python 2.6: We're using the standard lib's cgitb module to
> provide diagnostic messages when unexpected exceptions occur.
>
> Unfortunately, this module raises a DeprecationWarning like below
> when it is used:
>
> C:\Python26\lib\cgitb.py:245: DeprecationWarning:
> BaseException.message has been
> deprecated as of Python 2.6
> value = pydoc.text.repr(getattr(evalue, name))
>
> Is there some way to disable this specific warning message (our
> customers find it disconcerting) or do we have to go in and edit
> the cgitb.py module itself? Also, wondering if this warning has
> been addressed in Python 2.7/3.x?


Yes. Filtering is an important part of the Python warnings framework:

http://docs.python.org/library/warni...filterwarnings
http://www.python.org/dev/peps/pep-0230/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
warning: [deprecation] in java.util.Date(java.lang.String) has been deprecated BoBi Java 3 12-15-2006 04:51 AM
The printing has been stopped and this job has been add to the queu? dejola Computer Support 6 12-30-2005 03:26 AM
Why "gets" has not been deprecated yet? Marcus C++ 32 11-05-2005 02:06 AM
Deprecated warnings within deprecated code Barney Barumba Java 0 07-23-2003 12:46 AM



Advertisments