Merged revisions 68292,68344,68361,68378,68424,68426,68429-68430,68450,68457,68480-68481,68493,68495,68499,68501,68512,68514-68515 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68292 | skip.montanaro | 2009-01-04 11:36:58 +0100 (So, 04 Jan 2009) | 3 lines
If user configures --without-gcc give preference to $CC instead of blindly
assuming the compiler will be "cc".
........
r68344 | marc-andre.lemburg | 2009-01-05 20:43:35 +0100 (Mo, 05 Jan 2009) | 7 lines
Fix #4846 (Py_UNICODE_ISSPACE causes linker error) by moving the declaration
into the extern "C" section.
Add a few more comments and apply some minor edits to make the file contents
fit the original structure again.
........
r68361 | antoine.pitrou | 2009-01-06 19:34:08 +0100 (Di, 06 Jan 2009) | 3 lines
Use shutil.rmtree rather than os.rmdir.
........
r68378 | mark.dickinson | 2009-01-07 18:48:33 +0100 (Mi, 07 Jan 2009) | 2 lines
Issue #4869: clarify documentation for random.expovariate.
........
r68424 | benjamin.peterson | 2009-01-09 03:53:35 +0100 (Fr, 09 Jan 2009) | 1 line
specify what -3 warnings are about
........
r68426 | benjamin.peterson | 2009-01-09 04:03:05 +0100 (Fr, 09 Jan 2009) | 1 line
fix spelling
........
r68429 | benjamin.peterson | 2009-01-09 04:05:14 +0100 (Fr, 09 Jan 2009) | 1 line
add -3 to manpage
........
r68430 | benjamin.peterson | 2009-01-09 04:07:27 +0100 (Fr, 09 Jan 2009) | 1 line
be more specific in -3 option help
........
r68450 | jeffrey.yasskin | 2009-01-09 17:47:07 +0100 (Fr, 09 Jan 2009) | 3 lines
Fix issue 4884, preventing a crash in the socket code when python is compiled
with llvm-gcc and run with a glibc <2.10.
........
r68457 | kristjan.jonsson | 2009-01-09 21:10:59 +0100 (Fr, 09 Jan 2009) | 1 line
Issue 3677: Fix import from UNC paths on Windows.
........
r68480 | vinay.sajip | 2009-01-10 14:38:04 +0100 (Sa, 10 Jan 2009) | 1 line
Minor documentation changes cross-referencing NullHandler to the documentation on configuring logging in a library.
........
r68481 | vinay.sajip | 2009-01-10 14:42:04 +0100 (Sa, 10 Jan 2009) | 1 line
Corrected an incorrect self-reference.
........
r68493 | benjamin.peterson | 2009-01-10 18:18:55 +0100 (Sa, 10 Jan 2009) | 1 line
rewrite verbose conditionals
........
r68495 | benjamin.peterson | 2009-01-10 18:36:44 +0100 (Sa, 10 Jan 2009) | 1 line
tp_iter only exists with Py_TPFLAGS_HAVE_ITER #4901
........
r68499 | mark.dickinson | 2009-01-10 20:14:55 +0100 (Sa, 10 Jan 2009) | 2 lines
Remove an unnecessary check from test_decimal.
........
r68501 | vinay.sajip | 2009-01-10 20:22:57 +0100 (Sa, 10 Jan 2009) | 1 line
Corrected minor typo and added .currentmodule directives to fix missing cross-references.
........
r68512 | benjamin.peterson | 2009-01-10 23:42:10 +0100 (Sa, 10 Jan 2009) | 1 line
make tests fail if they can't be imported
........
r68514 | benjamin.peterson | 2009-01-11 00:41:59 +0100 (So, 11 Jan 2009) | 1 line
move seealso to a more appropiate place
........
r68515 | benjamin.peterson | 2009-01-11 00:49:08 +0100 (So, 11 Jan 2009) | 1 line
macos 9 isn't supported
........
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index 3e54422..cd1cbd2 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -121,7 +121,7 @@
messages at different log levels. This allows you to instrument your code with
debug messages, for example, but turning the log level down so that those debug
messages are not written for your production system. The default levels are
-``CRITICAL``, ``ERROR``, ``WARNING``, ``INFO``, ``DEBUG`` and ``UNSET``.
+``CRITICAL``, ``ERROR``, ``WARNING``, ``INFO``, ``DEBUG`` and ``NOTSET``.
The logger, handler, and log message call each specify a level. The log message
is only emitted if the handler and logger are configured to emit messages of
@@ -422,6 +422,8 @@
code approach, mainly separation of configuration and code and the ability of
noncoders to easily modify the logging properties.
+.. _library-config:
+
Configuring Logging for a Library
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -524,6 +526,8 @@
#. :class:`FileHandler` instances send error messages to disk files.
+.. currentmodule:: logging.handlers
+
#. :class:`BaseRotatingHandler` is the base class for handlers that rotate log
files at a certain point. It is not meant to be instantiated directly. Instead,
use :class:`RotatingFileHandler` or :class:`TimedRotatingFileHandler`.
@@ -553,7 +557,12 @@
#. :class:`HTTPHandler` instances send error messages to an HTTP server using
either ``GET`` or ``POST`` semantics.
-The :class:`NullHandler`, :class:`StreamHandler` and :class:`FileHandler`
+#. :class:`WatchedFileHandler` instances watch the file they are logging to. If
+the file changes, it is closed and reopened using the file name. This handler
+is only useful on Unix-like systems; Windows does not support the underlying
+mechanism used.
+
+The :class:`StreamHandler` and :class:`FileHandler`
classes are defined in the core logging package. The other handlers are
defined in a sub- module, :mod:`logging.handlers`. (There is also another
sub-module, :mod:`logging.config`, for configuration functionality.)
@@ -1601,6 +1610,9 @@
Outputs the record to the file.
+See :ref:`library-config` for more information on how to use
+:class:`NullHandler`.
+
WatchedFileHandler
^^^^^^^^^^^^^^^^^^
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index 858888c..63c4bc7 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -210,9 +210,11 @@
.. function:: expovariate(lambd)
- Exponential distribution. *lambd* is 1.0 divided by the desired mean. (The
- parameter would be called "lambda", but that is a reserved word in Python.)
- Returned values range from 0 to positive infinity.
+ Exponential distribution. *lambd* is 1.0 divided by the desired
+ mean. It should be nonzero. (The parameter would be called
+ "lambda", but that is a reserved word in Python.) Returned values
+ range from 0 to positive infinity if *lambd* is positive, and from
+ negative infinity to 0 if *lambd* is negative.
.. function:: gammavariate(alpha, beta)
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 1000694..afdf52c 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -566,6 +566,10 @@
.. versionchanged:: 2.3
Unicode strings are no longer ignored.
+ .. seealso::
+ Module :mod:`site` This describes how to use .pth files to extend
+ :data:`sys.path`.
+
.. data:: platform
@@ -583,7 +587,6 @@
Windows ``'win32'``
Windows/Cygwin ``'cygwin'``
Mac OS X ``'darwin'``
- Mac OS 9 ``'mac'``
OS/2 ``'os2'``
OS/2 EMX ``'os2emx'``
RiscOS ``'riscos'``
@@ -869,10 +872,3 @@
first three characters of :const:`version`. It is provided in the :mod:`sys`
module for informational purposes; modifying this value has no effect on the
registry keys used by Python. Availability: Windows.
-
-
-.. seealso::
-
- Module :mod:`site`
- This describes how to use .pth files to extend ``sys.path``.
-