diff -pruN 2.14.5+dfsg-0.1/debian/changelog 2.14.5+dfsg-0.2/debian/changelog
--- 2.14.5+dfsg-0.1/debian/changelog	2025-08-13 09:52:25.000000000 +0000
+++ 2.14.5+dfsg-0.2/debian/changelog	2025-08-26 07:31:15.000000000 +0000
@@ -1,3 +1,11 @@
+libxml2 (2.14.5+dfsg-0.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Update to the 2.14 branch 20250826. Closes: #1111626, #1111803.
+  * Fix nopython build profile (Helmut Grohne). Closes: #1078673.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 26 Aug 2025 09:31:15 +0200
+
 libxml2 (2.14.5+dfsg-0.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -pruN 2.14.5+dfsg-0.1/debian/control 2.14.5+dfsg-0.2/debian/control
--- 2.14.5+dfsg-0.1/debian/control	2025-04-05 10:07:17.000000000 +0000
+++ 2.14.5+dfsg-0.2/debian/control	2025-08-26 07:31:15.000000000 +0000
@@ -15,7 +15,7 @@ Build-Depends-Arch:
  libpython3-all-dev <!nopython>,
  pkgconf,
  python3-all-dev:any (>= 3.5) <!nopython>,
- python3-setuptools,
+ python3-setuptools <!nopython>,
  rename,
  zlib1g-dev | libz-dev,
  libreadline-dev,
diff -pruN 2.14.5+dfsg-0.1/debian/patches/git-updates.diff 2.14.5+dfsg-0.2/debian/patches/git-updates.diff
--- 2.14.5+dfsg-0.1/debian/patches/git-updates.diff	2025-08-13 06:49:20.000000000 +0000
+++ 2.14.5+dfsg-0.2/debian/patches/git-updates.diff	2025-08-26 07:24:29.000000000 +0000
@@ -1,5 +1,49 @@
-git diff 74f3154320df8950eceae4951975cc9dfc3a254d c7e7b509058d70367ca0e666e79febd0deed13d3
+git diff 74f3154320df8950eceae4951975cc9dfc3a254d 9fb54d0a629b44e0f0c08eafb083458711c79ffe
 
+diff --git a/SAX2.c b/SAX2.c
+index b5c2e476..0f54b7f5 100644
+--- a/SAX2.c
++++ b/SAX2.c
+@@ -1184,8 +1184,19 @@ xmlSAX1Attribute(xmlParserCtxtPtr ctxt, const xmlChar *fullname,
+                 xmlFree(val);
+ 	    }
+ 	} else {
++            /*
++             * When replacing entities, make sure that IDs in
++             * entities aren't registered. This also shouldn't be
++             * done when entities aren't replaced, but this would
++             * require to rework IDREF checks.
++             */
++            if (ctxt->input->entity != NULL)
++                ctxt->vctxt.flags |= XML_VCTXT_IN_ENTITY;
++
+ 	    ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc,
+ 					       ctxt->node, ret, value);
++
++            ctxt->vctxt.flags &= ~XML_VCTXT_IN_ENTITY;
+ 	}
+     } else
+ #endif /* LIBXML_VALID_ENABLED */
+@@ -2052,8 +2063,19 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
+             if (dup == NULL)
+                 xmlSAX2ErrMemory(ctxt);
+ 
++            /*
++             * When replacing entities, make sure that IDs in
++             * entities aren't registered. This also shouldn't be
++             * done when entities aren't replaced, but this would
++             * require to rework IDREF checks.
++             */
++            if (ctxt->input->entity != NULL)
++                ctxt->vctxt.flags |= XML_VCTXT_IN_ENTITY;
++
+ 	    ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt,
+ 	                             ctxt->myDoc, ctxt->node, ret, dup);
++
++            ctxt->vctxt.flags &= ~XML_VCTXT_IN_ENTITY;
+ 	}
+     } else
+ #endif /* LIBXML_VALID_ENABLED */
 diff --git a/globals.c b/globals.c
 index e0b05a24..a4c72e7e 100644
 --- a/globals.c
