[Python-apps-team] Bug#476885: mercurial-common: failing import in server.py breaks python help facility even when not using hgext

Sami Liedes sliedes at cc.hut.fi
Sat Apr 19 21:43:11 UTC 2008


Package: mercurial-common
Version: 1.0-4
Severity: important

Makes (relatively) related software break, but isn't big enough issue
to be critical/grave IMO, so filing as important. Please adjust
severity as you see fit.

This is what happens if I try to use the python help facility to list
modules when mercurial-common is installed:

------------------------------------------------------------
$ python
Python 2.5.2 (r252:60911, Apr 16 2008, 23:58:07)
[GCC 4.2.3 (Debian 4.2.3-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help()

Welcome to Python 2.5!  This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://www.python.org/doc/tut/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules.  To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics".  Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given word
such as "spam", type "modules spam".

help> modules

Please wait a moment while I gather a list of all available modules...

/usr/lib/python2.5/site-packages/apt/__init__.py:18: FutureWarning: apt API not stable yet
  warnings.warn("apt API not stable yet", FutureWarning)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site.py", line 342, in __call__
    return pydoc.help(*args, **kwds)
  File "/usr/lib/python2.5/pydoc.py", line 1649, in __call__
    self.interact()
  File "/usr/lib/python2.5/pydoc.py", line 1667, in interact
    self.help(request)
  File "/usr/lib/python2.5/pydoc.py", line 1683, in help
    elif request == 'modules': self.listmodules()
  File "/usr/lib/python2.5/pydoc.py", line 1804, in listmodules
    ModuleScanner().run(callback)
  File "/usr/lib/python2.5/pydoc.py", line 1855, in run
    for importer, modname, ispkg in pkgutil.walk_packages():
  File "/usr/lib/python2.5/pkgutil.py", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
  File "/usr/lib/python2.5/pkgutil.py", line 110, in walk_packages
    __import__(name)
  File "/var/lib/python-support/python2.5/hgext/inotify/__init__.py", line 16, in <module>
    import client, errno, os, server, socket
  File "/var/lib/python-support/python2.5/hgext/inotify/server.py", line 15, in <module>
    import hgext.inotify.linux as inotify
AttributeError: 'module' object has no attribute 'inotify'
>>>
------------------------------------------------------------

Obviously something should be done to prevent hgext from breaking the
Python help facility.

	Sami


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.25-rc8 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mercurial-common depends on:
ii  python                        2.5.2-1    An interactive high-level object-o
ii  python-support                0.7.7      automated rebuilding support for P

Versions of packages mercurial-common recommends:
ii  mercurial                     1.0-4      Scalable distributed version contr

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/python-apps-team/attachments/20080420/f2594d8b/attachment.pgp 


More information about the Python-apps-team mailing list