classification
Title: logging module's __all__ attribute not in sync with documentation
Type: behavior Stage: needs patch
Components: Library (Lib) Versions: Python 3.0, Python 3.1, Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: flub, r.david.murray, rhettinger, vinay.sajip
Priority: normal Keywords: easy

Created on 2009-04-27 10:49 by flub, last changed 2009-04-27 13:56 by vinay.sajip. This issue is now closed.

Messages (3)
msg86653 - (view) Author: Floris Bruynooghe (flub) Date: 2009-04-27 10:49
The logging module in Python 2.6 has started to use the __all__ method.
 However it does not list all the symbols that are described in the
documentation.  Most notably the getLogger function is not in the
__all__ list, but there are others like addLevelName, getLoggerClass,
setLoggerClass, ...

This does break code that does "from logging import *" which suddenly
can't use getLogger etc anymore.
msg86655 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-04-27 11:21
The addition of __all__ was made by raymond.hettinger in r60851. 'from
xxx import *' is not a recommended style, but irregardless of that
__all__ certainly should list all of the public APIs.
msg86663 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2009-04-27 13:56
Fix checked in to trunk, release26-maint and py3k.
History
Date User Action Args
2009-04-27 13:56:09vinay.sajipsetstatus: open -> closed
resolution: fixed
messages: + msg86663
2009-04-27 11:51:24benjamin.petersonsetassignee: vinay.sajip

nosy: + vinay.sajip
2009-04-27 11:21:04r.david.murraysetpriority: normal

versions: + Python 3.0, Python 3.1, Python 2.7
keywords: + easy
nosy: + rhettinger, r.david.murray

messages: + msg86655
stage: needs patch
2009-04-27 10:49:17flubcreate