[Python-Dev] Deprecation warnings in Python 2.7 (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Wed Mar 3 11:35:33 CET 2010


Antoine Pitrou wrote:

Le Tue, 2 Mar 2010 17:28:11 -0800, Raymond Hettinger <raymond.hettinger at gmail.com> a écrit :

-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. That's my feeling too. I think introducing a Py3kDeprecationWarning subclass is the right thing to do.

Agreed for the reasons Raymond cited. As far as the subclass goes, I agree that's a good idea to allow people to readily detect whether they tripped over a normal deprecation or a Py3 only deprecation when running with -3 enabled.

As far as naming goes, I agree with Py3kDeprecationWarning since the flag to enable them is called sys.py3kwarning.

Cheers, Nick.

-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia



More information about the Python-Dev mailing list