tests: unconditionalize some imports
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 20 Feb 2022 13:29:47 -0700
changeset 48867 f547a5dee234
parent 48866 2ccd5e71bcd3
child 48868 a52f5bfc9358
tests: unconditionalize some imports Now that we require Python 3 we can simplify these imports. Differential Revision: https://phab.mercurial-scm.org/D12245
tests/run-tests.py
--- a/tests/run-tests.py	Sun Feb 20 13:27:38 2022 -0700
+++ b/tests/run-tests.py	Sun Feb 20 13:29:47 2022 -0700
@@ -57,8 +57,10 @@
 import multiprocessing
 import os
 import platform
+import queue
 import random
 import re
+import shlex
 import shutil
 import signal
 import socket
@@ -73,20 +75,7 @@
 import xml.dom.minidom as minidom
 
 WINDOWS = os.name == r'nt'
-
-try:
-    import Queue as queue
-except ImportError:
-    import queue
-
-try:
-    import shlex
-
-    shellquote = shlex.quote
-except (ImportError, AttributeError):
-    import pipes
-
-    shellquote = pipes.quote
+shellquote = shlex.quote
 
 
 processlock = threading.Lock()