Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-fann2 for openSUSE:Factory checked in at 2026-11-19 16:56:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-fann2 (Old) and /work/SRC/openSUSE:Factory/.python-fann2.new.1251 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-fann2" Thu Nov 19 16:56:56 2026 rev:5 rq:1398643 version:1.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-fann2/python-fann2.changes 2025-05-27 18:42:57.982510870 +0200 +++ /work/SRC/openSUSE:Factory/.python-fann2.new.1251/python-fann2.changes 2026-11-19 16:58:29.553373013 +0100 @@ -1,0 +2,7 @@ +Mon Nov 16 13:55:00 UTC 2026 - Dominique Leuenberger <[email protected]> + +- Add python-fann2-swig-py3.patch: replace obsolete PyInt_* calls + with PyLong_* in fann2/fann2.i for Python 3. +- Normalize CRLF line endings in %prep before applying patch. + +------------------------------------------------------------------- New: ---- python-fann2-swig-py3.patch ----------(New B)---------- New: - Add python-fann2-swig-py3.patch: replace obsolete PyInt_* calls with PyLong_* in fann2/fann2.i for Python 3. ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-fann2.spec ++++++ --- /var/tmp/diff_new_pack.wrW9Bw/_old 2026-11-19 16:58:30.281403873 +0100 +++ /var/tmp/diff_new_pack.wrW9Bw/_new 2026-11-19 16:58:30.283403957 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-fann2 # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ Group: Development/Languages/Python URL: https://github.com/FutureLinkCorporation/fann2 Source: https://github.com/FutureLinkCorporation/fann2/archive/refs/tags/%{version}.tar.gz +# PATCH-FIX-UPSTREAM python-fann2-swig-py3.patch -- define PyInt compatibility macros for Python 3.13+ +Patch0: python-fann2-swig-py3.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} @@ -49,6 +51,8 @@ %prep %setup -q -n fann2-%{version} +find . -type f -exec sed -i 's/\r$//' {} + +%patch -P 0 -p1 %build export CFLAGS="%{optflags}" ++++++ python-fann2-swig-py3.patch ++++++ --- a/fann2/fann2.i 2026-11-16 15:14:48.697869672 +0100 +++ b/fann2/fann2.i 2026-11-16 15:14:48.713728716 +0100 @@ -173,7 +173,7 @@ %import "../include/fann_error.h" %import "../include/fann_activation.h" -HELPER_ARRAY_TEMPLATE( FANN::helper_array, unsigned int, PyInt_AsLong , PyInt_FromLong , long ); +HELPER_ARRAY_TEMPLATE( FANN::helper_array, unsigned int, PyLong_AsLong , PyLong_FromLong , long ); HELPER_ARRAY_TEMPLATE( FANN::helper_array, fann_type , PyFloat_AsDouble, PyFloat_FromDouble, double ); HELPER_ARRAY_ARRAY_TEMPLATE( FANN::helper_array_array, fann_type , PyFloat_AsDouble, PyFloat_FromDouble, double ); @@ -205,10 +205,10 @@ PyObject *from_neuron = PySequence_GetItem(o,0); PyObject *to_neuron = PySequence_GetItem(o,1); PyObject *weight = PySequence_GetItem(o,2); - if (PyInt_Check(from_neuron) && PyInt_Check(to_neuron) && + if (PyLong_Check(from_neuron) && PyLong_Check(to_neuron) && PyNumber_Check(weight)) { - $1->array[i].from_neuron = (unsigned int) PyInt_AsLong(from_neuron); - $1->array[i].to_neuron = (unsigned int) PyInt_AsLong(to_neuron); + $1->array[i].from_neuron = (unsigned int) PyLong_AsLong(from_neuron); + $1->array[i].to_neuron = (unsigned int) PyLong_AsLong(to_neuron); $1->array[i].weight = (fann_type) PyFloat_AsDouble(weight); } else { PyErr_SetString(PyExc_ValueError,"Connection elements must be (int, int, float)"); @@ -239,8 +239,8 @@ for (unsigned int i = 0; i < $1->array_len; i++) { PyObject *o = PyTuple_Pack (3, - PyInt_FromLong( (long) ($1->array[i].from_neuron)), - PyInt_FromLong( (long) ($1->array[i].to_neuron)), + PyLong_FromLong( (long) ($1->array[i].from_neuron)), + PyLong_FromLong( (long) ($1->array[i].to_neuron)), PyFloat_FromDouble( (double) ($1->array[i].weight))); PyList_SetItem($result,i,o); }
