From patchwork Fri Aug 21 09:14:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 75803 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B954DA04AF; Fri, 21 Aug 2020 11:15:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F1C4E1C0BF; Fri, 21 Aug 2020 11:15:06 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0644C1C0BD for ; Fri, 21 Aug 2020 11:15:04 +0200 (CEST) IronPort-SDR: 6kn8UHouQHgJd+oOLmwGb3QoTKiKf9RoPTMC/nPyfbGTf9RYSDEy13kGuZpz7+xm67wxHNzdSk Ski63647p+FQ== X-IronPort-AV: E=McAfee;i="6000,8403,9719"; a="173544549" X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="173544549" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2020 02:15:04 -0700 IronPort-SDR: GHdmmseRx+yo49Vs+96G8jumHE1HIQNtalSTPerSPUopjme0aW4OpBhkXm8jumrG3YwHBudZio f9PnJa4YLmYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="498468610" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by fmsmga005.fm.intel.com with ESMTP; 21 Aug 2020 02:15:03 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: robin.jarry@6wind.com, anatoly.burakov@intel.com, bruce.richardson@intel.com, Louise Kilheeney , Kevin Laatz Date: Fri, 21 Aug 2020 10:14:44 +0100 Message-Id: <20200821091452.2482-2-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200821091452.2482-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> <20200821091452.2482-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH v5 1/9] usertools/dpdk-telemetry-client: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Cc: Kevin Laatz Signed-off-by: Louise Kilheeney Acked-by: Bruce Richardson --- usertools/dpdk-telemetry-client.py | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/usertools/dpdk-telemetry-client.py b/usertools/dpdk-telemetry-client.py index 98d28fa89b..fa599046a4 100755 --- a/usertools/dpdk-telemetry-client.py +++ b/usertools/dpdk-telemetry-client.py @@ -1,10 +1,7 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation -from __future__ import print_function -from __future__ import unicode_literals - import socket import os import sys @@ -18,15 +15,6 @@ GLOBAL_METRICS_REQ = "{\"action\":0,\"command\":\"global_stat_values\",\"data\":null}" DEFAULT_FP = "/var/run/dpdk/default_client" -try: - raw_input # Python 2 -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): @@ -53,7 +41,7 @@ def __init__(self): # Creates a client instance def __del__(self): try: if self.unregistered == 0: - self.unregister(); + self.unregister() except: print("Error - Client could not be destroyed") @@ -86,7 +74,7 @@ def requestMetrics(self): # Requests metrics for given client def repeatedlyRequestMetrics(self, sleep_time): # Recursively requests metrics for given client print("\nPlease enter the number of times you'd like to continuously request Metrics:") - n_requests = int(raw_input("\n:")) + n_requests = int(input("\n:")) print("\033[F") #Removes the user input from screen, cleans it up print("\033[K") for i in range(n_requests): @@ -107,7 +95,7 @@ def interactiveMenu(self, sleep_time): # Creates Interactive menu within the scr print("[4] Unregister client") try: - self.choice = int(raw_input("\n:")) + self.choice = int(input("\n:")) print("\033[F") #Removes the user input for screen, cleans it up print("\033[K") if self.choice == 1: From patchwork Fri Aug 21 09:14:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 75804 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4FD2AA04AF; Fri, 21 Aug 2020 11:15:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 577DD1C0C5; Fri, 21 Aug 2020 11:15:08 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 949DB5F69 for ; Fri, 21 Aug 2020 11:15:06 +0200 (CEST) IronPort-SDR: Gzfmfed2+UVGOqsL5WWQHcLt3PLxHeqSYAkPYuWJm9sg4MOq498jnyvwX6wPIy/4hBphIvIvNN GApkU1sIOHzg== X-IronPort-AV: E=McAfee;i="6000,8403,9719"; a="173544553" X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="173544553" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2020 02:15:06 -0700 IronPort-SDR: f59Xrt23DAPnYXjrh1inUhGXI3PNkac8FbKPP2OGQzrF8Eu1qBIN7/B1Vw2D+uI0i1BUpUrHRg ahj+MhuWAeOw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="498468627" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by fmsmga005.fm.intel.com with ESMTP; 21 Aug 2020 02:15:04 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: robin.jarry@6wind.com, anatoly.burakov@intel.com, bruce.richardson@intel.com, Louise Kilheeney Date: Fri, 21 Aug 2020 10:14:45 +0100 Message-Id: <20200821091452.2482-3-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200821091452.2482-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> <20200821091452.2482-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH v5 2/9] usertools/dpdk-devbind: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Signed-off-by: Louise Kilheeney Reviewed-by: Bruce Richardson --- usertools/dpdk-devbind.py | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 86b6b53c40..bcdc5da881 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -1,19 +1,14 @@ -#! /usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # -from __future__ import print_function import sys import os import getopt 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} @@ -147,14 +142,6 @@ def usage(): """ % locals()) # replace items from local variables - -# This is roughly compatible with check_output function in subprocess module -# which is only available in python 2.7. -def check_output(args, stderr=None): - '''Run a command and capture its output''' - return subprocess.Popen(args, stdout=subprocess.PIPE, - stderr=stderr).communicate()[0] - # check if a specific kernel module is loaded def module_is_loaded(module): global loaded_modules @@ -211,8 +198,7 @@ def get_pci_device_details(dev_id, probe_lspci): device = {} if probe_lspci: - extra_info = check_output(["lspci", "-vmmks", dev_id]).splitlines() - + extra_info = subprocess.check_output(["lspci", "-vmmks", dev_id]).splitlines() # parse lspci details for line in extra_info: if len(line) == 0: @@ -248,7 +234,7 @@ def get_device_details(devices_type): # first loop through and read details for all devices # request machine readable format, with numeric IDs and String dev = {} - dev_lines = check_output(["lspci", "-Dvmmnnk"]).splitlines() + dev_lines = subprocess.check_output(["lspci", "-Dvmmnnk"]).splitlines() for dev_line in dev_lines: if len(dev_line) == 0: if device_type_match(dev, devices_type): @@ -276,7 +262,7 @@ def get_device_details(devices_type): # check what is the interface if any for an ssh connection if # any to this host, so we can mark it later. ssh_if = [] - route = check_output(["ip", "-o", "route"]) + route = subprocess.check_output(["ip", "-o", "route"]) # filter out all lines for 169.254 routes route = "\n".join(filter(lambda ln: not ln.startswith("169.254"), route.decode().splitlines())) From patchwork Fri Aug 21 09:14:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 75805 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E4F5AA04AF; Fri, 21 Aug 2020 11:15:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B332F1C0CE; Fri, 21 Aug 2020 11:15:09 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 25D181C0C2 for ; Fri, 21 Aug 2020 11:15:08 +0200 (CEST) IronPort-SDR: SjSop0QTsC120TnJuzq6p+npq8v20OvThj/pFqazbO1So/G4JS6qn1YdlshvM7db9jkVaFvR4Z oYC5MeRDv+Pw== X-IronPort-AV: E=McAfee;i="6000,8403,9719"; a="173544555" X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="173544555" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2020 02:15:07 -0700 IronPort-SDR: PMv5pYGCj0+m7SDo6rXCh+DfmWuHM1XvWfz2iS+5B/i0MBOMM6UNahAtvOflxM1vnxclnoDHeh dGWS8Hbl5lAQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="498468646" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by fmsmga005.fm.intel.com with ESMTP; 21 Aug 2020 02:15:06 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: robin.jarry@6wind.com, anatoly.burakov@intel.com, bruce.richardson@intel.com, Louise Kilheeney , Neil Horman Date: Fri, 21 Aug 2020 10:14:46 +0100 Message-Id: <20200821091452.2482-4-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200821091452.2482-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> <20200821091452.2482-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH v5 3/9] usertools/dpdk-pmdinfo: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Cc: Neil Horman Signed-off-by: Louise Kilheeney Reviewed-by: Bruce Richardson Acked-by: Neil Horman --- usertools/dpdk-pmdinfo.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py index f9ed755176..1661982791 100755 --- a/usertools/dpdk-pmdinfo.py +++ b/usertools/dpdk-pmdinfo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2016 Neil Horman @@ -7,8 +7,6 @@ # Utility to dump PMD_INFO_STRING support from an object file # # ------------------------------------------------------------------------- -from __future__ import print_function -from __future__ import unicode_literals import json import io import os @@ -28,9 +26,6 @@ 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: """ From patchwork Fri Aug 21 09:14:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 75806 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D57DA04AF; Fri, 21 Aug 2020 11:15:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 086F91C0D8; Fri, 21 Aug 2020 11:15:13 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 9F1FD1C0CC for ; Fri, 21 Aug 2020 11:15:09 +0200 (CEST) IronPort-SDR: KjyYNy15FLNn3EOVahBM6mJygJdblzo0jljwd/JGpJqrpIvZlHNtrpOXWO6YiqZhhDGkSmCpgw 3XoddcPrpebw== X-IronPort-AV: E=McAfee;i="6000,8403,9719"; a="173544558" X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="173544558" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2020 02:15:09 -0700 IronPort-SDR: EBxIeXLVIwGhW2py7I7NUpCzXPQ5Gf5zURHyH10YTq+KH9tg+1a29DFkPvqS2k3K3KXoK6EzAe mb1OrIKIBzRw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="498468654" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by fmsmga005.fm.intel.com with ESMTP; 21 Aug 2020 02:15:07 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: robin.jarry@6wind.com, anatoly.burakov@intel.com, bruce.richardson@intel.com, Louise Kilheeney Date: Fri, 21 Aug 2020 10:14:47 +0100 Message-Id: <20200821091452.2482-5-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200821091452.2482-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> <20200821091452.2482-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH v5 4/9] usertools/cpu_layout: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Signed-off-by: Louise Kilheeney Reviewed-by: Bruce Richardson --- usertools/cpu_layout.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/usertools/cpu_layout.py b/usertools/cpu_layout.py index 5423c7965f..89a48cec46 100755 --- a/usertools/cpu_layout.py +++ b/usertools/cpu_layout.py @@ -1,18 +1,9 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # Copyright(c) 2017 Cavium, Inc. All rights reserved. -from __future__ import print_function import sys -try: - xrange # Python 2 -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 = [] @@ -21,7 +12,7 @@ fd = open("{}/kernel_max".format(base_path)) max_cpus = int(fd.read()) fd.close() -for cpu in xrange(max_cpus + 1): +for cpu in range(max_cpus + 1): try: fd = open("{}/cpu{}/topology/core_id".format(base_path, cpu)) except IOError: From patchwork Fri Aug 21 09:14:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 75807 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 736A3A04AF; Fri, 21 Aug 2020 11:15:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5B0471C112; Fri, 21 Aug 2020 11:15:14 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0FB9F1C0D5 for ; Fri, 21 Aug 2020 11:15:10 +0200 (CEST) IronPort-SDR: VPMhcClRLJks7tICy/GE4CH6wQB/k6ZbWy/KbEdLlcAvtBwsCAF+DCBh217sPOgBmokt+vdIFu uSamyLn5i9HQ== X-IronPort-AV: E=McAfee;i="6000,8403,9719"; a="173544559" X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="173544559" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2020 02:15:10 -0700 IronPort-SDR: 1tl1pjPLsnksgbWixaTJtKK5govcfjaTPX9dWfbXKc/Nofi9rjvSFnvjS8Hhn0JzIMaQKWHhBG 898gjXK9a1AA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="498468661" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by fmsmga005.fm.intel.com with ESMTP; 21 Aug 2020 02:15:09 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: robin.jarry@6wind.com, anatoly.burakov@intel.com, bruce.richardson@intel.com, Louise Kilheeney , Olivier Matz Date: Fri, 21 Aug 2020 10:14:48 +0100 Message-Id: <20200821091452.2482-6-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200821091452.2482-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> <20200821091452.2482-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH v5 5/9] app/test-cmdline: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Cc: Olivier Matz Signed-off-by: Louise Kilheeney Reviewed-by: Bruce Richardson --- v5: fixed python3 issue casuing script to fail --- app/test-cmdline/cmdline_test.py | 9 ++------- app/test-cmdline/cmdline_test_data.py | 1 + mk/rte.sdktest.mk | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/test-cmdline/cmdline_test.py b/app/test-cmdline/cmdline_test.py index 954428e2bf..074fed7e7f 100755 --- a/app/test-cmdline/cmdline_test.py +++ b/app/test-cmdline/cmdline_test.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # Script that runs cmdline_test app and feeds keystrokes into it. -from __future__ import print_function import cmdline_test_data import os import pexpect @@ -19,10 +18,6 @@ def runTest(child, test): 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 # @@ -43,7 +38,7 @@ def runHistoryTest(child): i = 0 # fill the history with numbers - while i < history_size / 10: + while i < int(history_size / 10): # add 1 to prevent from parsing as octals child.send("1" + str(i).zfill(8) + cmdline_test_data.ENTER) # the app will simply print out the number diff --git a/app/test-cmdline/cmdline_test_data.py b/app/test-cmdline/cmdline_test_data.py index 114d2cb6a0..2d9b3262a6 100644 --- a/app/test-cmdline/cmdline_test_data.py +++ b/app/test-cmdline/cmdline_test_data.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation diff --git a/mk/rte.sdktest.mk b/mk/rte.sdktest.mk index 803018ba3a..ad7ef138f0 100644 --- a/mk/rte.sdktest.mk +++ b/mk/rte.sdktest.mk @@ -63,7 +63,7 @@ coverage: @mkdir -p $(AUTOTEST_DIR) ; \ cd $(AUTOTEST_DIR) ; \ if [ -f $(RTE_OUTPUT)/app/test ]; then \ - python $(RTE_SDK)/test/cmdline_test/cmdline_test.py \ + python3 $(RTE_SDK)/test/cmdline_test/cmdline_test.py \ $(RTE_OUTPUT)/app/cmdline_test; \ ulimit -S -n 100 ; \ python $(RTE_SDK)/app/test/autotest.py \ From patchwork Fri Aug 21 09:14:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 75808 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DCC77A04AF; Fri, 21 Aug 2020 11:15:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E79CB1C11F; Fri, 21 Aug 2020 11:15:15 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 99CF01C0D5 for ; Fri, 21 Aug 2020 11:15:12 +0200 (CEST) IronPort-SDR: oMlnp3rlnzMjgWrPhW5H4SFJtlG3X+wFu1jHe0F+hH8vBtHIzDmMocb1K3WclpfIyosL63u24R WCzpf/+NZwBw== X-IronPort-AV: E=McAfee;i="6000,8403,9719"; a="173544561" X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="173544561" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2020 02:15:12 -0700 IronPort-SDR: 5FgX1Eq9VFG1b1CkzVdyHwECyoJ97zh3HwTR5mbzUkUKSvRNxthvNSLQuONy3p4IIWJxTst6yr qH4trsMJkKXA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="498468676" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by fmsmga005.fm.intel.com with ESMTP; 21 Aug 2020 02:15:10 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: robin.jarry@6wind.com, anatoly.burakov@intel.com, bruce.richardson@intel.com, Louise Kilheeney Date: Fri, 21 Aug 2020 10:14:49 +0100 Message-Id: <20200821091452.2482-7-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200821091452.2482-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> <20200821091452.2482-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH v5 6/9] app/test: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Signed-off-by: Louise Kilheeney --- app/test/autotest.py | 7 +------ app/test/autotest_data.py | 1 + app/test/autotest_runner.py | 21 ++++++++------------- app/test/autotest_test_funcs.py | 1 + mk/rte.sdktest.mk | 4 ++-- 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/app/test/autotest.py b/app/test/autotest.py index cf7584ccd7..9eef1efbe5 100644 --- a/app/test/autotest.py +++ b/app/test/autotest.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # Script that uses either test app or qemu controlled by python-pexpect -from __future__ import print_function import autotest_data import autotest_runner import sys @@ -17,10 +16,6 @@ def usage(): 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 diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py index 4b7da45e09..097638941f 100644 --- a/app/test/autotest_data.py +++ b/app/test/autotest_data.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation diff --git a/app/test/autotest_runner.py b/app/test/autotest_runner.py index 95e74c760d..998fe57a55 100644 --- a/app/test/autotest_runner.py +++ b/app/test/autotest_runner.py @@ -1,10 +1,10 @@ +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # The main logic behind running autotests in parallel -from __future__ import print_function -import StringIO +import io import csv from multiprocessing import Pool, Queue import pexpect @@ -50,11 +50,7 @@ def first_cpu_on_node(node_nr): map(os.path.basename, cpu_path) ) ) - # for compatibility between python 3 and 2 we need to make interable out - # of filter return as it returns list in python 2 and a generator in 3 - m = next(iter(cpu_name)) - return int(m.group(1)) - + return int(next(cpu_name).group(1)) pool_child = None # per-process child @@ -78,7 +74,7 @@ def pool_init(queue, result_queue): cmdline = "%s %s" % (cmdline, prefix_cmdline) # prepare logging of init - startuplog = StringIO.StringIO() + startuplog = io.StringIO() # run test app try: @@ -86,8 +82,7 @@ def pool_init(queue, result_queue): print("\n%s %s\n" % ("=" * 20, prefix), file=startuplog) print("\ncmdline=%s" % cmdline, file=startuplog) - pool_child = pexpect.spawn(cmdline, logfile=startuplog) - + pool_child = pexpect.spawn(cmdline, logfile=startuplog, encoding='utf-8') # wait for target to boot if not wait_prompt(pool_child): pool_child.close() @@ -138,7 +133,7 @@ def run_test(target, test): # create log buffer for each test # in multiprocessing environment, the logging would be # interleaved and will create a mess, hence the buffering - logfile = StringIO.StringIO() + logfile = io.StringIO() pool_child.logfile = logfile # make a note when the test started @@ -210,9 +205,9 @@ def __init__(self, cmdline, target, blacklist, whitelist, n_processes): # parse the binary for available test commands binary = cmdline.split()[0] stripped = 'not stripped' not in \ - subprocess.check_output(['file', binary]) + subprocess.check_output(['file', binary]).decode() if not stripped: - symbols = subprocess.check_output(['nm', binary]).decode('utf-8') + symbols = subprocess.check_output(['nm', binary]).decode() self.avail_cmds = re.findall('test_register_(\w+)', symbols) else: self.avail_cmds = None diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py index 26688b7132..775dfd1dc5 100644 --- a/app/test/autotest_test_funcs.py +++ b/app/test/autotest_test_funcs.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation diff --git a/mk/rte.sdktest.mk b/mk/rte.sdktest.mk index ad7ef138f0..81eff0c08f 100644 --- a/mk/rte.sdktest.mk +++ b/mk/rte.sdktest.mk @@ -49,7 +49,7 @@ test test-fast test-perf test-drivers test-dump: @mkdir -p $(AUTOTEST_DIR) ; \ cd $(AUTOTEST_DIR) ; \ if [ -f $(RTE_OUTPUT)/app/test ]; then \ - python $(RTE_SDK)/app/test/autotest.py \ + python3 $(RTE_SDK)/app/test/autotest.py \ $(RTE_OUTPUT)/app/test \ $(RTE_TARGET) \ $(BLACKLIST) $(WHITELIST); \ @@ -66,7 +66,7 @@ coverage: python3 $(RTE_SDK)/test/cmdline_test/cmdline_test.py \ $(RTE_OUTPUT)/app/cmdline_test; \ ulimit -S -n 100 ; \ - python $(RTE_SDK)/app/test/autotest.py \ + python3 $(RTE_SDK)/app/test/autotest.py \ $(RTE_OUTPUT)/app/test \ $(RTE_TARGET) \ $(BLACKLIST) $(WHITELIST) ; \ From patchwork Fri Aug 21 09:14:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 75809 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22A58A04AF; Fri, 21 Aug 2020 11:16:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C6541C120; Fri, 21 Aug 2020 11:15:17 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 51FA21C0DC for ; Fri, 21 Aug 2020 11:15:14 +0200 (CEST) IronPort-SDR: Qw/LOVLGvVl1DzgFfmvJpolYxcBQGrk3+0LPb6cDJsOp/1HfuM/AesgR3ZB9MLlGdQRrsMef1v us7rRswKaMqA== X-IronPort-AV: E=McAfee;i="6000,8403,9719"; a="173544565" X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="173544565" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2020 02:15:13 -0700 IronPort-SDR: C+zt7WUuQ0BVocO4Vo/rS+wMTMy2Yw3XyU8GUtG4FOzFVI/jj6a1ah1i4XuCGbz+uw4hCgs4u3 xt3T4sheLroQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="498468687" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by fmsmga005.fm.intel.com with ESMTP; 21 Aug 2020 02:15:12 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: robin.jarry@6wind.com, anatoly.burakov@intel.com, bruce.richardson@intel.com, Louise Kilheeney , Neil Horman , Ray Kinsella Date: Fri, 21 Aug 2020 10:14:50 +0100 Message-Id: <20200821091452.2482-8-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200821091452.2482-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> <20200821091452.2482-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH v5 7/9] devtools: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Cc: Neil Horman Cc: Ray Kinsella Signed-off-by: Louise Kilheeney Acked-by: Ray Kinsella Acked-by: Neil Horman --- devtools/update_version_map_abi.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/devtools/update_version_map_abi.py b/devtools/update_version_map_abi.py index 80a61641ed..830e6c58c8 100755 --- a/devtools/update_version_map_abi.py +++ b/devtools/update_version_map_abi.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Intel Corporation @@ -9,7 +9,6 @@ from the devtools/update-abi.sh utility. """ -from __future__ import print_function import argparse import sys import re @@ -160,10 +159,6 @@ def __generate_internal_abi(f_out, lines): 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.') From patchwork Fri Aug 21 09:14:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 75810 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 552A5A04AF; Fri, 21 Aug 2020 11:16:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CAC931C126; Fri, 21 Aug 2020 11:15:18 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0B1031C120 for ; Fri, 21 Aug 2020 11:15:15 +0200 (CEST) IronPort-SDR: 1G7OyDEHvGDAztLl7Y2rWpyadOBPjLQvwZ6FMv44PvYGc7C+CIUuSfUdMyEU+WXDUxwIarn3vQ /4CTgd6LZiPw== X-IronPort-AV: E=McAfee;i="6000,8403,9719"; a="173544566" X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="173544566" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2020 02:15:15 -0700 IronPort-SDR: QyzIdRQ+eN+13CmYibdTpEKoGiYNjrqHSHd98ef5kflnKFgMeMwWXFHHBTZp4/n+Yp7e3oyap4 ZSpjxSXIwz3w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="498468701" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by fmsmga005.fm.intel.com with ESMTP; 21 Aug 2020 02:15:14 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: robin.jarry@6wind.com, anatoly.burakov@intel.com, bruce.richardson@intel.com, Louise Kilheeney , Thomas Monjalon Date: Fri, 21 Aug 2020 10:14:51 +0100 Message-Id: <20200821091452.2482-9-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200821091452.2482-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> <20200821091452.2482-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH v5 8/9] config/arm: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only to avoid maintaining python 2. Cc: Thomas Monjalon Signed-off-by: Louise Kilheeney --- config/arm/armv8_machine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/arm/armv8_machine.py b/config/arm/armv8_machine.py index 404866d2f8..1f689d9a83 100755 --- a/config/arm/armv8_machine.py +++ b/config/arm/armv8_machine.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Cavium, Inc From patchwork Fri Aug 21 09:14:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 75811 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CD984A04AF; Fri, 21 Aug 2020 11:16:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 07A6B1C12C; Fri, 21 Aug 2020 11:15:23 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 37EEA1C0D7 for ; Fri, 21 Aug 2020 11:15:21 +0200 (CEST) IronPort-SDR: fxvW/+QEzZdvMovHuwhpbQhVft92PJwitSk9rlPML9hsQ3y4HJ+kvfPziL34Ddk+5Kyx5DzDFB xoFbA0F2jQRA== X-IronPort-AV: E=McAfee;i="6000,8403,9719"; a="173544568" X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="173544568" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2020 02:15:19 -0700 IronPort-SDR: ILi2U2YzcAMSNKHEk6YfOVOqtJEGQykKiJUpQlK7KscYoGhUAzKbQH+lDLnV5sjpAqLn3IhQ9j ECpL2ybzAxwg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,335,1592895600"; d="scan'208";a="498468715" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by fmsmga005.fm.intel.com with ESMTP; 21 Aug 2020 02:15:15 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: robin.jarry@6wind.com, anatoly.burakov@intel.com, bruce.richardson@intel.com, Louise Kilheeney , Nicolas Chautru Date: Fri, 21 Aug 2020 10:14:52 +0100 Message-Id: <20200821091452.2482-10-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200821091452.2482-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> <20200821091452.2482-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH v5 9/9] app/test-bbdev: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Cc: Nicolas Chautru Signed-off-by: Louise Kilheeney --- app/test-bbdev/test-bbdev.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py index 5ae2dc6c49..7d67dbe30a 100755 --- a/app/test-bbdev/test-bbdev.py +++ b/app/test-bbdev/test-bbdev.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -from __future__ import print_function import sys import os import argparse @@ -16,10 +15,6 @@ def kill(process): 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: