[Python-Dev] Deprecation warnings in Python 2.7

Raymond Hettinger raymond.hettinger at gmail.com
Wed Mar 3 02:28:11 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. 

-1 for several reasons.  

1) We've advertised -3 as part of TheOneTrueWay(tm).  It's a core part of our transition story, so we should keep that as clean/consistent as possible.  Deprecating the -3 switch seems like shooting ourselves in the foot.

2) There is some chance that there will be a 2.8, so it isn't helpful to burn down our bridges.

ISTM, nothing is currently broken and in need of "fixing" in 2.7.
I don't see any advantage to conflating py3k warnings with other deprecations.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100302/98db9096/attachment.html>

More information about the Python-Dev mailing list