[Debian-med-packaging] Bug#1114298: python-biopython: FTBFS: dh_auto_test: error: pybuild --test -i python{version} -p 3.13 --test --system=custom "--test-args= \\

Étienne Mollier emollier at debian.org
Sat Sep 13 09:13:19 BST 2025


Control: tags -1 + upstream patch

Hi Santiago,

Thanks for your report!  Concerning the main issue of the entry,
it looks to be caused by a change in bwa 0.7.19, uploaded in sid
last month.  I managed to get somewhere with this workaround:

-------8<--------------8<--------------8<--------------8<-------
--- python-biopython.orig/Tests/test_BWA_tool.py
+++ python-biopython/Tests/test_BWA_tool.py
@@ -161,7 +161,7 @@
             with open(self.samfile1) as handle:
                 headline = handle.readline()
             self.assertTrue(
-                headline.startswith("@SQ"),
+                headline.startswith("@SQ") or headline.startswith("@HD"),
                 f"Error generating sam files:\n{cmdline}\nOutput starts:{headline}",
             )
 
@@ -184,7 +184,7 @@
             with open(self.samfile) as handle:
                 headline = handle.readline()
             self.assertTrue(
-                headline.startswith("@SQ"),
+                headline.startswith("@SQ") or headline.startswith("@HD"),
                 f"Error generating sam files:\n{cmdline}\nOutput starts:{headline}",
             )
 
@@ -201,7 +201,7 @@
             with open(self.samfile) as handle:
                 headline = handle.readline()
             self.assertTrue(
-                headline.startswith("@SQ"),
+                headline.startswith("@SQ" or headline.startswith("@HD"),
                 f"Error generating sam files:\n{cmdline}\nOutput starts:{headline}",
             )
-------8<--------------8<--------------8<--------------8<-------

Regarding your secondary remark:

> Note: In addition to this package failing to build in unstable six
> days ago, it also fails to build in bookworm right now.

the relevant part of the symptoms is different:

	    self.perform_test(
	  File "/build/reproducible-path/python-biopython-1.80+dfsg/.pybuild/cpython3_3.11/build/Tests/test_SeqIO.py", line 631, in perform_test
	    self.check_simple_write_read(
	  File "/build/reproducible-path/python-biopython-1.80+dfsg/.pybuild/cpython3_3.11/build/Tests/test_SeqIO.py", line 367, in check_simple_write_read
	    records2 = list(SeqIO.parse(handle=handle, format=fmt))
	               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  File "/build/reproducible-path/python-biopython-1.80+dfsg/.pybuild/cpython3_3.11/build/Bio/SeqIO/Interfaces.py", line 72, in __next__
	    return next(self.records)
	           ^^^^^^^^^^^^^^^^^^
	  File "/build/reproducible-path/python-biopython-1.80+dfsg/.pybuild/cpython3_3.11/build/Bio/SeqIO/SeqXmlIO.py", line 448, in iterate
	    parser.close()
	  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 240, in close
	    self.feed(b"", isFinal=True)
	  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 217, in feed
	    self._parser.Parse(data, isFinal)
	  File "../Modules/pyexpat.c", line 416, in StartElement
	  File "/usr/lib/python3.11/xml/sax/expatreader.py", line 369, in start_element_ns
	    self._cont_handler.startElementNS(pair, None,
	  File "/build/reproducible-path/python-biopython-1.80+dfsg/.pybuild/cpython3_3.11/build/Bio/SeqIO/SeqXmlIO.py", line 164, in startEntryFieldElement
	    return self.startPropertyElement(attrs)
	           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  File "/build/reproducible-path/python-biopython-1.80+dfsg/.pybuild/cpython3_3.11/build/Bio/SeqIO/SeqXmlIO.py", line 340, in startPropertyElement
	    record = self.records[-1]
	             ~~~~~~~~~~~~^^^^
	IndexError: list index out of range

The issue does ring a bell though and I believe it stems from
Debian 12.12's libxml2 upgrade to address a few CVEs, as
documented in the official announcement[1].

[1]: https://lists.debian.org/debian-stable-announce/2025/09/msg00001.html

Have a nice day,  :)
-- 
  .''`.  Étienne Mollier <emollier at debian.org>
 : :' :  pgp: 8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
 `. `'   sent from /dev/pts/3, please excuse my verbosity
   `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20250913/b333693c/attachment.sig>


More information about the Debian-med-packaging mailing list