Prepare for python2 removal in 20.11.
Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
print("ERROR: Test app timed out")
process.kill()
+if sys.version_info.major < 3:
+ print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
+ print("Please use Python 3 instead", file=sys.stderr)
+
if "RTE_SDK" in os.environ:
dpdk_path = os.environ["RTE_SDK"]
else:
return 0
child.expect(test["Result"], 1)
+if sys.version_info.major < 3:
+ print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
+ print("Please use Python 3 instead", file=sys.stderr)
#
# history test is a special case
usage()
sys.exit(1)
+if sys.version_info.major < 3:
+ print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
+ print("Please use Python 3 instead", file=sys.stderr)
+
target = sys.argv[2]
test_whitelist = None
print("};", file=f_out)
def __main():
+ if sys.version_info.major < 3:
+ print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
+ print("Please use Python 3 instead", file=sys.stderr)
+
arg_parser = argparse.ArgumentParser(
description='Merge versions in linker version script.')
except NameError:
xrange = range # Python 3
+if sys.version_info.major < 3:
+ print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
+ print("Please use Python 3 instead", file=sys.stderr)
+
sockets = []
cores = []
core_map = {}
import subprocess
from os.path import exists, abspath, dirname, basename
+if sys.version_info.major < 3:
+ print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
+ print("Please use Python 3 instead", file=sys.stderr)
+
# The PCI base class for all devices
network_class = {'Class': '02', 'Vendor': None, 'Device': None,
'SVendor': None, 'SDevice': None}
pcidb = None
# ===========================================
-
+if sys.version_info.major < 3:
+ print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
+ print("Please use Python 3 instead", file=sys.stderr)
class Vendor:
"""
except NameError:
raw_input = input # Python 3
+if sys.version_info.major < 3:
+ print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
+ print("Please use Python 3 instead", file=sys.stderr)
+
class Socket:
def __init__(self):