summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-libxml2-utf8.patch
diff options
context:
space:
mode:
authorJohn Kehayias <john@guixotic.coop>2025-09-11 16:51:08 -0400
committerMaxim Cournoyer <maxim@guixotic.coop>2025-09-30 16:48:20 +0900
commit58c345f56c05f8d02b1ba22660ad1cf71d50d727 (patch)
tree946fe60f305964505be1c2f42557eea5fdad122e /gnu/packages/patches/python-libxml2-utf8.patch
parentc0c4ce6d642bc3ae32ad345c17f77ed57842d667 (diff)
gnu: libxml2: Update to 2.14.6; deprecate python-libxml2.
Python bindings for libxml2 are now built as part of libxml2; remove all python-libxml2 inputs for libxml2 (nearly all already had libxml2) and deprecate the package. This was done manually using git grep python-libxml2 gnu/packages to find affected packages and then check all their input fields. With the update to libxml2, we can remove all the libxml2-next* variants. This change was automated with: git grep -rl libxml2-next | xargs sed -i 's/\(libxml2-next\|libxml2-next-for-grafting\)/libxml2/g' * gnu/packages/xml.scm (libxml2): Update to 2.14.6. [arguments]<#:phases>: Add configure-python phase (from python-libxml2). [native-inputs]: Add pkg-config and python-minimal. (libxml2-next, libxml2-next/fixed, libxml2-next-for-grafting): Remove. (python-libxml2): Deprecate in favor of libxml2. Change-Id: I2976f2fde086e9bc345d661edbdc125abbb7a753
Diffstat (limited to 'gnu/packages/patches/python-libxml2-utf8.patch')
-rw-r--r--gnu/packages/patches/python-libxml2-utf8.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/gnu/packages/patches/python-libxml2-utf8.patch b/gnu/packages/patches/python-libxml2-utf8.patch
index e39672faa1b..9c4ca4fdb29 100644
--- a/gnu/packages/patches/python-libxml2-utf8.patch
+++ b/gnu/packages/patches/python-libxml2-utf8.patch
@@ -6,18 +6,18 @@ that 'itstool' stumbles upon when processing UTF-8 data:
Patch by Jan Matejek
from <https://bugzilla.opensuse.org/show_bug.cgi?id=1065270>.
---- libxml2-2.9.5.orig/python/libxml.c
-+++ libxml2-2.9.5/python/libxml.c
-@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
+--- a/python/libxml.c
++++ b/python/libxml.c
+@@ -1499,6 +1499,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, const char *msg,
PyObject *message;
PyObject *result;
char str[1000];
+ unsigned char *ptr = (unsigned char *)str;
- #ifdef DEBUG_ERROR
- printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
-@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
- str[999] = 0;
+ if (libxml_xmlPythonErrorFuncHandler == NULL) {
+ va_start(ap, msg);
+@@ -1510,12 +1511,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, const char *msg,
+ str[999] = 0;
va_end(ap);
+#if PY_MAJOR_VERSION >= 3
@@ -32,7 +32,7 @@ from <https://bugzilla.opensuse.org/show_bug.cgi?id=1065270>.
- message = libxml_charPtrConstWrap(str);
+ 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);