A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-May/099976.html below:

[Python-Dev] What's New text on future maintenance

[Python-Dev] What's New text on future maintenanceNick Coghlan ncoghlan at gmail.com
Fri May 7 11:52:49 CEST 2010
Terry Reedy wrote:
> Then the warnings stuff
>>
>> * Because 2.7 will be running production applications, a policy
> 
> Every major version (xcept 3.0) has run production application, and 3.1
> may be and 3.2 certainly will be. So this reasoning is not clear to me.
> 
>>    decision was made to silence warnings only of interest to developers
>>    by default.
> 
> I believe this is meant to say "Warnings aimed only at those porting
> code to 3.x are silenced by default."

Actually, the decision was indeed to make all Deprecation Warnings
silent by default. The rationale was a bit different from what AMK
currently has though (otherwise we wouldn't have made the same change in
3.x). I'll take a stab at a more accurate rationale:

"""For previous releases, it has been the policy of the CPython core
developers that :exc:`DeprecationWarning` should be enabled by default.
This provides Python developers with a clear indication when their code
has a substantial risk of breaking in the next major version of Python.
However, the nature of Python usage has changed over the years, such
that there are now a significantly larger number of Python application
users that are not directly involved in the development of those
applications. This has lead to a situation where users may be receiving
irrelevant warnings from an application that is actually working
correctly, creating unnecessary concern for affected end users and
additional overhead for the developers of these applications in
responding to these concerns.

Accordingly, starting with Python 2.7, this policy has been revised and
the CPython interpreter has been updated to silence all occurrences of
:exc:`DeprecationWarning` by default. Developers wishing to see if their
application is at significant risk of breaking on the next major Python
release can re-enable display of :exc:`DeprecationWarning` messages by
running Python with the :option:`-Wdefault` (short form: :option:`-Wd`)
switch, or you can add ``warnings.simplefilter('default')`` to your
code. (Note that the 'default' in these settings refers to the default
warning behaviour of displaying warnings once for each location where
they are encountered rather than to the overall default warning settings
used by the interpreter)"""

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4