[Lldb-commits] [PATCH] D16431: Fix TestImport.py to work with Python 3.5.

Adrian McCarthy via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 21 15:08:13 PST 2016


amccarth created this revision.
amccarth added a reviewer: zturner.
amccarth added a subscriber: lldb-commits.

In Python 3.5, import looks only in the official packages directory unless you tell it otherwise.  I tested with Python 2.7 as well.

http://reviews.llvm.org/D16431

Files:
  packages/Python/lldbsuite/test/functionalities/command_script/import/thepackage/__init__.py

Index: packages/Python/lldbsuite/test/functionalities/command_script/import/thepackage/__init__.py
===================================================================
--- packages/Python/lldbsuite/test/functionalities/command_script/import/thepackage/__init__.py
+++ packages/Python/lldbsuite/test/functionalities/command_script/import/thepackage/__init__.py
@@ -1,5 +1,7 @@
-import TPunitA
-import TPunitB
+from __future__ import absolute_import
+
+from . import TPunitA
+from . import TPunitB
 
 def __lldb_init_module(debugger,*args):
 	debugger.HandleCommand("command script add -f thepackage.TPunitA.command TPcommandA")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16431.45600.patch
Type: text/x-patch
Size: 626 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160121/da44b46a/attachment.bin>


More information about the lldb-commits mailing list