Should work under Python versions >= 1.5.2, except that source line
information is not available unless 'sys._getframe()' is.
-Copyright (C) 2001-2008 Vinay Sajip. All Rights Reserved.
+Copyright (C) 2001-2009 Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
"""
__author__ = "Vinay Sajip <vinay_sajip@red-dove.com>"
__status__ = "production"
__version__ = "0.5.0.5"
-__date__ = "24 January 2008"
+__date__ = "20 January 2009"
#---------------------------------------------------------------------------
# Miscellaneous module data
if strm is None:
strm = sys.stderr
self.stream = strm
- self.formatter = None
def flush(self):
"""
self.mode = mode
self.encoding = encoding
if delay:
+ #We don't open the stream, but we still need to call the
+ #Handler constructor to set level, formatter, lock etc.
+ Handler.__init__(self)
self.stream = None
else:
- stream = self._open()
- StreamHandler.__init__(self, stream)
+ StreamHandler.__init__(self, self._open())
def close(self):
"""
constructor, open it before calling the superclass's emit.
"""
if self.stream is None:
- stream = self._open()
- StreamHandler.__init__(self, stream)
+ self.stream = self._open()
StreamHandler.emit(self, record)
#---------------------------------------------------------------------------
Core and Builtins
-----------------
+- Issue #5013: Fixed a bug in FileHandler which occurred when the delay
+ parameter was set.
+
- Issue #4935: The overflow checking code in the expandtabs() method common
to str, bytes and bytearray could be optimized away by the compiler, letting
the interpreter segfault instead of raising an error.
- Issue #4589: Fixed exception handling when the __exit__ function of a
context manager returns a value that cannot be converted to a bool.
-- Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()``
+- Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()``
method on file objects with closefd=False. The file descriptor is still
kept open but the file object behaves like a closed file. The ``FileIO``
object also got a new readonly attribute ``closefd``.
- Restore Python 2.3 compatibility for decimal.py.
-- Issue #1702551: distutils sdist was not excluding VCS directories under
+- Issue #1702551: distutils sdist was not excluding VCS directories under
Windows. Inital solution by Guy Dalberto.
- Issue #4812: add missing underscore prefix to some internal-use-only
- Issue #4795: inspect.isgeneratorfunction() returns False instead of None when
the function is not a generator.
-- Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case
- no MSVC compiler is found under Windows. Original patch by Philip Jenvey.
+- Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case
+ no MSVC compiler is found under Windows. Original patch by Philip Jenvey.
- Issue #4739: Add pydoc help topics for symbols, so that e.g. help('@')
works as expected in the interactive environment.
- Issue #4756: zipfile.is_zipfile() now supports file-like objects. Patch by
Gabriel Genellina.
-- Issue #4646: distutils was choking on empty options arg in the setup
+- Issue #4646: distutils was choking on empty options arg in the setup
function. Original patch by Thomas Heller.
- Issue #4400: .pypirc default generated file was broken in distutils.