Control: tags 1084096 + patch Control: tags 1084096 + pending Dear maintainer,
I've prepared an NMU for libxml2 (versioned as 2.12.7+dfsg+really2.9.14-0.2) and uploaded it to DELAYED/10. Please feel free to tell me if I should delay it longer. I expect the Python 3.13 transition to kick off very soon, raising this bug to RC, and I plan to reschedule this to 0-day, if that happens. Regards.
diff -Nru libxml2-2.12.7+dfsg+really2.9.14/debian/changelog libxml2-2.12.7+dfsg+really2.9.14/debian/changelog --- libxml2-2.12.7+dfsg+really2.9.14/debian/changelog 2024-09-26 08:15:36.000000000 -0700 +++ libxml2-2.12.7+dfsg+really2.9.14/debian/changelog 2024-11-06 17:11:20.000000000 -0800 @@ -1,3 +1,10 @@ +libxml2 (2.12.7+dfsg+really2.9.14-0.2) unstable; urgency=medium + + * Non-maintainer upload. + * Patch: Python 3.13 support. (Closes: #1084096) + + -- Stefano Rivera <stefa...@debian.org> Wed, 06 Nov 2024 17:11:20 -0800 + libxml2 (2.12.7+dfsg+really2.9.14-0.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru libxml2-2.12.7+dfsg+really2.9.14/debian/patches/python3.13.patch libxml2-2.12.7+dfsg+really2.9.14/debian/patches/python3.13.patch --- libxml2-2.12.7+dfsg+really2.9.14/debian/patches/python3.13.patch 1969-12-31 16:00:00.000000000 -0800 +++ libxml2-2.12.7+dfsg+really2.9.14/debian/patches/python3.13.patch 2024-11-06 17:11:20.000000000 -0800 @@ -0,0 +1,160 @@ +From: Nick Wellnhofer <wellnho...@aevum.de> +Date: Mon, 29 Aug 2022 17:21:19 +0200 +Subject: Migrate from PyEval_ to PyObject_ + +PyEval_ functions are deprecated. + +Fixes #208. + +Bug-Upstream: https://gitlab.gnome.org/GNOME/libxml2/-/issues/208 +Bug-Debian: https://bugs.debian.org/1084096 +--- + python/libxml.c | 34 +++++++++++++++++----------------- + 1 file changed, 17 insertions(+), 17 deletions(-) + +diff --git a/python/libxml.c b/python/libxml.c +index 65a51af..3788977 100644 +--- a/python/libxml.c ++++ b/python/libxml.c +@@ -257,7 +257,7 @@ xmlPythonFileCloseRaw (void * context) { + #endif + file = (PyObject *) context; + if (file == NULL) return(-1); +- ret = PyEval_CallMethod(file, (char *) "close", (char *) "()"); ++ ret = PyObject_CallMethod(file, (char *) "close", (char *) "()"); + if (ret != NULL) { + Py_DECREF(ret); + } +@@ -287,7 +287,7 @@ xmlPythonFileReadRaw (void * context, char * buffer, int len) { + #endif + file = (PyObject *) context; + if (file == NULL) return(-1); +- ret = PyEval_CallMethod(file, (char *) "read", (char *) "(i)", len); ++ ret = PyObject_CallMethod(file, (char *) "read", (char *) "(i)", len); + if (ret == NULL) { + printf("xmlPythonFileReadRaw: result is NULL\n"); + return(-1); +@@ -352,7 +352,7 @@ xmlPythonFileRead (void * context, char * buffer, int len) { + #endif + file = (PyObject *) context; + if (file == NULL) return(-1); +- ret = PyEval_CallMethod(file, (char *) "io_read", (char *) "(i)", len); ++ ret = PyObject_CallMethod(file, (char *) "io_read", (char *) "(i)", len); + if (ret == NULL) { + printf("xmlPythonFileRead: result is NULL\n"); + return(-1); +@@ -420,10 +420,10 @@ xmlPythonFileWrite (void * context, const char * buffer, int len) { + string = PY_IMPORT_STRING_SIZE(buffer, len); + if (string == NULL) return(-1); + if (PyObject_HasAttrString(file, (char *) "io_write")) { +- ret = PyEval_CallMethod(file, (char *) "io_write", (char *) "(O)", ++ ret = PyObject_CallMethod(file, (char *) "io_write", (char *) "(O)", + string); + } else if (PyObject_HasAttrString(file, (char *) "write")) { +- ret = PyEval_CallMethod(file, (char *) "write", (char *) "(O)", ++ ret = PyObject_CallMethod(file, (char *) "write", (char *) "(O)", + string); + } + Py_DECREF(string); +@@ -459,9 +459,9 @@ xmlPythonFileClose (void * context) { + file = (PyObject *) context; + if (file == NULL) return(-1); + if (PyObject_HasAttrString(file, (char *) "io_close")) { +- ret = PyEval_CallMethod(file, (char *) "io_close", (char *) "()"); ++ ret = PyObject_CallMethod(file, (char *) "io_close", (char *) "()"); + } else if (PyObject_HasAttrString(file, (char *) "flush")) { +- ret = PyEval_CallMethod(file, (char *) "flush", (char *) "()"); ++ ret = PyObject_CallMethod(file, (char *) "flush", (char *) "()"); + } + if (ret != NULL) { + Py_DECREF(ret); +@@ -1649,7 +1649,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, const char *msg, + Py_XINCREF(libxml_xmlPythonErrorFuncCtxt); + message = libxml_charPtrConstWrap(ptr); + PyTuple_SetItem(list, 1, message); +- result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list); ++ result = PyObject_CallObject(libxml_xmlPythonErrorFuncHandler, list); + /* Forget any errors caused in the error handler. */ + PyErr_Clear(); + Py_XDECREF(list); +@@ -1739,7 +1739,7 @@ libxml_xmlParserCtxtGenericErrorFuncHandler(void *ctx, int severity, char *str) + PyTuple_SetItem(list, 2, libxml_intWrap(severity)); + PyTuple_SetItem(list, 3, Py_None); + Py_INCREF(Py_None); +- result = PyEval_CallObject(pyCtxt->f, list); ++ result = PyObject_CallObject(pyCtxt->f, list); + if (result == NULL) + { + /* TODO: manage for the exception to be propagated... */ +@@ -1925,7 +1925,7 @@ libxml_xmlValidCtxtGenericErrorFuncHandler(void *ctx, ATTRIBUTE_UNUSED int sever + PyTuple_SetItem(list, 0, libxml_charPtrWrap(str)); + PyTuple_SetItem(list, 1, pyCtxt->arg); + Py_XINCREF(pyCtxt->arg); +- result = PyEval_CallObject(pyCtxt->error, list); ++ result = PyObject_CallObject(pyCtxt->error, list); + if (result == NULL) + { + /* TODO: manage for the exception to be propagated... */ +@@ -1952,7 +1952,7 @@ libxml_xmlValidCtxtGenericWarningFuncHandler(void *ctx, ATTRIBUTE_UNUSED int sev + PyTuple_SetItem(list, 0, libxml_charPtrWrap(str)); + PyTuple_SetItem(list, 1, pyCtxt->arg); + Py_XINCREF(pyCtxt->arg); +- result = PyEval_CallObject(pyCtxt->warn, list); ++ result = PyObject_CallObject(pyCtxt->warn, list); + if (result == NULL) + { + /* TODO: manage for the exception to be propagated... */ +@@ -2087,7 +2087,7 @@ libxml_xmlTextReaderErrorCallback(void *arg, + PyTuple_SetItem(list, 1, libxml_charPtrConstWrap(msg)); + PyTuple_SetItem(list, 2, libxml_intWrap(severity)); + PyTuple_SetItem(list, 3, libxml_xmlTextReaderLocatorPtrWrap(locator)); +- result = PyEval_CallObject(pyCtxt->f, list); ++ result = PyObject_CallObject(pyCtxt->f, list); + if (result == NULL) + { + /* TODO: manage for the exception to be propagated... */ +@@ -2282,7 +2282,7 @@ libxml_xmlXPathFuncCallback(xmlXPathParserContextPtr ctxt, int nargs) + cur = libxml_xmlXPathObjectPtrWrap(obj); + PyTuple_SetItem(list, i + 1, cur); + } +- result = PyEval_CallObject(current_function, list); ++ result = PyObject_CallObject(current_function, list); + Py_DECREF(list); + + obj = libxml_xmlXPathObjectPtrConvert(result); +@@ -3185,7 +3185,7 @@ libxml_xmlRelaxNGValidityGenericErrorFuncHandler(void *ctx, char *str) + PyTuple_SetItem(list, 0, libxml_charPtrWrap(str)); + PyTuple_SetItem(list, 1, pyCtxt->arg); + Py_XINCREF(pyCtxt->arg); +- result = PyEval_CallObject(pyCtxt->error, list); ++ result = PyObject_CallObject(pyCtxt->error, list); + if (result == NULL) + { + /* TODO: manage for the exception to be propagated... */ +@@ -3212,7 +3212,7 @@ libxml_xmlRelaxNGValidityGenericWarningFuncHandler(void *ctx, char *str) + PyTuple_SetItem(list, 0, libxml_charPtrWrap(str)); + PyTuple_SetItem(list, 1, pyCtxt->arg); + Py_XINCREF(pyCtxt->arg); +- result = PyEval_CallObject(pyCtxt->warn, list); ++ result = PyObject_CallObject(pyCtxt->warn, list); + if (result == NULL) + { + /* TODO: manage for the exception to be propagated... */ +@@ -3349,7 +3349,7 @@ libxml_xmlSchemaValidityGenericErrorFuncHandler(void *ctx, char *str) + PyTuple_SetItem(list, 0, libxml_charPtrWrap(str)); + PyTuple_SetItem(list, 1, pyCtxt->arg); + Py_XINCREF(pyCtxt->arg); +- result = PyEval_CallObject(pyCtxt->error, list); ++ result = PyObject_CallObject(pyCtxt->error, list); + if (result == NULL) + { + /* TODO: manage for the exception to be propagated... */ +@@ -3376,7 +3376,7 @@ libxml_xmlSchemaValidityGenericWarningFuncHandler(void *ctx, char *str) + PyTuple_SetItem(list, 0, libxml_charPtrWrap(str)); + PyTuple_SetItem(list, 1, pyCtxt->arg); + Py_XINCREF(pyCtxt->arg); +- result = PyEval_CallObject(pyCtxt->warn, list); ++ result = PyObject_CallObject(pyCtxt->warn, list); + if (result == NULL) + { + /* TODO: manage for the exception to be propagated... */ diff -Nru libxml2-2.12.7+dfsg+really2.9.14/debian/patches/series libxml2-2.12.7+dfsg+really2.9.14/debian/patches/series --- libxml2-2.12.7+dfsg+really2.9.14/debian/patches/series 2023-07-08 12:18:29.000000000 -0700 +++ libxml2-2.12.7+dfsg+really2.9.14/debian/patches/series 2024-11-06 17:11:20.000000000 -0800 @@ -8,3 +8,4 @@ CVE-2023-29469-Hashing-of-empty-dict-strings-isn-t-d.patch Reset-nsNr-in-xmlCtxtReset.patch Also-reset-nsNr-in-htmlCtxtReset.patch +python3.13.patch