[Python-checkins] cpython: Add Misc/NEWS entry and relevant doc change for issue 10271.
brett.cannon
python-checkins at python.org
Mon Jul 18 04:25:59 CEST 2011
http://hg.python.org/cpython/rev/eaefb34fc3a1
changeset: 71401:eaefb34fc3a1
user: Brett Cannon <brett at python.org>
date: Sun Jul 17 19:25:50 2011 -0700
summary:
Add Misc/NEWS entry and relevant doc change for issue 10271.
files:
Doc/library/warnings.rst | 3 +--
Misc/NEWS | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst
--- a/Doc/library/warnings.rst
+++ b/Doc/library/warnings.rst
@@ -339,8 +339,7 @@
Write a warning to a file. The default implementation calls
``formatwarning(message, category, filename, lineno, line)`` and writes the
resulting string to *file*, which defaults to ``sys.stderr``. You may replace
- this function with an alternative implementation by assigning to
- ``warnings.showwarning``.
+ this function with any callable by assigning to ``warnings.showwarning``.
*line* is a line of source code to be included in the warning
message; if *line* is not supplied, :func:`showwarning` will
try to read the line specified by *filename* and *lineno*.
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,8 @@
Core and Builtins
-----------------
+- Issue #10271: Allow warnings.showwarning() be any callable.
+
- Issue #11627: Fix segfault when __new__ on a exception returns a non-exception
class.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list