qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/5] qapi: support py2 & py3 in parallel
@ 2017-08-31 14:24 Daniel P. Berrange
  2017-08-31 14:24 ` [Qemu-devel] [PATCH v2 1/5] qapi: convert to use python print function instead of statement Daniel P. Berrange
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Daniel P. Berrange @ 2017-08-31 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: Markus Armbruster, Michael Roth, Daniel P. Berrange

Since I claimed that supporting py2 & py3 in parallel would be easy
for QEMU, I figured I ought to actually give it a try to backup that
assertion.

This small patch series is the result of that effort. I tested this
series on Fedora 26 using 2.7.13 and Python 3.6.2.

To test with py3, I hacked config-host.mak to change the PYTHON
variable to point to 'python3' binary, then compared the following
generated content for the files:

   qmp-commands.h qapi-types.h  qapi-visit.h  qapi-event.h
   qmp-marshal.c qapi-types.c qapi-visit.c qapi-event.c
   qmp-introspect.c qmp-introspect.h

with that generated under py2 to see they are identical.

It is possible there's still more bugs hiding that could impact
on 2.6 or earlier versions of 3.x or 2.7.x, so this probably
needs a bit wider testing, but I think the series illustrates
the broad scope of the changes we can expect. Only the need
to adapt to different module import locations adds to the
line count, and that's fairly minimal.

Daniel P. Berrange (5):
  qapi: convert to use python print function instead of statement
  qapi: use items()/values() intead of iteritems()/itervalues()
  qapi: Use OrderedDict from standard library if available
  qapi: adapt to moved location of StringIO module in py3
  qapi: Adapt to moved location of 'maketrans' function in py3

 scripts/qapi.py      | 41 +++++++++++++++++++++++++----------------
 scripts/qapi2texi.py | 11 ++++++-----
 2 files changed, 31 insertions(+), 21 deletions(-)

-- 
2.13.5

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-09-08 14:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-31 14:24 [Qemu-devel] [PATCH v2 0/5] qapi: support py2 & py3 in parallel Daniel P. Berrange
2017-08-31 14:24 ` [Qemu-devel] [PATCH v2 1/5] qapi: convert to use python print function instead of statement Daniel P. Berrange
2017-08-31 14:24 ` [Qemu-devel] [PATCH v2 2/5] qapi: use items()/values() intead of iteritems()/itervalues() Daniel P. Berrange
2017-08-31 14:24 ` [Qemu-devel] [PATCH v2 3/5] qapi: Use OrderedDict from standard library if available Daniel P. Berrange
2017-08-31 16:02   ` Eric Blake
2017-08-31 14:24 ` [Qemu-devel] [PATCH v2 4/5] qapi: adapt to moved location of StringIO module in py3 Daniel P. Berrange
2017-08-31 14:24 ` [Qemu-devel] [PATCH v2 5/5] qapi: Adapt to moved location of 'maketrans' function " Daniel P. Berrange
2017-09-08  9:33 ` [Qemu-devel] [PATCH v2 0/5] qapi: support py2 & py3 in parallel Markus Armbruster
2017-09-08  9:40   ` Daniel P. Berrange
2017-09-08 14:51     ` David Michael

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).