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: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] configure: Require python3 >= 3.5
Date: Thu, 9 May 2019 11:24:25 +0200
User-agent: Mutt/1.11.3 (2019-02-01)

Am 09.05.2019 um 07:45 hat Markus Armbruster geschrieben:
> Eduardo Habkost <address@hidden> writes:
> > 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:

I'm sure that we have a few more instances of Python 2 compatibility
code in qemu-iotests that can be removed after this is merged. These are
what I could find quickly, but there are probably more:

    242:        # Read one byte in a way compatible with Python 2
    iotests.py:        # Python < 3.4 needs to know not to add whitespace when 
pretty-printing:

    149:from __future__ import print_function
    165:from __future__ import print_function
    iotests.py:from __future__ import print_function
    nbd-fault-injector.py:from __future__ import print_function
    qcow2.py:from __future__ import print_function
    qed.py:from __future__ import print_function

    044:if sys.version_info.major == 2:
    163:if sys.version_info.major == 2:
    iotests.py:    if sys.version_info.major >= 3:
    iotests.py:        if sys.version_info.major >= 3:
    nbd-fault-injector.py:if sys.version_info.major >= 3:

I'm planning to take care of the qemu-iotests ones.

Also, with Python 3.5 as the new minimum, I think I'd like to add type
hints to iotests.py and possibly the qemu package (for QEMUQtestMachine
and friends). The syntax isn't as nice as if we could go straight to
3.6, but still, finally some type checking instead of running into
stupid runtime bugs!

Kevin



reply via email to

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