Hello community, here is the log from the commit of package python-libvirt-python for openSUSE:Factory checked in at 2018-07-06 10:43:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-libvirt-python (Old) and /work/SRC/openSUSE:Factory/.python-libvirt-python.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-libvirt-python" Fri Jul 6 10:43:29 2018 rev:12 rq:620923 version:4.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-libvirt-python/python-libvirt-python.changes 2018-05-08 13:37:05.670084691 +0200 +++ /work/SRC/openSUSE:Factory/.python-libvirt-python.new/python-libvirt-python.changes 2018-07-06 10:43:32.867143904 +0200 @@ -1,0 +2,6 @@ +Mon Jun 4 22:43:37 UTC 2018 - jfeh...@suse.com + +- Update to 4.4.0 + - Add all new APIs and constants in libvirt 4.4.0 + +------------------------------------------------------------------- Old: ---- libvirt-python-4.3.0.tar.gz libvirt-python-4.3.0.tar.gz.asc New: ---- libvirt-python-4.4.0.tar.gz libvirt-python-4.4.0.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-libvirt-python.spec ++++++ --- /var/tmp/diff_new_pack.swhKzJ/_old 2018-07-06 10:43:33.607143023 +0200 +++ /var/tmp/diff_new_pack.swhKzJ/_new 2018-07-06 10:43:33.611143018 +0200 @@ -20,7 +20,7 @@ %define srcname libvirt-python Name: python-libvirt-python Url: https://libvirt.org/ -Version: 4.3.0 +Version: 4.4.0 Release: 0 Summary: Library providing a virtualization API License: LGPL-2.1-or-later ++++++ libvirt-python-4.3.0.tar.gz -> libvirt-python-4.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-4.3.0/AUTHORS new/libvirt-python-4.4.0/AUTHORS --- old/libvirt-python-4.3.0/AUTHORS 2018-05-02 14:28:58.000000000 +0200 +++ new/libvirt-python-4.4.0/AUTHORS 2018-06-04 22:32:32.000000000 +0200 @@ -11,6 +11,8 @@ Adam Litke <a...@us.ibm.com> Alex Jia <a...@redhat.com> + Andrea Bolognani <abolo...@redhat.com> + Boris Fiuczynski <fiu...@linux.vnet.ibm.com> Brian Rak <b...@gameservers.com> Chris Lalancette <clala...@redhat.com> Claudio Bley <cb...@av-test.de> @@ -46,6 +48,7 @@ Laine Stump <la...@laine.org> Lei Li <li...@linux.vnet.ibm.com> Luyao Huang <lhu...@redhat.com> + Marc Hartmayer <mhart...@linux.vnet.ibm.com> Marcelo Cerri <mhce...@linux.vnet.ibm.com> Marian Neagul <mar...@info.uvt.ro> Mark McLoughlin <mar...@redhat.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-4.3.0/ChangeLog new/libvirt-python-4.4.0/ChangeLog --- old/libvirt-python-4.3.0/ChangeLog 2018-05-02 14:28:58.000000000 +0200 +++ new/libvirt-python-4.4.0/ChangeLog 2018-06-04 22:32:32.000000000 +0200 @@ -1,3 +1,100 @@ +2018-06-04 Daniel Veillard <veill...@redhat.com> + + Release of libvirt-python-4.4.0 + * setup.py: update for release + + +2018-06-01 Jiri Denemark <jdene...@redhat.com> + + Add support for virConnectBaselineHypervisorCPU + The python bindings for this API cannot be generated because are + generator is not capable of handling string arrays (char **) parameters. + + https://bugzilla.redhat.com/show_bug.cgi?id=1584676 + + Reviewed-by: Ján Tomko <jto...@redhat.com> + + +2018-05-22 Michal Privoznik <mpriv...@redhat.com> + + event-test.py: Sync list of storage lifecycle events + https://bugzilla.redhat.com/show_bug.cgi?id=1578337 + + Since libvirt 3.8.0 we have 6 events: defined, undefined, + started, stopped, created, deleted. However, the last two were + missing in a string list that translates libvirt events (int) + into human readable strings. + + Reviewed-by: Pavel Hrdina <phrd...@redhat.com> + + +2018-05-16 Marc Hartmayer <mhart...@linux.vnet.ibm.com> + + Allow virConnect to be used as a context manager + The libvirt python bindings are now more 'pythonic' as virConnect can + now be used as a context manager. + + For example, it's possible to write the following code: + + with libvirt.open() as conn: + # do something with the connection... + print(conn.listAllDomains()) + + At the end of this with-block the connection will be closed + automatically. + + Reviewed-by: Bjoern Walk <bw...@linux.vnet.ibm.com> + Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> + + +2018-05-16 Marc Hartmayer <mhart...@linux.vnet.ibm.com> + + libvirt-override.py: remove unused import + Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> + Reviewed-by: Bjoern Walk <bw...@linux.vnet.ibm.com> + + +2018-05-16 Boris Fiuczynski <fiu...@linux.vnet.ibm.com> + + libvirt-override.py: fix sparseSendAll + Variable ret is used before assignment. + + + +2018-05-16 Marc Hartmayer <mhart...@linux.vnet.ibm.com> + + libvirt_qemu/lxc: fix a namespace issue + Reviewed-by: Bjoern Walk <bw...@linux.vnet.ibm.com> + Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> + + +2018-05-16 Marc Hartmayer <mhart...@linux.vnet.ibm.com> + + libvirt_qemu/lxc: import 'sys' package + This fixes the pylint [1] warning "E: 25,16: Undefined variable + 'sys' (undefined-variable)". + + [1] https://www.pylint.org/ + + Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> + Reviewed-by: Bjoern Walk <bw...@linux.vnet.ibm.com> + + +2018-05-03 Andrea Bolognani <abolo...@redhat.com> + + maint: Drop autobuild.sh + The Test-AutoBuild project, that this script is supposed + to be used with, hasn't seen any activity in ~7 years; + these days, libvirt-python CI builds are happening on the + Jenkins-based CentOS CI environment under the libvirt + umbrella[1], and in that context the script is not used + at all. + + [1] https://ci.centos.org/view/libvirt/ + + Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> + + 2018-04-24 Daniel P. Berrangé <berra...@redhat.com> git: add config file telling git-publish how to send patches diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-4.3.0/PKG-INFO new/libvirt-python-4.4.0/PKG-INFO --- old/libvirt-python-4.3.0/PKG-INFO 2018-05-02 14:28:58.000000000 +0200 +++ new/libvirt-python-4.4.0/PKG-INFO 2018-06-04 22:32:32.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: libvirt-python -Version: 4.3.0 +Version: 4.4.0 Summary: The libvirt virtualization API python binding Home-page: http://www.libvirt.org Author: Libvirt Maintainers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-4.3.0/examples/event-test.py new/libvirt-python-4.4.0/examples/event-test.py --- old/libvirt-python-4.3.0/examples/event-test.py 2018-03-05 11:58:45.000000000 +0100 +++ new/libvirt-python-4.4.0/examples/event-test.py 2018-06-04 22:28:09.000000000 +0200 @@ -605,6 +605,8 @@ "Undefined", "Started", "Stopped", + "Created", + "Deleted", ) return storageEventStrings[event] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-4.3.0/generator.py new/libvirt-python-4.4.0/generator.py --- old/libvirt-python-4.3.0/generator.py 2018-03-05 11:58:45.000000000 +0100 +++ new/libvirt-python-4.4.0/generator.py 2018-06-04 22:28:09.000000000 +0200 @@ -488,6 +488,7 @@ 'virDomainGetPerfEvents', 'virDomainSetPerfEvents', 'virDomainGetGuestVcpus', + 'virConnectBaselineHypervisorCPU', ) lxc_skip_impl = ( @@ -1828,6 +1829,8 @@ fd.write("# Automatically written part of python bindings for libvirt\n") fd.write("#\n") + fd.write("import sys\n") + fd.write("try:\n") fd.write(" import libvirtmod_qemu\n") fd.write("except ImportError:\n") @@ -1894,7 +1897,7 @@ if ret[0] != "void": fd.write(" if ret is None: raise libvirt.libvirtError('" + name + "() failed')\n") if ret[0] == "virDomainPtr": - fd.write(" __tmp = virDomain(" + conn + ",_obj=ret)\n") + fd.write(" __tmp = libvirt.virDomain(" + conn + ", _obj=ret)\n") fd.write(" return __tmp\n") else: fd.write(" return ret\n") @@ -1951,6 +1954,8 @@ if extra is not None: extra.close() + fd.write("import sys\n") + fd.write("try:\n") fd.write(" import libvirtmod_lxc\n") fd.write("except ImportError:\n") @@ -2007,7 +2012,7 @@ if ret[0] != "void": fd.write(" if ret is None: raise libvirt.libvirtError('" + name + "() failed')\n") if ret[0] == "virDomainPtr": - fd.write(" __tmp = virDomain(" + conn + ",_obj=ret)\n") + fd.write(" __tmp = libvirt.virDomain(" + conn + ", _obj=ret)\n") fd.write(" return __tmp\n") else: fd.write(" return ret\n") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-4.3.0/libvirt-override-api.xml new/libvirt-python-4.4.0/libvirt-override-api.xml --- old/libvirt-python-4.3.0/libvirt-override-api.xml 2018-03-05 11:58:45.000000000 +0100 +++ new/libvirt-python-4.4.0/libvirt-override-api.xml 2018-06-04 22:28:09.000000000 +0200 @@ -717,5 +717,16 @@ <arg name='flags' type='unsigned int' info='extra flags; not used yet, so callers should always pass 0'/> <return type='int' info="dictionary of vcpu data returned by the guest agent"/> </function> + <function name='virConnectBaselineHypervisorCPU' file='python'> + <info>Computes the most feature-rich CPU which is compatible with all given CPUs and can be provided by the specified hypervisor.</info> + <return type='char *' info='XML description of the computed CPU or NULL on error.'/> + <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> + <arg name='emulator' type='const char *' info='path to the emulator binary'/> + <arg name='arch' type='const char *' info='CPU architecture'/> + <arg name='machine' type='const char *' info='machine type'/> + <arg name='virttype' type='const char *' info='virtualization type'/> + <arg name='xmlCPUs' type='const char **' info='array of XML descriptions of CPUs'/> + <arg name='flags' type='unsigned int' info='bitwise-OR of virConnectBaselineCPUFlags'/> + </function> </symbols> </api> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-4.3.0/libvirt-override-virConnect.py new/libvirt-python-4.4.0/libvirt-override-virConnect.py --- old/libvirt-python-4.3.0/libvirt-override-virConnect.py 2018-03-05 11:58:45.000000000 +0100 +++ new/libvirt-python-4.4.0/libvirt-override-virConnect.py 2018-06-04 22:28:09.000000000 +0200 @@ -11,6 +11,12 @@ libvirtmod.virConnectClose(self._o) self._o = None + def __enter__(self): + return self + + def __exit__(self, exc_type_, exc_value_, traceback_): + self.close() + def domainEventDeregister(self, cb): """Removes a Domain Event Callback. De-registering for a domain callback will disable delivery of this event type """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-4.3.0/libvirt-override-virStream.py new/libvirt-python-4.4.0/libvirt-override-virStream.py --- old/libvirt-python-4.3.0/libvirt-override-virStream.py 2018-03-05 11:58:45.000000000 +0100 +++ new/libvirt-python-4.4.0/libvirt-override-virStream.py 2018-06-04 22:28:09.000000000 +0200 @@ -258,7 +258,7 @@ got = handler(self, want, opaque) if type(got) is int and got < 0: self.abort() - raise RuntimeError("sparseSendAll handler returned %d" % ret) + raise RuntimeError("sparseSendAll handler returned %d" % got) if not got: break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-4.3.0/libvirt-override.c new/libvirt-python-4.4.0/libvirt-override.c --- old/libvirt-python-4.3.0/libvirt-override.c 2018-05-02 14:28:39.000000000 +0200 +++ new/libvirt-python-4.4.0/libvirt-override.c 2018-06-04 22:28:09.000000000 +0200 @@ -9708,6 +9708,63 @@ #endif /* LIBVIR_CHECK_VERSION(3, 4, 0) */ +#if LIBVIR_CHECK_VERSION(4, 4, 0) +static PyObject * +libvirt_virConnectBaselineHypervisorCPU(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) +{ + virConnectPtr conn; + PyObject *pyobj_conn; + char *emulator; + char *arch; + char *machine; + char *virttype; + PyObject *list; + unsigned int flags; + char **xmlCPUs = NULL; + int ncpus = 0; + size_t i; + char *cpu; + PyObject *ret = NULL; + + if (!PyArg_ParseTuple(args, (char *)"OzzzzOI:virConnectBaselineHypervisorCPU", + &pyobj_conn, &emulator, &arch, &machine, &virttype, + &list, &flags)) + return NULL; + + conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn); + + if (PyList_Check(list)) { + ncpus = PyList_Size(list); + if (VIR_ALLOC_N(xmlCPUs, ncpus) < 0) + return PyErr_NoMemory(); + + for (i = 0; i < ncpus; i++) { + if (libvirt_charPtrUnwrap(PyList_GetItem(list, i), + &(xmlCPUs[i])) < 0 || + !xmlCPUs[i]) + goto cleanup; + } + } + + LIBVIRT_BEGIN_ALLOW_THREADS; + cpu = virConnectBaselineHypervisorCPU(conn, emulator, arch, machine, virttype, + (const char **)xmlCPUs, ncpus, flags); + LIBVIRT_END_ALLOW_THREADS; + + ret = libvirt_constcharPtrWrap(cpu); + + cleanup: + for (i = 0; i < ncpus; i++) + VIR_FREE(xmlCPUs[i]); + VIR_FREE(xmlCPUs); + VIR_FREE(cpu); + + return ret; +} +#endif /* LIBVIR_CHECK_VERSION(4, 4, 0) */ + + /************************************************************************ * * * The registration stuff * @@ -9941,6 +9998,9 @@ {(char *) "virStreamSendHole", libvirt_virStreamSendHole, METH_VARARGS, NULL}, {(char *) "virStreamRecvFlags", libvirt_virStreamRecvFlags, METH_VARARGS, NULL}, #endif /* LIBVIR_CHECK_VERSION(3, 4, 0) */ +#if LIBVIR_CHECK_VERSION(4, 4, 0) + {(char *) "virConnectBaselineHypervisorCPU", libvirt_virConnectBaselineHypervisorCPU, METH_VARARGS, NULL}, +#endif /* LIBVIR_CHECK_VERSION(4, 4, 0) */ {NULL, NULL, 0, NULL} }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-4.3.0/libvirt-override.py new/libvirt-python-4.4.0/libvirt-override.py --- old/libvirt-python-4.3.0/libvirt-override.py 2018-03-05 11:58:45.000000000 +0100 +++ new/libvirt-python-4.4.0/libvirt-override.py 2018-06-04 22:28:09.000000000 +0200 @@ -16,7 +16,6 @@ if str(cyg_e).count("No module named"): raise lib_e -import types # The root of all libvirt errors. class libvirtError(Exception): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-4.3.0/libvirt-python.spec new/libvirt-python-4.4.0/libvirt-python.spec --- old/libvirt-python-4.3.0/libvirt-python.spec 2018-05-02 14:28:58.000000000 +0200 +++ new/libvirt-python-4.4.0/libvirt-python.spec 2018-06-04 22:32:32.000000000 +0200 @@ -33,7 +33,7 @@ Summary: The libvirt virtualization API python2 binding Name: libvirt-python -Version: 4.3.0 +Version: 4.4.0 Release: 1%{?dist}%{?extra_release} Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz Url: http://libvirt.org diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvirt-python-4.3.0/setup.py new/libvirt-python-4.4.0/setup.py --- old/libvirt-python-4.3.0/setup.py 2018-05-02 14:28:39.000000000 +0200 +++ new/libvirt-python-4.4.0/setup.py 2018-06-04 22:28:44.000000000 +0200 @@ -334,7 +334,7 @@ _c_modules, _py_modules = get_module_lists() setup(name = 'libvirt-python', - version = '4.3.0', + version = '4.4.0', url = 'http://www.libvirt.org', maintainer = 'Libvirt Maintainers', maintainer_email = 'libvir-l...@redhat.com',