Rémy HUBSCHER <remy.hubsc...@ionyse.com> added the comment:

Hello, I did the patch, but I have no idea of how to make a test for it.

More over, I have seen a similar problem each time there is this code in the 
Python code (here in distutils.util.Distribution.get_command_class) :


            try:
                __import__ (module_name)
                module = sys.modules[module_name]
            except ImportError:
                continue

            try:
                klass = getattr(module, klass_name)
            except AttributeError:
                raise DistutilsModuleError(
                      "invalid command '%s' (no class '%s' in module '%s')"
                      % (command, klass_name, module_name))


Maybe it could be better to have a function in cpython to do that ?

----------
hgrepos: +59
keywords: +patch
Added file: http://bugs.python.org/file22962/packaging.util.resolve_name.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12703>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to