diff mbox series

[ovs-dev,2/2] Bump required python version to 3.6.

Message ID 166066161267.359290.3823703887873743274.stgit@dceara.remote.csb
State Accepted
Headers show
Series [ovs-dev,1/2] tests: Fix tests/check_acl_log.py outputs. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes success github build: passed

Commit Message

Dumitru Ceara Aug. 16, 2022, 2:53 p.m. UTC
We currently use f-strings in some of the test tools.  These are
supported only starting with python version 3.6.

Given that python version 3.4 is EOL since March 2019, it's about
time to bump the required version to 3.6:

https://www.python.org/downloads/release/python-3410/

Signed-off-by: Dumitru Ceara <dceara@redhat.com>
---
V2:
- Added patch 2/2 that bumps required python version to 3.6.
---
 NEWS      |    1 +
 m4/ovn.m4 |    8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

Comments

Mark Michelson Aug. 19, 2022, 1:17 p.m. UTC | #1
Acked-by: Mark Michelson <mmichels@redhat.com>

On 8/16/22 10:53, Dumitru Ceara wrote:
> We currently use f-strings in some of the test tools.  These are
> supported only starting with python version 3.6.
> 
> Given that python version 3.4 is EOL since March 2019, it's about
> time to bump the required version to 3.6:
> 
> https://www.python.org/downloads/release/python-3410/
> 
> Signed-off-by: Dumitru Ceara <dceara@redhat.com>
> ---
> V2:
> - Added patch 2/2 that bumps required python version to 3.6.
> ---
>   NEWS      |    1 +
>   m4/ovn.m4 |    8 ++++----
>   2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/NEWS b/NEWS
> index de8bc6a8b..9d0fc565f 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -15,6 +15,7 @@ Post v22.06.0
>       options (which will be available in OVS 2.18).
>     - Removed possibility of disabling logical datapath groups.
>     - Removed the copying of SB's Chassis other_config into external_ids.
> +  - Bump python version required for building OVN to 3.6.
>   
>   OVN v22.06.0 - 03 Jun 2022
>   --------------------------
> diff --git a/m4/ovn.m4 b/m4/ovn.m4
> index 2909914fb..bc2ac1aef 100644
> --- a/m4/ovn.m4
> +++ b/m4/ovn.m4
> @@ -300,7 +300,7 @@ dnl Checks for valgrind/valgrind.h.
>   AC_DEFUN([OVN_CHECK_VALGRIND],
>     [AC_CHECK_HEADERS([valgrind/valgrind.h])])
>   
> -dnl Checks for Python 3.4 or later.
> +dnl Checks for Python 3.6 or later.
>   AC_DEFUN([OVN_CHECK_PYTHON3],
>     [AC_CACHE_CHECK(
>        [for Python 3 (version 3.4 or later)],
> @@ -309,13 +309,13 @@ AC_DEFUN([OVN_CHECK_PYTHON3],
>           ovs_cv_python3=$PYTHON3
>         else
>           ovs_cv_python3=no
> -        for binary in python3 python3.4 python3.5 python3.6 python3.7; do
> +        for binary in python3 python3.4 python3.5 python3.6 python3.7 python3.8 python3.9 python 3.10; do
>             ovs_save_IFS=$IFS; IFS=$PATH_SEPARATOR
>             for dir in $PATH; do
>               IFS=$ovs_save_IFS
>               test -z "$dir" && dir=.
>               if test -x "$dir"/"$binary" && "$dir"/"$binary" -c 'import sys
> -if sys.hexversion >= 0x03040000 and sys.hexversion < 0x04000000:
> +if sys.hexversion >= 0x03060000 and sys.hexversion < 0x04000000:
>       sys.exit(0)
>   else:
>       sys.exit(1)'; then
> @@ -326,7 +326,7 @@ else:
>           done
>         fi])
>      if test "$ovs_cv_python3" = no; then
> -     AC_MSG_ERROR([Python 3.4 or later is required but not found in $PATH, please install it or set $PYTHON3 to point to it])
> +     AC_MSG_ERROR([Python 3.6 or later is required but not found in $PATH, please install it or set $PYTHON3 to point to it])
>      fi
>      AC_ARG_VAR([PYTHON3])
>      PYTHON3=$ovs_cv_python3])
>
diff mbox series

Patch

diff --git a/NEWS b/NEWS
index de8bc6a8b..9d0fc565f 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@  Post v22.06.0
     options (which will be available in OVS 2.18).
   - Removed possibility of disabling logical datapath groups.
   - Removed the copying of SB's Chassis other_config into external_ids.
+  - Bump python version required for building OVN to 3.6.
 
 OVN v22.06.0 - 03 Jun 2022
 --------------------------
diff --git a/m4/ovn.m4 b/m4/ovn.m4
index 2909914fb..bc2ac1aef 100644
--- a/m4/ovn.m4
+++ b/m4/ovn.m4
@@ -300,7 +300,7 @@  dnl Checks for valgrind/valgrind.h.
 AC_DEFUN([OVN_CHECK_VALGRIND],
   [AC_CHECK_HEADERS([valgrind/valgrind.h])])
 
-dnl Checks for Python 3.4 or later.
+dnl Checks for Python 3.6 or later.
 AC_DEFUN([OVN_CHECK_PYTHON3],
   [AC_CACHE_CHECK(
      [for Python 3 (version 3.4 or later)],
@@ -309,13 +309,13 @@  AC_DEFUN([OVN_CHECK_PYTHON3],
         ovs_cv_python3=$PYTHON3
       else
         ovs_cv_python3=no
-        for binary in python3 python3.4 python3.5 python3.6 python3.7; do
+        for binary in python3 python3.4 python3.5 python3.6 python3.7 python3.8 python3.9 python 3.10; do
           ovs_save_IFS=$IFS; IFS=$PATH_SEPARATOR
           for dir in $PATH; do
             IFS=$ovs_save_IFS
             test -z "$dir" && dir=.
             if test -x "$dir"/"$binary" && "$dir"/"$binary" -c 'import sys
-if sys.hexversion >= 0x03040000 and sys.hexversion < 0x04000000:
+if sys.hexversion >= 0x03060000 and sys.hexversion < 0x04000000:
     sys.exit(0)
 else:
     sys.exit(1)'; then
@@ -326,7 +326,7 @@  else:
         done
       fi])
    if test "$ovs_cv_python3" = no; then
-     AC_MSG_ERROR([Python 3.4 or later is required but not found in $PATH, please install it or set $PYTHON3 to point to it])
+     AC_MSG_ERROR([Python 3.6 or later is required but not found in $PATH, please install it or set $PYTHON3 to point to it])
    fi
    AC_ARG_VAR([PYTHON3])
    PYTHON3=$ovs_cv_python3])