This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new ed1711e  THRIFT-5087 test/test.py fails with "AssertionError: Python 
3.3 or later is required for proper operation." Client: Python Patch: Jano 
Svitok
ed1711e is described below

commit ed1711e8611a2acc89b178a1cc0924b215e07a4c
Author: Jano Svitok <[email protected]>
AuthorDate: Tue Mar 10 22:39:18 2020 +0100

    THRIFT-5087 test/test.py fails with "AssertionError: Python 3.3 or later is 
required for proper operation."
    Client: Python
    Patch: Jano Svitok
    
    This closes #2055
    
    THRIFT-5087: Show features log, check log presence
    THRIFT-5087: Revert/Improve PR1995 (commit f8b004081da)
    
    Make the condition work both
    a) when both python2 and python3 are installed
    b) when only python3 is installed
    
    Check also python 3.8 when searching for 3.x
---
 build/docker/scripts/cross-test.sh | 7 ++++++-
 configure.ac                       | 8 ++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/build/docker/scripts/cross-test.sh 
b/build/docker/scripts/cross-test.sh
index 43581a5..0b6748a 100755
--- a/build/docker/scripts/cross-test.sh
+++ b/build/docker/scripts/cross-test.sh
@@ -10,7 +10,12 @@ make cross$1
 
 RET=$?
 if [ $RET -ne 0 ]; then
-  cat test/log/unexpected_failures.log
+  if [ -f "test/features/log/unexpected_failures.log" ]; then 
+    cat "test/features/log/unexpected_failures.log"
+  fi
+  if [ -f "test/log/unexpected_failures.log" ]; then
+    cat "test/log/unexpected_failures.log"
+  fi
 fi
 
 exit $RET
diff --git a/configure.ac b/configure.ac
index 99c3c9c..35f43ee 100755
--- a/configure.ac
+++ b/configure.ac
@@ -306,11 +306,15 @@ AM_CONDITIONAL(WITH_TWISTED_TEST, [test "$have_trial" = 
"yes"])
 have_py3="no"
 AX_THRIFT_LIB(py3, [Py3], yes)
 if test "$with_py3" = "yes"; then
-  if $PYTHON --version 2>&1 | grep -q "Python 3"; then
-    AC_PATH_PROGS([PYTHON3], [python3 python3.7 python37 python3.6 python36 
python3.5 python35 python3.4 python34])
+  # if $PYTHON is 2.x then search for python 3. otherwise, $PYTHON is already 
3.x
+  if $PYTHON --version 2>&1 | grep -q "Python 2"; then
+    AC_PATH_PROGS([PYTHON3], [python3 python3.8 python38 python3.7 python37 
python3.6 python36 python3.5 python35 python3.4 python34])
     if test -n "$PYTHON3"; then
       have_py3="yes"
     fi
+  elif $PYTHON --version 2>&1 | grep -q "Python 3"; then
+    have_py3="yes"
+    PYTHON3=$PYTHON
   fi
 fi
 AM_CONDITIONAL(WITH_PY3, [test "$have_py3" = "yes"])

Reply via email to