[issue3313] (logging 0.5.0.5 + urllib3 + demandimport) error
Tomas Brambora
bugs at mercurial.selenic.com
Thu Mar 8 17:27:37 UTC 2012
New submission from Tomas Brambora <tomas.brambora at gmail.com>:
Hi,
1) logging 0.5.0.5 (which my Python 2.6 uses) does not have a NullHandler.
2) urllib3/__init__.py catches ImportError when trying to import NullHandler.
3) because of demandimport, ImportError is not raised and the faulty import
passes.
4) on line 45 urllib3/__init__.py does:
logging.getLogger(__name__).addHandler(NullHandler())
which raises a TypeError: <unloaded module 'NullHandler'> object is not
callable.
5) Mercurial aborts
I'm not sure how to fix that (except for disabling demandimport). Looks like
demandimport breaks modules that depend on catching ImportError.
All the best
Tomas
----------
messages: 19339
nosy: realyze
priority: bug
status: unread
title: (logging 0.5.0.5 + urllib3 + demandimport) error
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3313>
____________________________________________________
More information about the Mercurial-devel
mailing list