libsolv fails to build with Python 3.13.0a1. /builddir/build/BUILD/libsolv-0.7.25/redhat-linux-build/bindings/python/solv_python.c:4734:24: error: implicit declaration of function ‘PyEval_CallObject’; did you mean ‘PyObject_CallObject’? [-Werror=implicit-function-declaration] 4734 | PyObject *result = PyEval_CallObject((PyObject *)d, args); | ^~~~~~~~~~~~~~~~~ | PyObject_CallObject According to https://docs.python.org/3.13/whatsnew/3.13.html: Remove PyEval_CallObject(), PyEval_CallObjectWithKeywords(): use PyObject_CallNoArgs() or PyObject_Call() instead. Warning: PyObject_Call() positional arguments must be a tuple and must not be NULL, keyword arguments must be a dict or NULL, whereas removed functions checked arguments type and accepted NULL positional and keyword arguments. To replace PyEval_CallObjectWithKeywords(func, NULL, kwargs) with PyObject_Call(), pass an empty tuple as positional arguments using PyTuple_New(0). https://docs.python.org/3.13/whatsnew/3.13.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06560409-libsolv/ For all our attempts to build libsolv with Python 3.13, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/libsolv/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.13: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/ Let us know here if you have any questions. Python 3.13 is planned to be included in Fedora 41. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
libsolv uses swig for generating Python bindings. I believe that when swig is switched to being built using Python 3.13, this issue will be automatically resolved.
What exactly do you mean by "swig is switched to being built using Python 3.13"?
Is this file generated by swig or used as input for swig? https://github.com/openSUSE/libsolv/blob/master/bindings/solv.i The git history suggests it's used as input. It has: PyObject *result = PyEval_CallObject((PyObject *)d, args);
Oh, thanks. I see it now. I assumed, based on the log output in the first comment, that it was really coming from the generated swig code, following swig's IDL. I overlooked this explicit Python construct. I will submit an upstream issue for that or create a PR to fix it there.
For the record, replacing that with: PyObject *result = PyObject_Call((PyObject *)d, args, NULL); Makes the package build. I have not tested it any further than that and I have not checked if this works on all the Python versions libsolv claims to support.
Nice, thanks for trying that.
Upstream PR created: https://github.com/openSUSE/libsolv/pull/551.
Merged upstream.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle. Changing version to 40.
Installable python3-solv is a requirement to install @critical-path-compose, raising priority. Please backport the upstream fix.
Should we wait for you to backport/update or do the backport ourselves?
I will ping our current release master regarding this. There is already an upstream release including the fix, so it should an easy rebase.
Thank you!