@@ -40,6 +84,34 @@ index 00446bc5..cd40561d 100644
  XMLPUBFUN xmlAttributePtr
  		xmlAddAttributeDecl	(xmlValidCtxtPtr ctxt,
  					 xmlDtdPtr dtd,
+diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h
+index 743d8213..cefd8f71 100644
+--- a/include/libxml/xmlerror.h
++++ b/include/libxml/xmlerror.h
+@@ -20,7 +20,7 @@ extern "C" {
+  * Backward compatibility
+  */
+ #define initGenericErrorDefaultFunc(h) \
+-    xmlSetGenericErrorFunc(NULL, (h) ? *(h) : NULL)
++    xmlSetGenericErrorFunc(NULL, (h) ? *((xmlGenericErrorFunc *) (h)) : NULL)
+ 
+ /**
+  * xmlErrorLevel:
+diff --git a/include/private/parser.h b/include/private/parser.h
+index d5f2fef9..3e7fa59a 100644
+--- a/include/private/parser.h
++++ b/include/private/parser.h
+@@ -20,6 +20,10 @@
+  * Set if the validation context is part of a parser context.
+  */
+ #define XML_VCTXT_USE_PCTXT (1u << 1)
++/**
++ * Set when parsing entities.
++ */
++#define XML_VCTXT_IN_ENTITY (1u << 3)
+ 
+ /*
+  * TODO: Rename to avoid confusion with xmlParserInputFlags
 diff --git a/parser.c b/parser.c
 index e482d7f2..cdfa90c0 100644
 --- a/parser.c
@@ -101,7 +173,7 @@ index 2e8df00b..ddb8bdb3 100644
  	    prop->atype = XML_ATTRIBUTE_ID;
  	}
 diff --git a/valid.c b/valid.c
-index 34b6757c..63535270 100644
+index 34b6757c..d54e20f7 100644
 --- a/valid.c
 +++ b/valid.c
 @@ -1139,8 +1139,6 @@ xmlFreeElement(xmlElementPtr elem) {
@@ -140,6 +212,16 @@ index 34b6757c..63535270 100644
          xmlRemoveID(doc, attr);
      attr->atype = attrDecl->atype;
  
+@@ -4319,7 +4313,8 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
+     }
+ 
+     /* Validity Constraint: ID uniqueness */
+-    if (attrDecl->atype == XML_ATTRIBUTE_ID) {
++    if (attrDecl->atype == XML_ATTRIBUTE_ID &&
++        (ctxt == NULL || (ctxt->flags & XML_VCTXT_IN_ENTITY) == 0)) {
+         if (xmlAddID(ctxt, doc, value, attr) == NULL)
+ 	    ret = 0;
+     }
 diff --git a/xmlIO.c b/xmlIO.c
 index 4c58d81f..0ef19677 100644
 --- a/xmlIO.c
@@ -219,3 +301,27 @@ index 4c58d81f..0ef19677 100644
                  /*
                   * If a file isn't seekable, we pipe uncompressed
                   * input through zlib.
+diff --git a/xmlregexp.c b/xmlregexp.c
+index 9d36c172..5f46db2a 100644
+--- a/xmlregexp.c
++++ b/xmlregexp.c
+@@ -416,14 +416,17 @@ static int xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt);
+  */
+ static void*
+ xmlRegCalloc2(size_t dim1, size_t dim2, size_t elemSize) {
+-    size_t totalSize;
++    size_t numElems, totalSize;
+     void *ret;
+ 
+     /* Check for overflow */
+     if ((dim2 == 0) || (elemSize == 0) ||
+         (dim1 > SIZE_MAX / dim2 / elemSize))
+         return (NULL);
+-    totalSize = dim1 * dim2 * elemSize;
++    numElems = dim1 * dim2;
++    if (numElems > XML_MAX_ITEMS)
++        return NULL;
++    totalSize = numElems * elemSize;
+     ret = xmlMalloc(totalSize);
+     if (ret != NULL)
+         memset(ret, 0, totalSize);
diff -pruN 2.14.5+dfsg-0.1/debian/rules 2.14.5+dfsg-0.2/debian/rules
--- 2.14.5+dfsg-0.1/debian/rules	2025-07-28 11:53:50.000000000 +0000
+++ 2.14.5+dfsg-0.2/debian/rules	2025-08-26 07:31:15.000000000 +0000
@@ -69,8 +69,10 @@ doinstall-main:
 
 override_dh_auto_install-arch: $(TARGETS:%=doinstall-%)
 	find debian/tmp -name *.la -delete
+ifneq ($(PY3VERS),)
 	rm -r debian/tmp/usr/lib/python*/site-packages/__pycache__
 	rm -f debian/tmp/usr/lib/python*/site-packages/*.a
+endif
 
 doinstall-python%:
 	dh_auto_install --builddirectory=builddir/main/python$(*)
