Vinay Sajip <vinay_sa...@yahoo.co.uk> added the comment:

Okay, the problem occurs because builtin functions and Python functions are 
handled differently. This is how you need to set a Python importer:

vinay@eta-natty:~$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging.config
>>> BC = logging.config.BaseConfigurator
>>> from importlib import import_module
>>> class CC(BC):
...     importer = staticmethod(import_module)
... 
>>> CC.importer
<function import_module at 0xb746db54>
>>> CC.importer('pickle')
<module 'pickle' from '/usr/lib/python2.7/pickle.pyc'>
>>> CC({}).importer('pickle')
<module 'pickle' from '/usr/lib/python2.7/pickle.pyc'>

I will update the documentation to indicate this, but I don't think a change to 
logging.config is needed.

----------
status: open -> pending

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12718>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to