changeset: 102357:22eaf6158e7b branch: 3.5 parent: 102354:db5a5679a9de user: Brett Cannon date: Fri Jul 15 10:58:54 2016 -0700 files: Lib/imp.py Misc/ACKS Misc/NEWS description: Issue #26844: Fix imp.find_module() to have the exception related to type issues be about 'path' instead of 'name'. Thanks to Lev Maximov for the patch. diff -r db5a5679a9de -r 22eaf6158e7b Lib/imp.py --- a/Lib/imp.py Fri Jul 15 16:12:39 2016 +0300 +++ b/Lib/imp.py Fri Jul 15 10:58:54 2016 -0700 @@ -266,8 +266,8 @@ raise TypeError("'name' must be a str, not {}".format(type(name))) elif not isinstance(path, (type(None), list)): # Backwards-compatibility - raise RuntimeError("'list' must be None or a list, " - "not {}".format(type(name))) + raise RuntimeError("'path' must be None or a list, " + "not {}".format(type(path))) if path is None: if is_builtin(name): diff -r db5a5679a9de -r 22eaf6158e7b Misc/ACKS --- a/Misc/ACKS Fri Jul 15 16:12:39 2016 +0300 +++ b/Misc/ACKS Fri Jul 15 10:58:54 2016 -0700 @@ -939,6 +939,7 @@ mattip Martin Matusiak Dieter Maurer +Lev Maximov Daniel May Madison May Lucas Maystre diff -r db5a5679a9de -r 22eaf6158e7b Misc/NEWS --- a/Misc/NEWS Fri Jul 15 16:12:39 2016 +0300 +++ b/Misc/NEWS Fri Jul 15 10:58:54 2016 -0700 @@ -22,6 +22,9 @@ Library ------- +- Issue #26844: Fix error message for imp.find_module() to refer to 'path' + instead of 'name'. Patch by Lev Maximov. + - Issue #23804: Fix SSL zero-length recv() calls to not block and not raise an error about unclean EOF.