]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Require Python 3.2.4 for test scripts 961/head
authorGreg Hudson <ghudson@mit.edu>
Thu, 1 Aug 2019 21:55:42 +0000 (17:55 -0400)
committerGreg Hudson <ghudson@mit.edu>
Fri, 2 Aug 2019 19:23:46 +0000 (15:23 -0400)
In Python 3 releases before 3.2.4, the subprocess.Popen.communicate
method does not accept string inputs when universal_newlines=True is
set (see https://bugs.python.org/issue16903).

Also substitute the minimum Python version displayed by "make
check-pytests-no" from configure.ac to help keep it in sync with the
minimum version we check for.

src/Makefile.in
src/configure.ac

index 31135ffccd87a9b661c9b86f0c39be95e58e1e42..691f86c1ee4dffb68268bb91dca0b0539af7133f 100644 (file)
@@ -494,8 +494,9 @@ check-prerecurse: runenv.py
 check-unix: check-lmdb-$(HAVE_LMDB)
        cat $(SKIPTESTS)
 
+MINPYTHON = @PYTHON_MINVERSION@
 check-pytests-no: check-postrecurse
-       @echo 'Skipped python test scripts: python 3 required' >> \
+       @echo 'Skipped python test scripts: python $(MINPYTHON) required' >> \
                $(SKIPTESTS)
 
 check-cmocka-no: check-postrecurse
index b7198c2b2b8923762ab8c33af06a78e1595f76fd..171bad4bf4dc6bd49ead2019be79b1c0642cac16 100644 (file)
@@ -1142,14 +1142,18 @@ else
 fi
 AC_SUBST(HAVE_RUNTEST)
 
-# For Python tests.
+# For Python tests.  Python version 3.2.4 is required as prior
+# versions do not accept string input to subprocess.Popen.communicate
+# when universal_newlines is set.
+PYTHON_MINVERSION=3.2.4
+AC_SUBST(PYTHON_MINVERSION)
 AC_CHECK_PROG(PYTHON,python3,python3)
 if test x"$PYTHON" = x; then
        AC_CHECK_PROG(PYTHON,python,python)
 fi
 HAVE_PYTHON=no
 if test x"$PYTHON" != x; then
-       wantver="(sys.hexversion >= 0x3000000)"
+       wantver="(sys.hexversion >= 0x30204F0)"
        if "$PYTHON" -c "import sys; sys.exit(not $wantver and 1 or 0)"; then
                HAVE_PYTHON=yes
        fi