New submission from Baptiste Lepilleur <b...@users.sourceforge.net>:
How to reproduce: >>> from logging.handlers import QueueListener >>> from multiprocessing import Queue >>> q = Queue(100) >>> l = QueueListener(q) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python32\lib\logging\handlers.py", line 1234, in __init__ self._stop = threading.Event() NameError: global name 'threading' is not defined And after adding the 'threading' import, you run into a second missing module: Traceback (most recent call last): File "C:\Python32\lib\threading.py", line 736, in _bootstrap_inner self.run() File "C:\Python32\lib\threading.py", line 689, in run self._target(*self._args, **self._kwargs) File "C:\Python32\lib\logging\handlers.py", line 1297, in _monitor except queue.Empty: NameError: global name 'queue' is not defined Solution: Adds import of 'threading' and 'queue' module in logging.handlers module. ---------- components: Library (Lib) messages: 133862 nosy: blep priority: normal severity: normal status: open title: New QueueListener is unusable due to threading and queue import type: behavior versions: Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11852> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com