[1/9] usertools/cpu_layout: add python2 deprecation notice

Message ID 20200710101055.33671-2-louise.kilheeney@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series python2 deprecation notice |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS

Commit Message

Louise Kilheeney July 10, 2020, 10:10 a.m. UTC
  add python2 deprecation notice

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

Patch

diff --git a/usertools/cpu_layout.py b/usertools/cpu_layout.py
index 6f129b1db..5423c7965 100755
--- a/usertools/cpu_layout.py
+++ b/usertools/cpu_layout.py
@@ -10,6 +10,10 @@ 
 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 = {}