A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2019-March/156834.html below:

[Python-Dev] Removing PendingDeprecationWarning

[Python-Dev] Removing PendingDeprecationWarningBrett Cannon brett at python.org
Fri Mar 22 13:25:46 EDT 2019
On Fri, Mar 22, 2019 at 12:41 AM Victor Stinner <vstinner at redhat.com> wrote:

> Hi,
>
> 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 at 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
> DeprecationWarning.
>
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20190322/cfb3d616/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4