[issue12703] Improve error reporting for packaging.util.resolve_name

2014-03-12 Thread Éric Araujo
Éric Araujo added the comment: This is now obsolete. For a discussion about moving resolve_name to another part of the stdlib, see #12915. -- resolution: - out of date stage: patch review - committed/rejected status: open - closed ___ Python

[issue12703] Improve error reporting for packaging.util.resolve_name

2012-11-12 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12703 ___ ___ Python-bugs-list

[issue12703] Improve error reporting for packaging.util.resolve_name

2012-07-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: http://bugs.python.org/file25773/resolve_name.patch is a patch that cleans up the function; I’ll see if it can be used to solve our problems without having to follow my drastic find_object idea. --

[issue12703] Improve error reporting for packaging.util.resolve_name

2012-07-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: BTW modules in the standard library all use the dotted notation AFAIK, not the colon notation, so I would strongly prefer avoiding the colon notation. -- ___ Python tracker rep...@bugs.python.org

[issue12703] Improve error reporting for packaging.util.resolve_name

2012-02-08 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: FYI, here is code that can handle arbitrary dotted names: http://svn.eby-sarna.com/Importing/peak/util/imports.py?view=markup. I haven’t checked if its error reporting has the problem we’re discussing in this report. An alternative would be

[issue12703] Improve error reporting for packaging.util.resolve_name

2012-02-06 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: In the absence of feedback, I’m going to apply my find_object idea as described in my previous message. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12703

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-11-20 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I’ve found a way to make sure error messages always bubble up *and* clean up the ugly code in resolve_name, but it’s a rather drastic one. The idea is to restrict the function to work only with names defined at the module level, not

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-10-19 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I have added tests and fixed one or two bugs in 1405df4a1535. I have another patch that checks that error messages are useful, with one exception: if you try to import a.b and b raises an ImportError, then the calling code will see an

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-10-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks. I’ll add more tests and commit. (I also prefer to create modules in test methods instead of using another file, so that I can see right here what the module contains.) -- ___ Python tracker

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-10-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I would like to commit this. Tests are needed. Does someone want to write them? Please ask any question you might have, we’re here to help :) -- stage: needs patch - test needed versions: +3rd party

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-10-17 Thread Rémy HUBSCHER
Rémy HUBSCHER remy.hubsc...@ionyse.com added the comment: Ok, I am working on it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12703 ___ ___

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-10-17 Thread Rémy HUBSCHER
Rémy HUBSCHER remy.hubsc...@ionyse.com added the comment: Here is the patch for the test case. -- hgrepos: +84 Added file: http://bugs.python.org/file23428/test_util.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12703

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-08-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I’m confused about what the proposed change would actually do. Could you explain what behavior you want to change and how? -- ___ Python tracker rep...@bugs.python.org

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-08-21 Thread Rémy HUBSCHER
Rémy HUBSCHER remy.hubsc...@ionyse.com added the comment: It is exactly what explained Alexis. The __import__ can failed in two case : - The module doesn't exist - There is a error in the module With the previous behaviour, even if the module exist, the message was that it doesn't exists.

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-08-20 Thread Rémy HUBSCHER
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) :

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-08-20 Thread Rémy HUBSCHER
Rémy HUBSCHER remy.hubsc...@ionyse.com added the comment: Actually it is not the same problem for `distutils.util.Distribution.get_command_class` my mistake. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12703

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-08-20 Thread Alexis Metaireau
Alexis Metaireau ale...@notmyidea.org added the comment: Thanks Rémy, About testing, I would go for modules with errors in it and check that when imported trough this function it does what it is supposed to do. IOW: 1. Create a test python module with errors in their definition (Throw an

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-08-19 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12703 ___ ___ Python-bugs-list mailing

[issue12703] Improve error reporting for packaging.util.resolve_name

2011-08-06 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. Would you have time to make a code+test patch for the CPython repo? distutils2 has moved there under the name packaging. -- assignee: tarek - eric.araujo stage: - needs patch title: Loading a module - Improve