[9/9] app/test-bbdev: add python2 deprecation notice

Message ID 20200710101055.33671-10-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/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK

Commit Message

Louise Kilheeney July 10, 2020, 10:10 a.m. UTC
  Cc: Nicolas Chautru <nicolas.chautru@intel.com>

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

Comments

Chautru, Nicolas July 10, 2020, 3:53 p.m. UTC | #1
> From: Kilheeney, Louise <louise.kilheeney@intel.com>
> 
> Cc: Nicolas Chautru <nicolas.chautru@intel.com>
> 
> Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
> ---
>  app/test-bbdev/test-bbdev.py | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py
> index e127fb2eb..5ae2dc6c4 100755
> --- a/app/test-bbdev/test-bbdev.py
> +++ b/app/test-bbdev/test-bbdev.py
> @@ -16,6 +16,10 @@ 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:
> --

Tested the serie on my end to double check. 
Thanks

Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>


> 2.17.1
  

Patch

diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py
index e127fb2eb..5ae2dc6c4 100755
--- a/app/test-bbdev/test-bbdev.py
+++ b/app/test-bbdev/test-bbdev.py
@@ -16,6 +16,10 @@  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: