[dpdk-dev] [PATCH 4/9] devtools/update_version_map: add python2 deprecation notice

Kinsella, Ray mdr at ashroe.eu
Mon Jul 13 10:12:43 CEST 2020



On 10/07/2020 11:10, Louise Kilheeney wrote:
> Cc: Neil Horman <nhorman at tuxdriver.com>
> Cc: Ray Kinsella <mdr at ashroe.eu>
> 
> Signed-off-by: Louise Kilheeney <louise.kilheeney at intel.com>
> ---
>  devtools/update_version_map_abi.py | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/devtools/update_version_map_abi.py b/devtools/update_version_map_abi.py
> index e2104e61e..80a61641e 100755
> --- a/devtools/update_version_map_abi.py
> +++ b/devtools/update_version_map_abi.py
> @@ -160,6 +160,10 @@ 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.')
>  
> 

Is the simpler way to resolve this, for the script be explicit about its requirements.

Something like 
#!/usr/bin/env python3

I also noted recently that rpm packaging requirements, seem to demands this from scripts now?

Thanks,

Ray K


More information about the dev mailing list