[Python-Dev] Pre-PEP: Exception Reorganization for Python 3.0

Josiah Carlson jcarlson at uci.edu
Sun Jul 31 04:25:06 CEST 2005


Brett Cannon <bcannon at gmail.com> wrote:
> 
> On 7/30/05, Josiah Carlson <jcarlson at uci.edu> wrote:
> > 
> > Brett Cannon <bcannon at gmail.com> wrote:
> > 
> > > > +-- Warning
> > > >      +-- DeprecationWarning
> > > >      +-- FutureWarning
> > > >      +-- PendingDeprecationWarning
> > >
> > > Don't like the idea of having DeprecationWarning inherit from
> > > PendingDeprecationWarning?
> > 
> > Not all DeprecationWarnings are Pending, but all
> > PendingDeprecationWarnings are DeprecationWarnings.
> > 
> 
> See, I don't agree with that logic.  DeprecationWarning means
> something has been deprecated, while PendingDeprecationWarning means
> something will be deprecated in the future.  I am say that the for
> DeprecationWarning, the future is now and thus is a
> PendingDeprecationWarning as well.
> 
> It also just makes sense from the standpoint of catching warnings.  If
> you care about catching PendingDeprecationWarning you are going to
> care about catching a DeprecationWarning since if you are worrying
> about the less severe version you are definitely going to care about
> the most severe case.

Well, I would also disagree with your logic.  I would mask the pending
deprecations because they are still pending, but when they are actually
deprecated, I would like to know about it, hence wouldn't mask it.  By
having DeprecationWarning inherit from PendingDeprecationWarning as you
suggest, I would not have the ability to do so, and neither would anyone
else.

Because there are two different ways of seeing it, and neither of us is
likely to convince the other, perhaps it is better for the fate of of
this conversation that they aren't inheriting from one or the other, and
people can be explicit about what kinds of deprecations they want to
mask.

 - Josiah



More information about the Python-Dev mailing list