[Python-Dev] API deprecations in Python 3, from a Python 2 perspective

Raymond Hettinger raymond.hettinger at gmail.com
Thu Mar 17 21:07:58 CET 2011


On Mar 17, 2011, at 12:22 PM, Eric Smith wrote:

> On 03/17/2011 03:08 PM, Jesus Cea wrote:
>> I would suggest to keep deprecating things in 3.x, BUT keeping the
>> deprecated stuff around (maybe reimplementing them using the new stuff)
>> until we decide is safe to axe it, instead of the regular 3.x
>> deprecates, 3.(x+1) cleans up.
> 
> At some point, didn't we say PendingDeprecationWarning in version x, DeprecationWarning in x+1, and removal in x+2? That's what I've been doing, but it's not what PEP 5 says.
> 
> Removing in x+2 would lengthen the timeframe, although I agree with Guido that we should be extra careful for the next several years because of people moving directory from 2.7 to (say) 3.5.

Agreeing with Guido is always a good move :-)

In addition, any new deprecations in Py3.x can be marked with py3k warnings in Py2.7 point releases.  That would give users the maximum chance to make updates before porting, even if they wait five years to migrate to Py3.x.


Raymond


More information about the Python-Dev mailing list