[Python-Dev] PEP 3003 - Python Language Moratorium

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Fri Nov 6 15:04:12 CET 2009


On 01:50 pm, dripton at ripton.net wrote:
>On 2009.11.06 08:25:29 +0100, Hagen Fürstenau wrote:
>> >> A switch to enable deprecation warnings  would give developers a
>> >> chance to see them when migrating to a new version of python.  And 
>>it
>> >> would prevent users from having to deal with them.
>> >
>> > PendingDeprecationWarning is silent by default and requires a switch 
>>to
>> > be enabled.
>>
>>So what we need is perhaps not a stdlib moratorium, but rather strict
>>adherence to a sequence of PendingDeprecationWarning ->
>>DeprecationWarning -> Removal? (The first one seems to have been
>>underused so far.)
>
>+1
>
>I really don't like the loud warnings for sha and md5 in 2.6,
>considering that hashlib wasn't even added until 2.5.  It should be
>possible to write code that works across all the versions of Python 2
>that are currently shipping with mainstream Linux distrobutions without
>deprecation warnings or conditional version-dependent code.
>
>To go a step further, maybe follow javac's example and emit just one
>summary deprecation warning per program by default.  Something
>like "this program uses deprecated API calls.  Run it with
>python -deprecation to see the details."

End users don't even need to be told this much, though (and if it's 
javac that does this for Java, then indeed Java end users probably 
aren't seeing this either).  I think it would be great for deprecation 
warnings to be completely silent for a while *and* for the policy to be 
prominently documented so that developers, the people who really need 
this information, know how to get it.

Jean-Paul


More information about the Python-Dev mailing list