[Python-Dev] Removing PendingDeprecationWarning (original) (raw)
Brett Cannon brett at python.org
Fri Mar 22 13:25:46 EDT 2019
- Previous message (by thread): [Python-Dev] Removing PendingDeprecationWarning
- Next message (by thread): [Python-Dev] Removing PendingDeprecationWarning
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>
- Previous message (by thread): [Python-Dev] Removing PendingDeprecationWarning
- Next message (by thread): [Python-Dev] Removing PendingDeprecationWarning
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]