[Lldb-commits] [lldb] 9f947ab - [LLDB] Remove __future__ imports from examples
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 15 02:04:32 PDT 2022
Author: David Spickett
Date: 2022-08-15T09:04:25Z
New Revision: 9f947abf94e16fa7c759ab56a4fb030d6ef25961
URL: https://github.com/llvm/llvm-project/commit/9f947abf94e16fa7c759ab56a4fb030d6ef25961
DIFF: https://github.com/llvm/llvm-project/commit/9f947abf94e16fa7c759ab56a4fb030d6ef25961.diff
LOG: [LLDB] Remove __future__ imports from examples
Not needed now that we require python 3.
Reviewed By: kastiglione, JDevlieghere
Differential Revision: https://reviews.llvm.org/D131772
Added:
Modified:
lldb/examples/customization/bin-utils/binutils.py
lldb/examples/customization/import-python/importcmd.py
lldb/examples/customization/pwd-cd-and-system/utils.py
lldb/examples/darwin/heap_find/heap.py
lldb/examples/python/bsd.py
lldb/examples/python/cmdtemplate.py
lldb/examples/python/delta.py
lldb/examples/python/diagnose_nsstring.py
lldb/examples/python/diagnose_unwind.py
lldb/examples/python/gdbremote.py
lldb/examples/python/globals.py
lldb/examples/python/jump.py
lldb/examples/python/lldb_module_utils.py
lldb/examples/python/lldbtk.py
lldb/examples/python/mach_o.py
lldb/examples/python/memory.py
lldb/examples/python/performance.py
lldb/examples/python/process_events.py
lldb/examples/python/pytracer.py
lldb/examples/python/scripted_step.py
lldb/examples/python/shadow.py
lldb/examples/python/sources.py
lldb/examples/python/stacks.py
lldb/examples/python/symbolication.py
lldb/examples/python/types.py
lldb/examples/scripting/tree_utils.py
lldb/examples/summaries/cocoa/CFBitVector.py
lldb/examples/summaries/cocoa/Logger.py
lldb/examples/summaries/cocoa/NSNumber.py
lldb/examples/synthetic/gnu_libstdcpp.py
Removed:
################################################################################
diff --git a/lldb/examples/customization/bin-utils/binutils.py b/lldb/examples/customization/bin-utils/binutils.py
index f1aa48fa26db1..4237ab6525005 100644
--- a/lldb/examples/customization/bin-utils/binutils.py
+++ b/lldb/examples/customization/bin-utils/binutils.py
@@ -1,7 +1,5 @@
"Collection of tools for displaying bit representation of numbers."""
-from __future__ import print_function
-
def binary(n, width=None):
"""
Return a list of (0|1)'s for the binary representation of n where n >= 0.
diff --git a/lldb/examples/customization/import-python/importcmd.py b/lldb/examples/customization/import-python/importcmd.py
index cf7ac979966da..e355a09c7a3f9 100644
--- a/lldb/examples/customization/import-python/importcmd.py
+++ b/lldb/examples/customization/import-python/importcmd.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
import sys
import os
import lldb
diff --git a/lldb/examples/customization/pwd-cd-and-system/utils.py b/lldb/examples/customization/pwd-cd-and-system/utils.py
index 6c3c2540f3dc6..75dcb1a0db757 100644
--- a/lldb/examples/customization/pwd-cd-and-system/utils.py
+++ b/lldb/examples/customization/pwd-cd-and-system/utils.py
@@ -1,5 +1,4 @@
"""Utility for changing directories and execution of commands in a subshell."""
-from __future__ import print_function
import os
import shlex
diff --git a/lldb/examples/darwin/heap_find/heap.py b/lldb/examples/darwin/heap_find/heap.py
index b04f69008b68e..2021b9ebc8e23 100644
--- a/lldb/examples/darwin/heap_find/heap.py
+++ b/lldb/examples/darwin/heap_find/heap.py
@@ -8,7 +8,6 @@
# (lldb) script import lldb.macosx.heap
#----------------------------------------------------------------------
-from __future__ import print_function
import lldb
import optparse
import os
diff --git a/lldb/examples/python/bsd.py b/lldb/examples/python/bsd.py
index fdf5455fe69e3..34716a3d9003b 100755
--- a/lldb/examples/python/bsd.py
+++ b/lldb/examples/python/bsd.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-from __future__ import print_function
import cmd
import optparse
diff --git a/lldb/examples/python/cmdtemplate.py b/lldb/examples/python/cmdtemplate.py
index aa99e4c03beb8..9ce930d4ef76d 100644
--- a/lldb/examples/python/cmdtemplate.py
+++ b/lldb/examples/python/cmdtemplate.py
@@ -9,8 +9,6 @@
# (lldb) command script import /path/to/cmdtemplate.py
# ---------------------------------------------------------------------
-from __future__ import print_function
-
import inspect
import lldb
import optparse
diff --git a/lldb/examples/python/delta.py b/lldb/examples/python/delta.py
index 3f14fb1e152b9..3e8ece2141314 100755
--- a/lldb/examples/python/delta.py
+++ b/lldb/examples/python/delta.py
@@ -16,8 +16,6 @@
# available.
#----------------------------------------------------------------------
-from __future__ import print_function
-
import optparse
import os
import shlex
diff --git a/lldb/examples/python/diagnose_nsstring.py b/lldb/examples/python/diagnose_nsstring.py
index 4a8eee3c2dd4e..1e91e860894f4 100644
--- a/lldb/examples/python/diagnose_nsstring.py
+++ b/lldb/examples/python/diagnose_nsstring.py
@@ -4,8 +4,6 @@
# decisions it did and providing some useful context information that can
# be used for improving the formatter
-from __future__ import print_function
-
import lldb
diff --git a/lldb/examples/python/diagnose_unwind.py b/lldb/examples/python/diagnose_unwind.py
index bd6976de4a3df..65de6f1625c28 100644
--- a/lldb/examples/python/diagnose_unwind.py
+++ b/lldb/examples/python/diagnose_unwind.py
@@ -5,7 +5,6 @@
# information about the stack frames, and tries an alternate unwind
# algorithm, that will help to understand why lldb's unwind algorithm
# did not succeed.
-from __future__ import print_function
import optparse
import lldb
diff --git a/lldb/examples/python/gdbremote.py b/lldb/examples/python/gdbremote.py
index 8b6a268496214..13ec30abbe18b 100755
--- a/lldb/examples/python/gdbremote.py
+++ b/lldb/examples/python/gdbremote.py
@@ -16,7 +16,6 @@
# available.
#----------------------------------------------------------------------
-from __future__ import print_function
import binascii
import subprocess
import json
diff --git a/lldb/examples/python/globals.py b/lldb/examples/python/globals.py
index 96645afef00fb..3d6cc9b01713e 100755
--- a/lldb/examples/python/globals.py
+++ b/lldb/examples/python/globals.py
@@ -7,7 +7,6 @@
# For the shells sh, bash:
# PYTHONPATH=/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python ./globals.py <path> [<path> ...]
#----------------------------------------------------------------------
-from __future__ import print_function
import lldb
import optparse
diff --git a/lldb/examples/python/jump.py b/lldb/examples/python/jump.py
index d7fd03e533890..cfa8342d0690f 100644
--- a/lldb/examples/python/jump.py
+++ b/lldb/examples/python/jump.py
@@ -1,5 +1,3 @@
-from __future__ import print_function
-
import lldb
import re
diff --git a/lldb/examples/python/lldb_module_utils.py b/lldb/examples/python/lldb_module_utils.py
index c0ac5751ce285..fa1499da0ddfb 100644
--- a/lldb/examples/python/lldb_module_utils.py
+++ b/lldb/examples/python/lldb_module_utils.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-from __future__ import print_function
import lldb
import optparse
diff --git a/lldb/examples/python/lldbtk.py b/lldb/examples/python/lldbtk.py
index a6a420ba1bd1f..55633df3dad8f 100644
--- a/lldb/examples/python/lldbtk.py
+++ b/lldb/examples/python/lldbtk.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-from __future__ import print_function
import lldb
import shlex
diff --git a/lldb/examples/python/mach_o.py b/lldb/examples/python/mach_o.py
index 03ab73b3be9de..d9e1841363b7a 100755
--- a/lldb/examples/python/mach_o.py
+++ b/lldb/examples/python/mach_o.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-from __future__ import print_function
import cmd
import dict_utils
diff --git a/lldb/examples/python/memory.py b/lldb/examples/python/memory.py
index aa5df0178e91b..17fce3fb0d9e3 100755
--- a/lldb/examples/python/memory.py
+++ b/lldb/examples/python/memory.py
@@ -9,8 +9,6 @@
# (lldb) command script import /path/to/cmdtemplate.py
#----------------------------------------------------------------------
-from __future__ import print_function
-
import platform
import os
import re
diff --git a/lldb/examples/python/performance.py b/lldb/examples/python/performance.py
index 57e9d1e0a24c3..cfba73e50832e 100755
--- a/lldb/examples/python/performance.py
+++ b/lldb/examples/python/performance.py
@@ -8,8 +8,6 @@
# export PYTHONPATH=/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python
#----------------------------------------------------------------------
-from __future__ import print_function
-
import optparse
import os
import platform
diff --git a/lldb/examples/python/process_events.py b/lldb/examples/python/process_events.py
index cb4bf788119d2..16706d81b33d5 100755
--- a/lldb/examples/python/process_events.py
+++ b/lldb/examples/python/process_events.py
@@ -8,8 +8,6 @@
# export PYTHONPATH=/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python
#----------------------------------------------------------------------
-from __future__ import print_function
-
import optparse
import os
import platform
diff --git a/lldb/examples/python/pytracer.py b/lldb/examples/python/pytracer.py
index 27f88d7a3eeee..561b90f4a7e61 100644
--- a/lldb/examples/python/pytracer.py
+++ b/lldb/examples/python/pytracer.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
import sys
import inspect
from collections import OrderedDict
diff --git a/lldb/examples/python/scripted_step.py b/lldb/examples/python/scripted_step.py
index 3c1d5d7a6c4c4..011e24d70cb26 100644
--- a/lldb/examples/python/scripted_step.py
+++ b/lldb/examples/python/scripted_step.py
@@ -93,8 +93,6 @@
#
# (lldb) thread step-scripted -C scripted_step.StepWithPlan
-from __future__ import print_function
-
import lldb
diff --git a/lldb/examples/python/shadow.py b/lldb/examples/python/shadow.py
index 73534dce53527..1ad0288dd2ea5 100644
--- a/lldb/examples/python/shadow.py
+++ b/lldb/examples/python/shadow.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-from __future__ import print_function
import lldb
import shlex
diff --git a/lldb/examples/python/sources.py b/lldb/examples/python/sources.py
index 38b3926768b24..427937abd13a3 100644
--- a/lldb/examples/python/sources.py
+++ b/lldb/examples/python/sources.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-from __future__ import print_function
import lldb
import shlex
diff --git a/lldb/examples/python/stacks.py b/lldb/examples/python/stacks.py
index 5b0a877b30668..3b9a85a2bd951 100755
--- a/lldb/examples/python/stacks.py
+++ b/lldb/examples/python/stacks.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-from __future__ import print_function
import lldb
import optparse
import shlex
diff --git a/lldb/examples/python/symbolication.py b/lldb/examples/python/symbolication.py
index e15f7f4eaa3cf..c722b73faa06a 100755
--- a/lldb/examples/python/symbolication.py
+++ b/lldb/examples/python/symbolication.py
@@ -26,7 +26,6 @@
# PYTHONPATH=/path/to/LLDB.framework/Resources/Python ./crashlog.py ~/Library/Logs/DiagnosticReports/a.crash
#----------------------------------------------------------------------
-from __future__ import print_function
import lldb
import optparse
import os
diff --git a/lldb/examples/python/types.py b/lldb/examples/python/types.py
index 024348cdaa3a3..e32787731e63d 100755
--- a/lldb/examples/python/types.py
+++ b/lldb/examples/python/types.py
@@ -9,8 +9,6 @@
# (lldb) command script import /path/to/cmdtemplate.py
#----------------------------------------------------------------------
-from __future__ import print_function
-
import platform
import os
import re
diff --git a/lldb/examples/scripting/tree_utils.py b/lldb/examples/scripting/tree_utils.py
index e99f7c63bedc4..69b5406457c35 100755
--- a/lldb/examples/scripting/tree_utils.py
+++ b/lldb/examples/scripting/tree_utils.py
@@ -18,8 +18,6 @@
http://lldb.llvm.org/scripting.html
"""
-from __future__ import print_function
-
def DFS(root, word, cur_path):
"""
diff --git a/lldb/examples/summaries/cocoa/CFBitVector.py b/lldb/examples/summaries/cocoa/CFBitVector.py
index 73552a3e2b8fb..7ee5fc2cdbf69 100644
--- a/lldb/examples/summaries/cocoa/CFBitVector.py
+++ b/lldb/examples/summaries/cocoa/CFBitVector.py
@@ -5,7 +5,6 @@
See https://llvm.org/LICENSE.txt for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""
-from __future__ import print_function
# summary provider for CF(Mutable)BitVector
import lldb
diff --git a/lldb/examples/summaries/cocoa/Logger.py b/lldb/examples/summaries/cocoa/Logger.py
index e518b75b20ce2..e051a82e4bc00 100644
--- a/lldb/examples/summaries/cocoa/Logger.py
+++ b/lldb/examples/summaries/cocoa/Logger.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
import sys
import os.path
import inspect
diff --git a/lldb/examples/summaries/cocoa/NSNumber.py b/lldb/examples/summaries/cocoa/NSNumber.py
index 7132e34d170c9..983222b880c98 100644
--- a/lldb/examples/summaries/cocoa/NSNumber.py
+++ b/lldb/examples/summaries/cocoa/NSNumber.py
@@ -8,8 +8,6 @@
# example summary provider for NSNumber
# the real summary is now C++ code built into LLDB
-from __future__ import print_function
-
import lldb
import ctypes
import lldb.runtime.objc.objc_runtime
diff --git a/lldb/examples/synthetic/gnu_libstdcpp.py b/lldb/examples/synthetic/gnu_libstdcpp.py
index a371a77c6c749..d1dd2d6c95b71 100644
--- a/lldb/examples/synthetic/gnu_libstdcpp.py
+++ b/lldb/examples/synthetic/gnu_libstdcpp.py
@@ -1,4 +1,3 @@
-from __future__ import division
import lldb.formatters.Logger
# C++ STL formatters for LLDB
More information about the lldb-commits
mailing list