<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 22, 2019 at 12:41 AM Victor Stinner <<a href="mailto:vstinner@redhat.com">vstinner@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I agree to make PendingDeprecationWarning an alias to<br>
DeprecationWarning. I never liked "PendingDeprecationWarning" name,<br>
it's way too long to type :-D<br>
<br>
Le ven. 22 mars 2019 à 03:45, Inada Naoki <<a href="mailto:songofacandy@gmail.com" target="_blank">songofacandy@gmail.com</a>> a écrit :<br>
> I want to stop using PendingDeprecationWarning for new deprecation.<br>
<br>
I'm fine with that.<br>
<br>
> More aggressively, I want to remove PendingDeprecationWarning class,<br>
> and `PendingDeprecationWarning = DeprecationWarning` for backward<br>
> compatibility.<br>
<br>
I'm not sure that I understand well. Do you want to remove the<br>
PendingDeprecationWarning builtin symbol, or just make it an alias to<br>
DeprecationWarning.<br>
<br>
I'm fine with "PendingDeprecationWarning = DeprecationWarning".<br></blockquote><div><br></div><div>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.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
IMHO your email title is misleading. You don't want to *remove*<br>
PendingDeprecationWarning, you only want to make it an alias to<br>
DeprecationWarning, right? In term of backward compatibility, it's<br>
very different :-)<br></blockquote><div><br></div><div>If you want to remove PendingDeprecationWarning that's a discussion we can obviously have (which I disagree with as shown in the <a href="http://discuss.python.org">discuss.python.org</a>  discussion), but I think aliasing is a non-starter.<br></div></div></div>