New submission from Pavel Aslanov <[email protected]>:
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 <[email protected]>
<http://bugs.python.org/issue14710>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com