[Python-Dev] Deprecation warnings in Python 2.7

Brett Cannon brett at python.org
Wed Mar 3 01:51:37 CET 2010


On Tue, Mar 2, 2010 at 15:55, Florent Xicluna <florent.xicluna at gmail.com>wrote:

> Hello,
>
> I would like to open a discussion on the meaning of deprecation warnings in
> 2.7.
> I assume, but I may be wrong, that 2.7 will be the last version in the 2.x
> branch.  With this assumption, we should not find many things deprecated in
> 2.7
> final.
>
> On the other hand, the list of py3k deprecation warnings is increasing a
> lot.
> And more users will probably start to move from 2.7 to the 3.1 release.
>
> While working on ticket #7092 and #7849, we started to discuss some
> proposals
> to simplify the deprecation warnings for 2.7.
>
> We discussed these 2 proposals:
>
>  1) in 2.6 there's no distinction between py3k and normal deprecations:
> they
>    share the same category, DeprecationWarning.  The "-3" switch enables
> the
>    py3k DeprecationWarning and SyntaxWarning.
>    Do we need to introduce a subclass Py3kDeprecationWarning in 2.7?  It
> will
>    make it easier to separate both kinds of deprecations (2.x and 3.x), and
>    to filter them.
>
>  2) a different idea is to deprecate the "-3" switch and consider all py3k
>    deprecations as normal deprecations.  They will be hidden by default
>    thanks to #7309.  Since there's no future for the 2.x branch, it seems
>    normal to consider the migration from 2.7 to 3.1 and show these warnings
>    when the developer uses "-Wd" switch.
>
> What do you expect as DeprecationWarning in 2.7?
>

I like option 2; we are serious about trying to make 2.7 the last in the 2.x
series, which means if you care about deprecations then you are caring about
Python 3. So I say make -3 the equivalent of -Wd in Python 2.7

-Brett



>
> I will post a list of the DeprecationWarnings in the python trunk, in a
> followup message, for a review, and to help the discussion.
>
> Best regards,
>
> --
> Florent Xicluna
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/brett%40python.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100302/6a6a4370/attachment-0001.html>


More information about the Python-Dev mailing list