aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/tools
diff options
context:
space:
mode:
authorDave Lee <davelee.com@gmail.com>2022-08-05 13:35:20 -0600
committerDave Lee <davelee.com@gmail.com>2022-08-11 19:06:15 -0700
commit56f9cfe30c4488aade888905bb6280ecb952a613 (patch)
tree99a60b9c61a4344203d3e645308bd4e871a7590a /lldb/packages/Python/lldbsuite/test/tools
parent256ba7738ea8a07372a82cadd29e9c08fdf9145c (diff)
downloadllvm-56f9cfe30c4488aade888905bb6280ecb952a613.zip
llvm-56f9cfe30c4488aade888905bb6280ecb952a613.tar.gz
llvm-56f9cfe30c4488aade888905bb6280ecb952a613.tar.bz2
[lldb] Remove uses of six module (NFC)
With lldb (& llvm) requiring Python 3.6+, use of the `six` module can be removed. Differential Revision: https://reviews.llvm.org/D131304
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools')
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py3
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py5
2 files changed, 3 insertions, 5 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
index df1fd2c..1653910 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -59,8 +59,7 @@ class GdbRemoteTestCaseFactory(type):
return super(GdbRemoteTestCaseFactory, cls).__new__(
cls, name, bases, newattrs)
-@add_metaclass(GdbRemoteTestCaseFactory)
-class GdbRemoteTestCaseBase(Base):
+class GdbRemoteTestCaseBase(Base, metaclass=GdbRemoteTestCaseFactory):
# Default time out in seconds. The timeout is increased tenfold under Asan.
DEFAULT_TIMEOUT = 20 * (10 if ('ASAN_OPTIONS' in os.environ) else 1)
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
index 82e1685..8e615ec 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
@@ -8,7 +8,6 @@ import os
import os.path
import platform
import re
-import six
import socket
import subprocess
from lldbsuite.support import seven
@@ -803,7 +802,7 @@ def process_is_running(pid, unknown_value=True):
If we don't know how to check running process ids on the given OS:
return the value provided by the unknown_value arg.
"""
- if not isinstance(pid, six.integer_types):
+ if not isinstance(pid, int):
raise Exception(
"pid must be an integral type (actual type: %s)" % str(
type(pid)))
@@ -878,7 +877,7 @@ class Server(object):
@staticmethod
def _checksum(packet):
checksum = 0
- for c in six.iterbytes(packet):
+ for c in iter(packet):
checksum += c
return checksum % 256