[issue14710] pkgutil.get_loader is broken

2014-05-19 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue14710] pkgutil.get_loader is broken

2014-05-19 Thread Brett Cannon
Brett Cannon added the comment: I'll take a look the next time I have some Python time (in a week or two) and make sure this gets dealt with. -- assignee: -> brett.cannon ___ Python tracker __

[issue14710] pkgutil.get_loader is broken

2014-05-19 Thread Pavel Aslanov
Pavel Aslanov added the comment: This function is broken again in version 3.4 The way it should look is: Python 2.7.6 (default, Feb 26 2014, 12:07:17) [GCC 4.8.2 20140206 (prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pkgutil >>> pkguti

[issue14710] pkgutil.get_loader is broken

2014-03-29 Thread Nick Coghlan
Nick Coghlan added the comment: Update as of Python 3.4: pkgutil.get_loader() still throws AttributeError for this case, but importlib.util.find_spec() returns None as expected. -- versions: +Python 3.4, Python 3.5 ___ Python tracker

[issue14710] pkgutil.get_loader is broken

2012-05-04 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14710] pkgutil.get_loader is broken

2012-05-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14710] pkgutil.get_loader is broken

2012-05-03 Thread Nick Coghlan
Nick Coghlan added the comment: I'm not yet sure the proposed fix in the patch is the right approach (I need to look at the surrounding code), but I believe Pavel's right that get_loader() should be returning None in this case instead of throwing an exception. --

[issue14710] pkgutil.get_loader is broken

2012-05-03 Thread Pavel Aslanov
Pavel Aslanov added the comment: Main use case of pkgutil.get_loader is to determine if its possible to load module and either return loader or None. But it throws exception more over it is AttributeErrror exception. -- ___ Python tracker

[issue14710] pkgutil.get_loader is broken

2012-05-03 Thread Brett Cannon
Brett Cannon added the comment: So I'm no pkgutil expert, but at least in the case of None in sys.modules, that triggers at least an ImportError in __import__ if that is come across. -- ___ Python tracker ___

[issue14710] pkgutil.get_loader is broken

2012-05-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brett.cannon, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue14710] pkgutil.get_loader is broken

2012-05-03 Thread Pavel Aslanov
New submission from Pavel Aslanov : 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.functo