GNOME Bugzilla – Bug 684643
python3 support
Last modified: 2013-03-30 14:58:15 UTC
libxml2 lacks python3 support.
I don't know if the whole API is covered, but there's the GObject Introspection bindings which are supposed to work with Python 3: $ python3 Python 3.2.3 (default, Jun 8 2012, 05:40:07) [GCC 4.6.3 20120306 (Red Hat 4.6.3-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from gi.repository import libxml2 >>> libxml2 <gi.module.DynamicModule 'libxml2' from b'/usr/lib64/girepository-1.0/libxml2-2.0.typelib'> Isn't that enough?
http://stackoverflow.com/questions/6573819/install-libxml2-bindings-for-python3 Currently in ubuntu we use python3-lxml
double check, and maybe everything is ok these days.
It took 3 days of work but I have just commited the changes needed for libxml2 to build and work on python3 while not changing for python2. It is in git, it will be in the next release, see https://git.gnome.org/browse/libxml2/commit/?id=b8e3f80da742404bffbec2a56c0a91b829132b6f and the 6 following patches Daniel