From 44c96926c5e866766398c604f39c038c70e38d77 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Thu, 16 Oct 2025 11:14:12 +0000 Subject: [PATCH] [lld][utils] Remove Python2 compatible imports in benchmark.py These imports were moved around in Python 3.0 (https://docs.python.org/3/whatsnew/3.0.html#library-changes). LLVM requires Python >= 3.8 so we can expect the Python3 names to exist. --- lld/utils/benchmark.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lld/utils/benchmark.py b/lld/utils/benchmark.py index 7202e07ec438..059f82ac78d0 100755 --- a/lld/utils/benchmark.py +++ b/lld/utils/benchmark.py @@ -13,13 +13,8 @@ import subprocess import json import datetime import argparse - -try: - from urllib.parse import urlencode - from urllib.request import urlopen, Request -except ImportError: - from urllib import urlencode - from urllib2 import urlopen, Request +from urllib.parse import urlencode +from urllib.request import urlopen, Request parser = argparse.ArgumentParser()