[issue1816] bugzilla : TypeError: '_demandmod' object is not iterable' in hgext.bugzilla.hook

Yannick Jost mercurial-bugs at selenic.com
Thu Aug 27 11:30:34 CDT 2009


New submission from Yannick Jost <yannick at yjost.com>:

Mercurial 1.3.1
Python 2.5
Platform : Linux
MySQL : 3.23.49
MySQLdb : 1.2.2


Traceback (most recent call last):
  File
"/usr/local/lib/python2.5/site-packages/mercurial-1.3.1-py2.5-linux-i686.egg/hgext/bugzilla.py",
line 406, in hook
    import MySQLdb as mysql
  File
"/usr/local/lib/python2.5/site-packages/mercurial-1.3.1-py2.5-linux-i686.egg/mercurial/demandimport.py",
line 84, in _demandimport
    return _origimport(name, globals, locals, fromlist)
  File "build/bdist.linux-i686/egg/MySQLdb/__init__.py", line 21, in <module>
  File
"/usr/local/lib/python2.5/site-packages/mercurial-1.3.1-py2.5-linux-i686.egg/mercurial/demandimport.py",
line 75, in __getattribute__
    self._load()
  File
"/usr/local/lib/python2.5/site-packages/mercurial-1.3.1-py2.5-linux-i686.egg/mercurial/demandimport.py",
line 47, in _load
    mod = _origimport(head, globals, locals)
  File "build/bdist.linux-i686/egg/_mysql.py", line 7, in <module>
  File "build/bdist.linux-i686/egg/_mysql.py", line 3, in __bootstrap__
  File
"/usr/local/lib/python2.5/site-packages/mercurial-1.3.1-py2.5-linux-i686.egg/mercurial/demandimport.py",
line 84, in _demandimport
    return _origimport(name, globals, locals, fromlist)
  File
"/usr/local/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/pkg_resources.py",
line 2561, in <module>
  File
"/usr/local/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/pkg_resources.py",
line 626, in require
  File
"/usr/local/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/pkg_resources.py",
line 505, in resolve
  File
"/usr/local/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/pkg_resources.py",
line 2379, in parse_requirements
  File
"/usr/local/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/pkg_resources.py",
line 1814, in yield_lines
  File
"/usr/local/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg/pkg_resources.py",
line 1813, in yield_lines
TypeError: '_demandmod' object is not iterable

A workaround is to put :
from mercurial import demandimport; demandimport.disable()

before the line
import MySQLdb as mysql

I've tried to put

from mercurial import demandimport; demandimport.ignore.extend(['MySQLdb'])

but it doesn't seem to work

----------
messages: 10434
nosy: yanjost
priority: bug
status: unread
title: bugzilla : TypeError: '_demandmod' object is not iterable' in hgext.bugzilla.hook

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://mercurial.selenic.com/bts/issue1816>
____________________________________________________



More information about the Mercurial-devel mailing list