[New-bugs-announce] [issue14710] pkgutil.get_loader is broken

Pavel Aslanov report at bugs.python.org
Thu May 3 12:45:41 CEST 2012


New submission from Pavel Aslanov <asl.pavel at gmail.com>:

if module was marked as not existing by setting sys.modules [fullname] to None, then pkgutil.get_loader (fullname) will throw AttributeError.

Example:
#! /usr/bin/evn python
import unittest
import pkgutil

def main ():
    pkgutil.get_loader ('unittest.functools')

if __name__ == '__main__':
    main ()

Patch is attached

----------
components: Library (Lib)
files: python_pkgutil_bug.patch
keywords: patch
messages: 159848
nosy: Pavel.Aslanov
priority: normal
severity: normal
status: open
title: pkgutil.get_loader is broken
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file25442/python_pkgutil_bug.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14710>
_______________________________________


More information about the New-bugs-announce mailing list