[New-bugs-announce] [issue16393] typo in pkgutil.py
Stefan Behnel
report at bugs.python.org
Sat Nov 3 14:20:21 CET 2012
New submission from Stefan Behnel:
My guess is that line 454 in pkgutil.py should pass "pkg_name" into the import_module() function, not "pkg". I get the following error when compiling it with Cython:
Error compiling Cython file:
------------------------------------------------------------
...
msg = "Relative module name {!r} not supported".format(fullname)
raise ImportError(msg)
if '.' in fullname:
# Get the containing package's __path__
pkg_name = fullname.rpartition(".")[0]
pkg = importlib.import_module(pkg)
^
------------------------------------------------------------
pkgutil.py:454:41: local variable 'pkg' referenced before assignment
----------
components: Library (Lib)
messages: 174615
nosy: scoder
priority: normal
severity: normal
status: open
title: typo in pkgutil.py
type: behavior
versions: Python 3.3, Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16393>
_______________________________________
More information about the New-bugs-announce
mailing list