llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

TestImport fails on Python 3

Open amccarth-google opened this issue 10 years ago • 2 comments

Bugzilla Link 27227
Resolution FIXED
Resolved on Apr 08, 2016 12:13
Version unspecified
OS Windows NT

Extended Description

In Python 3, it seems import commands work only if the module name matches the directory name. Thus lldb commands like this fail:

command script import ./foo/foo2.py --allow-reload

While commands like this succeed:

command script import ./foo/foo.py --allow-reload

There have been changes to the import rules between Python 2 and 3 that may be relevant, but I'm not Python expert enough to understand the root problem or to propose a fix.

amccarth-google avatar Apr 05 '16 22:04 amccarth-google

Root cause was failure to escape the backslashes in a path on Windows.

http://reviews.llvm.org/rL265738

amccarth-google avatar Apr 08 '16 19:04 amccarth-google

assigned to @amccarth-google

amccarth-google avatar Apr 05 '16 22:04 amccarth-google