[issue5716] Overzealous deprecation of BaseException.message

Tres Seaver report at bugs.python.org
Tue Apr 7 14:07:06 CEST 2009


New submission from Tres Seaver <tseaver at agendaless.com>:

I'm working on cleaning up deprecations for Zope and related
packages under Python 2.6.  The irony here is that I'm receiving
deprecation warnings for custom exception classes  which had a 'message'
attribute long before the abortive attempt to add them to the
BaseException type, which hardly seems reasonable.

For instance, docutils.parsers.rst defines a DirectiveError which takes
two arguments, 'level' and 'message', and therefore gets hit with the
deprecation (even though it never used the new signature).  Likewise,
ZODB.POSException defines a ConflictError type which takes 'message' as
one of several arguments, all optional, and has since at least 2002.

I don't think either of these classes should be subject to a deprecation
warning for a feature they never used or depended on.

----------
components: Library (Lib)
messages: 85695
nosy: tseaver
severity: normal
status: open
title: Overzealous deprecation of BaseException.message
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5716>
_______________________________________


More information about the Python-bugs-list mailing list