[libvirt] [PATCH python 00/15] Initial work porting to python3

Daniel P. Berrange berrange at redhat.com
Tue Dec 3 16:36:36 UTC 2013


From: "Daniel P. Berrange" <berrange at redhat.com>

This series starts, but does not complete, the work to port over
to build with python3. This involves making the code generator
able to run under python3, as well as making it generate code
which is python3 compatible. And of course the examples are fixed
up too

Some things still todo

 - Deal with String vs Unicode problems - Python2 defaulted
   to C strings, while Python3 defaults to Unicode
 - Deal with Int vs Long problems - Python2 had two integer
   types, Int & Long, but Python3 only has one, Long.
 - Fix examples to not use libxml2 since it isn't compiled
   for Python3 in Fedora.
 - Probably more bugs to find...

Daniel P. Berrange (15):
  generator: Don't use 'list' as a variable name
  generator: Remove string.lower(XXX) with XXX.lower()
  generator: Invoke print("...") instead of print "..."
  generator: Cast iterators to a list() explicitly
  generator: Remove use of 'has_key' function
  generator: Update to use sort() 'key' param
  generator: Remove use of string.replace and string.find functions
  generator: Sort enums and functions when generating code
  setup: Fix exception catching syntax
  examples: Invoke print("...") instead of print "..."
  examples: Fix exception catching syntax
  examples: Ensure we write bytes to the self-pipe
  generator: Fix exception catching syntax in generated code
  override: Fix native module registration to work with Python3
  override: Fix exception catching syntax

 examples/consolecallback.py   |   6 +-
 examples/dominfo.py           |  14 +-
 examples/domrestore.py        |  17 ++-
 examples/domsave.py           |  15 +-
 examples/domstart.py          |  19 ++-
 examples/esxlist.py           |  14 +-
 examples/event-test.py        |  74 +++++-----
 examples/topology.py          |  14 +-
 generator.py                  | 328 +++++++++++++++++++++---------------------
 libvirt-lxc-override.c        |  73 +++++++---
 libvirt-override-virStream.py |   6 +-
 libvirt-override.c            |  75 +++++++---
 libvirt-override.py           |   4 +-
 libvirt-qemu-override.c       |  73 +++++++---
 setup.py                      |   2 +-
 15 files changed, 417 insertions(+), 317 deletions(-)

-- 
1.8.3.1




More information about the libvir-list mailing list