[Python-Dev] Choosing an official stance towards module deprecation in Python 3 (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Wed Sep 9 08:04:13 CEST 2015


On 9 September 2015 at 04:56, Brett Cannon <brett at python.org> wrote:

On Tue, 8 Sep 2015 at 11:36 Terry Reedy <tjreedy at udel.edu> wrote:

> The approaches to module deprecation I have seen are: > 1. Nothing changes to the deprecation process; you deprecate a module > and remove it in one to two releases > 2. Deprecate the module but with no plans for removal until Python 2.7 > reaches its EOL (I have been calling this Python 4)

For either 1 or 2, the 2.7 code should get a py3 warning. I think that's redundant. People who need to run in both Python 2 and 3 will see the warning under Python 3. I view Py3kWarning for things that would pass silently otherwise or have an odd error message under Python 3. In this case the message will be clear in Python 3 and thus not a problem.

I was going to make the same suggestion as Terry, but you're right, seeing the warning under 3.x will suffice in these cases.

So +1 for simple deprecation without removal until after 2.7 enters security fix only mode.

Cheers, Nick.

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



More information about the Python-Dev mailing list