Package: python-epydoc
Version: 3.0~beta1-1
Severity: minor

A python file can import a module whose name contains a "-" (dash), using
the __import__ builtin function (just doing a normal import fails, as 
identifiers cannot contain dashes):

DebTorrentClient = __import__('debtorrent-client', globals(), locals(), [])

Running epydoc on a file with an import like this generates this error:

UNEXPECTED ERROR:
Bad identifier 'debtorrent-client'

Running in debug mode gets this stack trace:

  [Traceback (most recent call last):
  File "/usr/bin/epydoc", line 13, in ?
    cli()
  File "/var/lib/python-support/python2.4/epydoc/cli.py", line 946, in cli
    main(options, names)
  File "/var/lib/python-support/python2.4/epydoc/cli.py", line 738, in main
    exclude_parse=exclude_parse)
  File "/var/lib/python-support/python2.4/epydoc/docbuilder.py", line 205, in 
build_doc_index
    doc_pairs = _get_docs_from_items(items, options)
  File "/var/lib/python-support/python2.4/epydoc/docbuilder.py", line 333, in 
_get_docs_from_items
    doc_pairs.append(_get_docs_from_module_file(
  File "/var/lib/python-support/python2.4/epydoc/docbuilder.py", line 525, in 
_get_docs_from_module_file
    introspect_doc = introspect_docs(
  File "/var/lib/python-support/python2.4/epydoc/docintrospecter.py", line 127, 
in introspect_docs
    introspect_func(value, val_doc, module_name=module_name)
  File "/var/lib/python-support/python2.4/epydoc/docintrospecter.py", line 267, 
in introspect_module
    container = get_containing_module(child)
  File "/var/lib/python-support/python2.4/epydoc/docintrospecter.py", line 672, 
in get_containing_module
    return DottedName(value.__name__)
  File "/var/lib/python-support/python2.4/epydoc/apidoc.py", line 117, in 
__init__
    raise DottedName.InvalidDottedName(
epydoc.apidoc.InvalidDottedName: Bad identifier 'debtorrent-client'


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

Kernel: Linux 2.6.18-4-vserver-amd64 (SMP w/1 CPU core)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-epydoc depends on:
ii  python                        2.4.4-6    An interactive high-level object-o
ii  python-support                0.6.3      automated rebuilding support for p

Versions of packages python-epydoc recommends:
ii  graphviz                      2.8-2.6    rich set of graph drawing tools
ii  gs-common                     0.3.11     Common files for different Ghostsc
ii  python-tk                     2.4.4-1    Tkinter - Writing Tk applications 
ii  texlive-fonts-recommended     2007-4     TeX Live: Recommended fonts
ii  texlive-latex-base            2007-4     TeX Live: Basic LaTeX packages
ii  texlive-latex-extra           2007-3     TeX Live: LaTeX supplementary pack
ii  texlive-latex-recommended     2007-4     TeX Live: LaTeX recommended packag

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to