qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] configure: Require python3 >= 3.5


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] configure: Require python3 >= 3.5
Date: Thu, 09 May 2019 07:45:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Eduardo Habkost <address@hidden> writes:

> The oldest python3 version in distros that will be supported by
> QEMU 4.1 is 3.5.3 (the one in Debian Stretch).  Error out if
> running python3 < 3.5.
>
> We have a .travis.yml job configured to use Python 3.4.  Change
> it to use Python 3.5.
>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
>  configure   | 5 +++--
>  .travis.yml | 2 +-
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/configure b/configure
> index 6b3ed8c532..520c207d66 100755
> --- a/configure
> +++ b/configure
> @@ -1841,8 +1841,9 @@ fi
>  
>  # Note that if the Python conditional here evaluates True we will exit
>  # with status 1 which is a shell 'false' value.
> -if ! $python -c 'import sys; sys.exit(sys.version_info < (2,7))'; then
> -  error_exit "Cannot use '$python', Python 2 >= 2.7 or Python 3 is 
> required." \
> +if ! $python -c 'import sys; sys.exit(sys.version_info < (2,7) or \
> +                                      (3,0) <= sys.version_info < (3,5))'; 
> then
> +  error_exit "Cannot use '$python', Python 2 >= 2.7 or Python 3 >= 3.5 is 
> required." \
>        "Use --python=/path/to/python to specify a supported Python."
>  fi
>  
> diff --git a/.travis.yml b/.travis.yml
> index 66448d99d6..0f6986b3f1 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -211,7 +211,7 @@ matrix:
>          - CONFIG="--target-list=x86_64-softmmu"
>        language: python
>        python:
> -        - "3.4"
> +        - "3.5"
>  
>  
>      - env:

Easily missed, good work.

My grep for similar references to Python versions we don't support found
a few 2.x, x < 7.  Not this patch's problem, of course, but let me show
them anyway:

* scripts/qapi/common.py

        # re.subn() lacks flags support before Python 2.7, use re.compile()

  I'll clean this up.

* tests/image-fuzzer/

  docs/image-fuzzer.txt "Fuzzer requirements" item "17. Should be
  compatible with python version 2.4-2.7".

  Stefan, does the fuzzer need porting to Python 3?

  Two spots in the code are marked as 2.4 work-arounds:

    tests/image-fuzzer/qcow2/fuzz.py:        in Python 2.4
    tests/image-fuzzer/runner.py:        # Python 2.4 doesn't support 'finally' 
and 'except' in the same 'try'

Grep also found tests/vm/netbsd and tests/vm/openbsd pass
--python=python2.7 to configure.  Eduardo, should they be upgraded to a
suitable version of Python 3?  Possibly in your "[PATCH] Deprecate
Python 2 support"?

If yes, then https://wiki.qemu.org/Hosts/BSD also needs an update.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]