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

python at bdurham.com python at bdurham.com
Thu Sep 23 20:31:05 EDT 2010


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?

Thank you,
Malcolm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100923/5187d458/attachment.html>


More information about the Python-list mailing list