qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC v4 02/32] qapi: New QAPISchema intermediate


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH RFC v4 02/32] qapi: New QAPISchema intermediate reperesentation
Date: Fri, 04 Sep 2015 13:13:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

"Daniel P. Berrange" <address@hidden> writes:

> On Fri, Sep 04, 2015 at 09:12:09AM +0200, Markus Armbruster wrote:
>> "Daniel P. Berrange" <address@hidden> writes:
>> 
>> > On Thu, Sep 03, 2015 at 04:29:53PM +0200, Markus Armbruster wrote:
>> > Python has a nice tool called pep8 which can apply a
>> > configurable bunch of  style checks, it is probably
>> > worth someone wiring it up to make check in QEMU, since
>> > we have an increasing amount of python code. An exercise
>> > for a motivated reader.....
>> 
>> I've been using pylint (and dear-oh-dear how much pre-existing lint it
>> finds!), wasn't aware of pep8, can throw it in.
>
> The pep8 tool is design around checking the "official" python style
> rules as defined by Guido, and seems to be more commonly used than
> pylint IME.

I'll give the pep8 tool a try.

>> Automatic checking would be nice, but our current code is probably too
>> untidy for that.  Besides, I don't have the time and energy to set it
>> up now.
>
> Yeah, no big deal.
>
>
>> >> +class QAPISchema(object):
>> >> +    def __init__(self, fname):
>> >> +        try:
>> >> + self.exprs = check_exprs(QAPISchemaParser(open(fname, "r")).exprs)
>> >> +        except (QAPISchemaError, QAPIExprError), err:
>> >
>> > Preferred syntax for exceptions these days is
>> >
>> >   except Foo as err
>> >
>> > instead of
>> >
>> >   except Foo, err
>> >
>> > since the former is portable to Python3, should we need to consider
>> > that in future. Again, not a show stopper.
>> 
>> Does it work with Python 2.4?  That's where we're currently stuck.
>
> Urgh, that's a shame, what distro requires such an ancient
> python ? That syntax is only valid from 2.6 onwards.

We bumped our minimum GLib version to 2.22 in May, which *might* have
killed off ancient Python indirectly: GLib 2.22 is from 2009, Python 2.4
is from 2004, and 2.6 if from 2008.

I vaguely remember we went only to 2.22 due to some version of SLES.
Anybody knows the oldest version of SLES still at 2.22, and what version
of Python it provides?

RHEL-5 is out: nominally glib2-2.12 (and python 2.4.3).

RHEL-6 has glib2-2.28 and python 2.6.6.



reply via email to

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