Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package net-snmp for openSUSE:Factory 
checked in at 2022-09-30 17:57:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/net-snmp (Old)
 and      /work/SRC/openSUSE:Factory/.net-snmp.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "net-snmp"

Fri Sep 30 17:57:10 2022 rev:105 rq:1006703 version:5.9.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/net-snmp/net-snmp.changes        2022-09-22 
14:49:44.302407823 +0200
+++ /work/SRC/openSUSE:Factory/.net-snmp.new.2275/net-snmp.changes      
2022-09-30 17:57:24.405198885 +0200
@@ -1,0 +2,7 @@
+Tue Sep 27 14:56:27 UTC 2022 - Alexander Bergmann <abergm...@suse.com>
+
+- Fixed python2 backward compability.
+  add:
+  * net-snmp-5.9.3-fixed-python2-bindings.patch
+
+-------------------------------------------------------------------

New:
----
  net-snmp-5.9.3-fixed-python2-bindings.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ net-snmp.spec ++++++
--- /var/tmp/diff_new_pack.DwsT0R/_old  2022-09-30 17:57:25.197200578 +0200
+++ /var/tmp/diff_new_pack.DwsT0R/_new  2022-09-30 17:57:25.201200587 +0200
@@ -63,6 +63,7 @@
 Patch13:        net-snmp-5.9.1-suse-systemd-service-files.patch
 Patch14:        net-snmp-5.9.2-fix-create-v3-user-outfile.patch
 Patch15:        net-snmp-5.9.1-subagent-set-response.patch
+Patch16:        net-snmp-5.9.3-fixed-python2-bindings.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  autoconf

++++++ net-snmp-5.9.3-fixed-python2-bindings.patch ++++++
diff -Nurp net-snmp-5.9.3-orig/python/netsnmp/client_intf.c 
net-snmp-5.9.3/python/netsnmp/client_intf.c
--- net-snmp-5.9.3-orig/python/netsnmp/client_intf.c    2022-07-13 
23:14:14.000000000 +0200
+++ net-snmp-5.9.3/python/netsnmp/client_intf.c 2022-09-23 16:21:44.040588303 
+0200
@@ -872,9 +872,16 @@ py_netsnmp_attr_string(PyObject *obj, co
   if (obj && attr_name && PyObject_HasAttrString(obj, attr_name)) {
     PyObject *attr = PyObject_GetAttrString(obj, attr_name);
     if (attr) {
+#if PY_MAJOR_VERSION >= 3
       *val = PyUnicode_AsUTF8AndSize(attr, len);
       Py_DECREF(attr);
       return 0;
+#else
+      int retval;
+      retval = PyBytes_AsStringAndSize(attr, val, len);
+      Py_DECREF(attr);
+      return retval;
+#endif
     }
   }
 

Reply via email to