[Pkg-libvirt-commits] [Git][libvirt-team/libvirt-python][upstream/latest] New upstream version 9.8.0
Pino Toscano (@pino)
gitlab at salsa.debian.org
Mon Oct 9 06:52:58 BST 2023
Pino Toscano pushed to branch upstream/latest at Libvirt Packaging Team / libvirt-python
Commits:
dcb02270 by Pino Toscano at 2023-10-09T07:50:05+02:00
New upstream version 9.8.0
- - - - -
14 changed files:
- .gitlab-ci.yml
- AUTHORS
- ChangeLog
- PKG-INFO
- VERSION
- examples/event-test.py
- generator.py
- libvirt-override-virConnect.py
- libvirt-override.c
- libvirt-python.spec
- libvirt-qemu-override.c
- libvirt-utils.c
- setup.py
- typewrappers.c
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -30,6 +30,7 @@ stages:
- $PYTHON -m pytest tests
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ;
then
+ unset CFLAGS ;
rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt-python*tar.gz ;
mv rpmbuild/RPMS/x86_64/ libvirt-python-rpms ;
fi
@@ -53,6 +54,7 @@ stages:
- $PYTHON -m pytest tests
- if test -x /usr/bin/rpmbuild && test "$RPM" != "skip" ;
then
+ unset CFLAGS ;
rpmbuild --clean --nodeps --define "_topdir $PWD/rpmbuild" -ta dist/libvirt-python*tar.gz ;
mv rpmbuild/RPMS/x86_64/ libvirt-python-rpms ;
fi
=====================================
AUTHORS
=====================================
@@ -9,4 +9,95 @@ at
The individual contributors are
-
+ Adam Litke <agl at us.ibm.com>
+ Alex Jia <ajia at redhat.com>
+ Andrea Bolognani <abologna at redhat.com>
+ Bastian Germann <bage at linutronix.de>
+ Beraldo Leal <bleal at redhat.com>
+ Boris Fiuczynski <fiuczy at linux.vnet.ibm.com>
+ Brian Rak <brak at gameservers.com>
+ Chris Gunn <chrisgun at microsoft.com>
+ Chris Lalancette <clalance at redhat.com>
+ Claudio Bley <cbley at av-test.de>
+ Cole Robinson <crobinso at redhat.com>
+ Cédric Bosdonnat <cbosdonnat at suse.com>
+ Dan Kenigsberg <danken at redhat.com>
+ Daniel P. Berrange <berrange at redhat.com>
+ Daniel P. Berrangé <berrange at redhat.com>
+ Daniel Veillard <veillard at redhat.com>
+ Diego Elio Pettenò <flameeyes at gmail.com>
+ Dmitry Guryanov <dguryanov at parallels.com>
+ Don Dugger <donald.d.dugger at intel.com>
+ Doug Goldstein <cardoe at cardoe.com>
+ Edgar Kaziakhmedov <edgar.kaziakhmedov at virtuozzo.com>
+ Eric Blake <eblake at redhat.com>
+ Erik Skultety <eskultet at redhat.com>
+ Erik Skultety <eskultety at ridgehead.home.lan>
+ Federico Simoncelli <fsimonce at redhat.com>
+ Giuseppe Scrivano <gscrivan at redhat.com>
+ Guan Qiang <hzguanqiang at corp.netease.com>
+ Guannan Ren <gren at redhat.com>
+ Gui Jianfeng <guijianfeng at cn.fujitsu.com>
+ Guido Günther <agx at sigxcpu.org>
+ Han Han <hhan at redhat.com>
+ Hu Tao <hutao at cn.fujitsu.com>
+ Jason Andryuk <andryuk at aero.org>
+ Jim Fehlig <jfehlig at suse.com>
+ Jim Meyering <meyering at redhat.com>
+ Jiri Denemark <jdenemar at redhat.com>
+ John Ferlan <jferlan at redhat.com>
+ Jonathon Jongsma <jjongsma at redhat.com>
+ Jovanka Gulicoska <jovanka.gulicoska at gmail.com>
+ Ján Tomko <jtomko at redhat.com>
+ KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com>
+ Konstantin Neumoin <kneumoin at virtuozzo.com>
+ Lai Jiangshan <laijs at cn.fujitsu.com>
+ Laine Stump <laine at laine.org>
+ Lei Li <lilei at linux.vnet.ibm.com>
+ Luyao Huang <lhuang at redhat.com>
+ Marc Hartmayer <mhartmay at linux.vnet.ibm.com>
+ Marcelo Cerri <mhcerri at linux.vnet.ibm.com>
+ Marian Neagul <marian at info.uvt.ro>
+ Mark McLoughlin <markmc at redhat.com>
+ Markus Rothe <markusr815 at gmail.com>
+ Martin Kletzander <mkletzan at redhat.com>
+ MATSUDA Daiki <matsudadik at intellilink.co.jp>
+ Matthias Bolte <matthias.bolte at googlemail.com>
+ Michal Privoznik <mprivozn at redhat.com>
+ Miloslav Trmač <mitr at redhat.com>
+ Minoru Usui <usui at mxm.nes.nec.co.jp>
+ Mo Yuxiang <Moyuxiang at huawei.com>
+ Nehal J Wani <nehaljw.kkd1 at gmail.com>
+ Nikunj A. Dadhania <nikunj at linux.vnet.ibm.com>
+ Nir Soffer <nirsof at gmail.com>
+ Osier Yang <jyang at redhat.com>
+ Oskari Saarenmaa <os at ohmu.fi>
+ Pavel Boldin <pboldin at mirantis.com>
+ Pavel Hrdina <phrdina at redhat.com>
+ Peng Hao <peng.hao2 at zte.com.cn>
+ Peter Krempa <pkrempa at redhat.com>
+ Philipp Hahn <hahn at univention.de>
+ Pino Toscano <ptoscano at redhat.com>
+ Prabodh Agarwal <prabodh1194 at users.noreply.github.com>
+ Pradipta Kr. Banerjee <pradipta.banerjee at gmail.com>
+ Qiaowei Ren <qiaowei.ren at intel.com>
+ Radostin Stoyanov <rstoyanov at fedoraproject.org>
+ renlei4 <ren.lei4 at zte.com.cn>
+ Richard W.M. Jones <rjones at redhat.com>
+ Robie Basak <robie.basak at canonical.com>
+ Serge E. Hallyn <serge.hallyn at canonical.com>
+ Sergei Turchanov <turchanov at farpost.com>
+ Stefan Berger <stefanb at us.ibm.com>
+ Taizo ITO <taizo.ito at hde.co.jp>
+ Taku Izumi <izumi.taku at jp.fujitsu.com>
+ Tomoki Sekiyama <tomoki.sekiyama at hds.com>
+ Tomáš Golembiovský <tgolembi at redhat.com>
+ Victor Stinner <victor.stinner at gmail.com>
+ Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
+ Vincent Vanlaer <vincent.vanlaer at skynet.be>
+ w00506750 <hogan.wang at huawei.com>
+ Wojtek Porczyk <woju at invisiblethingslab.com>
+ Wu Zongyong <wuzongyo at mail.ustc.edu.cn>
+ Xavier Fernandez <xav.fernandez at gmail.com>
+ Zeeshan Ali (Khattak) <zeeshanak at gnome.org>
+ Zhou Yimin <zhouyimin at huawei.com>
=====================================
ChangeLog
=====================================
The diff for this file was not included because it is too large.
=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: libvirt-python
-Version: 9.7.0
+Version: 9.8.0
Summary: The libvirt virtualization API python binding
Home-page: http://www.libvirt.org
Maintainer: Libvirt Maintainers
=====================================
VERSION
=====================================
@@ -1 +1 @@
-9.7.0
+9.8.0
=====================================
examples/event-test.py
=====================================
@@ -664,6 +664,10 @@ def myNetworkEventLifecycleCallback(conn: libvirt.virConnect, net: libvirt.virNe
print("myNetworkEventLifecycleCallback: Network %s %s %s" % (
net.name(), NET_EVENTS[event], NET_EVENTS[event][detail]))
+def myNetworkEventMetadataChangeCallback(conn: libvirt.virConnect, dom: libvirt.virNetwork, mtype: int, nsuri: str, opaque: _T) -> None:
+ print("myNetworkEventMetadataChangeCallback: Network %s(%s) changed metadata mtype=%d nsuri=%s" % (
+ dom.name(), dom.ID(), mtype, nsuri))
+
##########################################################################
# Storage pool events
@@ -806,6 +810,7 @@ def main() -> None:
netcallbacks = [
vc.networkEventRegisterAny(None, libvirt.VIR_NETWORK_EVENT_ID_LIFECYCLE, myNetworkEventLifecycleCallback, None),
+ vc.networkEventRegisterAny(None, libvirt.VIR_NETWORK_EVENT_ID_METADATA_CHANGE, myNetworkEventMetadataChangeCallback, None),
]
poolcallbacks = [
=====================================
generator.py
=====================================
@@ -881,6 +881,7 @@ def emit_c_code(module: str) -> None:
wrapper = open(wrapper_file, "w")
wrapper.write("/* Generated by generator.py */\n\n")
+ wrapper.write("#include <stdlib.h>\n")
wrapper.write("#include <Python.h>\n")
wrapper.write("#include <libvirt/%s.h>\n" % (module,))
wrapper.write("#include \"typewrappers.h\"\n")
=====================================
libvirt-override-virConnect.py
=====================================
@@ -299,6 +299,15 @@
cb(self, virNetwork(self, _obj=net), event, detail, opaque)
return 0
+ def _dispatchNetworkEventMetadataChangeCallback(self, dom: 'virNetwork', mtype: int, nsuri: str, cbData: Dict[str, Any]) -> int:
+ """Dispatches event to python user network metadata change event callbacks
+ """
+ cb = cbData["cb"]
+ opaque = cbData["opaque"]
+
+ cb(self, virNetwork(self, _obj=dom), mtype, nsuri, opaque)
+ return 0
+
def networkEventDeregisterAny(self, callbackID: int) -> None:
"""Removes a Network Event Callback. De-registering for a
network callback will disable delivery of this event type"""
=====================================
libvirt-override.c
=====================================
@@ -18,6 +18,9 @@
#define VIR_ENUM_SENTINELS
#define PY_SSIZE_T_CLEAN
+
+#include <stdio.h>
+#include <string.h>
#include <Python.h>
#include <libvirt/libvirt.h>
#include <libvirt/virterror.h>
@@ -7649,6 +7652,59 @@ libvirt_virConnectNetworkEventLifecycleCallback(virConnectPtr conn ATTRIBUTE_UNU
return ret;
}
+#ifdef VIR_NETWORK_EVENT_ID_METADATA_CHANGE
+static int
+libvirt_virConnectNetworkEventMetadataChangeCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
+ virNetworkPtr dom,
+ int type,
+ const char *nsuri,
+ void *opaque)
+{
+ PyObject *pyobj_cbData = (PyObject*)opaque;
+ PyObject *pyobj_dom;
+ PyObject *pyobj_ret = NULL;
+ PyObject *pyobj_conn;
+ PyObject *dictKey;
+ int ret = -1;
+
+ LIBVIRT_ENSURE_THREAD_STATE;
+
+ if (!(dictKey = libvirt_constcharPtrWrap("conn")))
+ goto cleanup;
+ pyobj_conn = PyDict_GetItem(pyobj_cbData, dictKey);
+ Py_DECREF(dictKey);
+
+ /* Create a python instance of this virNetworkPtr */
+ virNetworkRef(dom);
+ if (!(pyobj_dom = libvirt_virNetworkPtrWrap(dom))) {
+ virNetworkFree(dom);
+ goto cleanup;
+ }
+ Py_INCREF(pyobj_cbData);
+
+ /* Call the Callback Dispatcher */
+ pyobj_ret = PyObject_CallMethod(pyobj_conn,
+ (char*)"_dispatchNetworkEventMetadataChangeCallback",
+ (char*)"OisO",
+ pyobj_dom, type, nsuri, pyobj_cbData);
+
+ Py_DECREF(pyobj_cbData);
+ Py_DECREF(pyobj_dom);
+
+ cleanup:
+ if (!pyobj_ret) {
+ DEBUG("%s - ret:%p\n", __FUNCTION__, pyobj_ret);
+ PyErr_Print();
+ } else {
+ Py_DECREF(pyobj_ret);
+ ret = 0;
+ }
+
+ LIBVIRT_RELEASE_THREAD_STATE;
+ return ret;
+}
+#endif /* VIR_NETWORK_EVENT_ID_METADATA_CHANGE */
+
static PyObject *
libvirt_virConnectNetworkEventRegisterAny(PyObject *self ATTRIBUTE_UNUSED,
PyObject *args)
@@ -7680,6 +7736,12 @@ libvirt_virConnectNetworkEventRegisterAny(PyObject *self ATTRIBUTE_UNUSED,
cb = VIR_NETWORK_EVENT_CALLBACK(libvirt_virConnectNetworkEventLifecycleCallback);
break;
+#ifdef VIR_NETWORK_EVENT_ID_METADATA_CHANGE
+ case VIR_NETWORK_EVENT_ID_METADATA_CHANGE:
+ cb = VIR_NETWORK_EVENT_CALLBACK(libvirt_virConnectNetworkEventMetadataChangeCallback);
+ break;
+#endif /* VIR_NETWORK_EVENT_ID_METADATA_CHANGE */
+
case VIR_NETWORK_EVENT_ID_LAST:
break;
}
=====================================
libvirt-python.spec
=====================================
@@ -14,7 +14,7 @@
Summary: The libvirt virtualization API python3 binding
Name: libvirt-python
-Version: 9.7.0
+Version: 9.8.0
Release: 1%{?dist}
Source0: https://libvirt.org/sources/python/%{name}-%{version}.tar.gz
Url: https://libvirt.org
=====================================
libvirt-qemu-override.c
=====================================
@@ -14,6 +14,7 @@
which has over 180 autoconf-style HAVE_* definitions. Shame on them. */
#undef HAVE_PTHREAD_H
+#include <stdio.h>
#include <Python.h>
#include <libvirt/libvirt-qemu.h>
#include <libvirt/virterror.h>
=====================================
libvirt-utils.c
=====================================
@@ -19,6 +19,8 @@
*
*/
+#include <string.h>
+
#include <Python.h>
/* Ugly python defines that, which is also defined in errno.h */
@@ -532,7 +534,7 @@ virPyDictToTypedParams(PyObject *dict,
Py_ssize_t i, size = PySequence_Size(value);
for (i = 0; i < size; i++) {
- PyObject *v = PySequence_ITEM(value, i);
+ PyObject *v = PySequence_GetItem(value, i);
if (virPyDictToTypedParamOne(¶ms, &n, &max,
hints, nhints, keystr, v) < 0)
goto cleanup;
=====================================
setup.py
=====================================
@@ -50,14 +50,10 @@ def have_libvirt_lxc():
def get_pkgconfig_data(args, mod, required=True):
"""Run pkg-config to and return content associated with it"""
- cmd = ["pkg-config"] + args + [f"{mod}"]
- with subprocess.Popen(cmd,
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT,
- universal_newlines=True) as p:
-
- line = p.stdout.readline()
- if line is None or line == "":
+ cmd = ["pkg-config"] + args + [mod]
+ output = subprocess.check_output(cmd, universal_newlines=True)
+ for line in output.splitlines():
+ if line == "":
if required:
args_str = " ".join(args)
raise Exception(f"Cannot determine '{args_str}' from "
@@ -91,6 +87,8 @@ def get_module_lists():
ldflags = get_pkgconfig_data(["--libs-only-L"], "libvirt", False).split()
cflags = get_pkgconfig_data(["--cflags"], "libvirt", False).split()
+ cflags += ["-Wp,-DPy_LIMITED_API=0x03060000"]
+
module = Extension("libvirtmod",
sources=[
"libvirt-override.c",
@@ -203,31 +201,21 @@ class my_sdist(sdist):
def gen_authors(self):
- authors = []
- cmd = "git log --pretty=format:'%aN <%aE>'".split(" ")
- with subprocess.Popen(cmd,
- stdout=subprocess.PIPE,
- stderr=subprocess.DEVNULL,
- universal_newlines=True) as p:
- for line in p.stdout:
- line = " " + line.strip()
- if line not in authors:
- authors.append(line)
-
- authors.sort(key=str.lower)
+ cmd = ["git", "log", "--pretty=format:%aN <%aE>"]
+ output = subprocess.check_output(cmd, universal_newlines=True)
+ git_authors = {line.strip() for line in output.splitlines()}
+ authors = sorted(git_authors, key=str.lower)
+ authors = [" " + author for author in authors]
self._gen_from_in("AUTHORS.in",
"AUTHORS",
"@AUTHORS@",
"\n".join(authors))
def gen_changelog(self):
- cmd = "git log '--pretty=format:%H:%ct %an <%ae>%n%n%s%n%b%n'".split(" ")
- with open("ChangeLog", "w") as f_out, \
- subprocess.Popen(cmd,
- stdout=subprocess.PIPE,
- stderr=subprocess.DEVNULL,
- universal_newlines=True) as p:
- for line in p.stdout:
+ cmd = ["git", "log", "--pretty=format:%H:%ct %an <%ae>%n%n%s%n%b%n"]
+ with open("ChangeLog", "w") as f_out:
+ output = subprocess.check_output(cmd, universal_newlines=True)
+ for line in output.splitlines():
m = re.match(r"([a-f0-9]+):(\d+)\s(.*)", line)
if m:
t = time.gmtime(int(m.group(2)))
=====================================
typewrappers.c
=====================================
@@ -12,6 +12,8 @@
* which has over 180 autoconf-style HAVE_* definitions. Shame on them. */
#undef HAVE_PTHREAD_H
+#include <stdio.h>
+#include <string.h>
#include "typewrappers.h"
#include "libvirt-utils.h"
View it on GitLab: https://salsa.debian.org/libvirt-team/libvirt-python/-/commit/dcb022706fa1b6faef3097a9033b7d99e5333f19
--
View it on GitLab: https://salsa.debian.org/libvirt-team/libvirt-python/-/commit/dcb022706fa1b6faef3097a9033b7d99e5333f19
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-commits/attachments/20231009/ce565169/attachment-0001.htm>
More information about the Pkg-libvirt-commits
mailing list