[dpdk-dev] [PATCH 3/9] usertools/dpdk-devbind: add python2 deprecation notice

Louise Kilheeney louise.kilheeney at intel.com
Fri Jul 10 12:10:49 CEST 2020


add python2 deprecation notice

Signed-off-by: Louise Kilheeney <louise.kilheeney at intel.com>
---
 usertools/dpdk-devbind.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index dc008823f..86b6b53c4 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -10,6 +10,10 @@
 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}
-- 
2.17.1



More information about the dev mailing list