This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author blep
Recipients blep
Date 2011-04-15.18:34:52
SpamBayes Score 2.8340885e-11
Marked as misclassified No
Message-id <1302892493.02.0.649799543417.issue11852@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-04-15 18:34:53blepsetrecipients: + blep
2011-04-15 18:34:53blepsetmessageid: <1302892493.02.0.649799543417.issue11852@psf.upfronthosting.co.za>
2011-04-15 18:34:52bleplinkissue11852 messages
2011-04-15 18:34:52blepcreate