qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-devel@nongnu.org, "Lukáš Doktor" <ldoktor@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/3] qemu.py: Use items() instead of iteritems()
Date: Mon, 12 Mar 2018 22:25:15 -0300	[thread overview]
Message-ID: <20180313012515.GZ3417@localhost.localdomain> (raw)
In-Reply-To: <f8185612-019e-aa2d-7c45-bd1923099f1f@amsat.org>

On Tue, Mar 13, 2018 at 12:02:39AM +0100, Philippe Mathieu-Daudé wrote:
> On 03/12/2018 07:55 PM, Eduardo Habkost wrote:
> > items() is less efficient on Python 2.x, but makes the code work
> > on both Python 2 and Python 3.
> > 
> > Cc: Lukáš Doktor <ldoktor@redhat.com>
> > Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > Cc: Cleber Rosa <crosa@redhat.com>
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > ---
> >  scripts/qemu.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/qemu.py b/scripts/qemu.py
> > index 305a946562..08a3e9af5a 100644
> > --- a/scripts/qemu.py
> > +++ b/scripts/qemu.py
> > @@ -277,7 +277,7 @@ class QEMUMachine(object):
> >      def qmp(self, cmd, conv_keys=True, **args):
> >          '''Invoke a QMP command and return the response dict'''
> >          qmp_args = dict()
> > -        for key, value in args.iteritems():
> > +        for key, value in args.items():
> >              if conv_keys:
> >                  qmp_args[key.replace('_', '-')] = value
> >              else:
> > 
> 
> http://lists.nongnu.org/archive/html/qemu-devel/2017-12/msg04046.html

Oops, that series had fallen through the cracks, sorry!

I remember merging a series with fixes for Python 3, but now I
see there were two separate series: "Support building with py2 or
py3¨ (already merged), and yours ("iotests: python3
compatibility¨).

-- 
Eduardo

  reply	other threads:[~2018-03-13  1:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12 18:55 [Qemu-devel] [PATCH 0/3] scripts: Python 3 compatibility fixes Eduardo Habkost
2018-03-12 18:55 ` [Qemu-devel] [PATCH 1/3] qemu.py: Use items() instead of iteritems() Eduardo Habkost
2018-03-12 19:24   ` Daniel P. Berrangé
2018-03-12 23:02   ` Philippe Mathieu-Daudé
2018-03-13  1:25     ` Eduardo Habkost [this message]
2018-03-12 18:55 ` [Qemu-devel] [PATCH 2/3] qmp.py: Encode json data before sending Eduardo Habkost
2018-03-12 19:24   ` Daniel P. Berrangé
2018-03-12 23:03   ` Philippe Mathieu-Daudé
2018-03-12 18:55 ` [Qemu-devel] [PATCH 3/3] device-crash-test: Use 'python' binary Eduardo Habkost
2018-03-12 19:24   ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180313012515.GZ3417@localhost.localdomain \
    --to=ehabkost@redhat.com \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=ldoktor@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).