On Fri, Mar 22, 2019 at 12:41 AM Victor Stinner <vstinner@redhat.com> wrote:

I agree to make PendingDeprecationWarning an alias to
DeprecationWarning. I never liked "PendingDeprecationWarning" name,
it's way too long to type :-D

Le ven. 22 mars 2019 à 03:45, Inada Naoki <songofacandy@gmail.com> a écrit :
> I want to stop using PendingDeprecationWarning for new deprecation.

I'm fine with that.

> More aggressively, I want to remove PendingDeprecationWarning class,
> and `PendingDeprecationWarning = DeprecationWarning` for backward
> compatibility.

I'm not sure that I understand well. Do you want to remove the
PendingDeprecationWarning builtin symbol, or just make it an alias to

I'm fine with "PendingDeprecationWarning = DeprecationWarning".

We can't do that as it will break code. Think of code which is having warnings raise exceptions and that are purposefully catching PendingDeprecationWarning but not DeprecationWarning; this change would break that. These classes are part of the public API of the warnings module and so we shouldn't change semantics like that for people who have a specific use for those two different classes regardless of how the stdlib may choose to use them.

IMHO your email title is misleading. You don't want to *remove*
PendingDeprecationWarning, you only want to make it an alias to
DeprecationWarning, right? In term of backward compatibility, it's
very different :-)

If you want to remove PendingDeprecationWarning that's a discussion we can obviously have (which I disagree with as shown in the discuss.python.org  discussion), but I think aliasing is a non-starter.