"from logging import *" causes an error under Ubuntu Karmic

V

Valery

Hi all

is it a pure Ubuntu Karmic (beta) issue?..

$ python
Python 2.6.3 (r263:75183, Oct 3 2009, 11:20:50)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'NullHandler'

$ uname -a
Linux vaktop 2.6.31-11-generic #38-Ubuntu SMP Fri Oct 2 11:55:55 UTC
2009 i686 GNU/Linux
 
B

Benjamin Kaplan

I can confirm this in Python 2.6.3 for Windows and Mac while it
doesn't appear in Python 2.6.2 on Windows or the system Python 2.6.1
in Snow Leopard.

Looks like it's a Python problem, not Ubuntu's.
 
V

Vinay Sajip

Looks like it's a Python problem, not Ubuntu's.

That's correct, it's a Python problem. A fix has been checked in on
the release26-maint branch (which means that it should be available in
2.6.4) and a unit test added to catch this case in the future.

It was my goof, and I'm sorry for all the inconvenience caused. The
fix was to remove "captureWarnings" and "NullHandler" from __all__ in
logging/__init__.py, so you can patch your local installation if you
need to.

Regards,

Vinay Sajip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top