[med-svn] [Git][med-team/python-biopython][master] 2 commits: Cherry-pick patch from upstream to fix FTBFS with Python 3.13.

Michael R. Crusoe (@crusoe) gitlab at salsa.debian.org
Sat Sep 14 11:38:01 BST 2024



Michael R. Crusoe pushed to branch master at Debian Med / python-biopython


Commits:
2ce0f043 by Michael R. Crusoe at 2024-09-14T09:52:11+02:00
Cherry-pick patch from upstream to fix FTBFS with Python 3.13.

Closes: #1081665

- - - - -
b3524b22 by Michael R. Crusoe at 2024-09-14T10:01:05+02:00
Remove constraints unnecessary since bullseye (oldstable)

* python3-biopython: Drop versioned constraint on ncbi-blast+ (>= 2.10.1-3) in Recommends.

Changes-By: deb-scrub-obsolete
- - - - -


13 changed files:

- debian/changelog
- debian/control
- + debian/patches/0010-Python-3.13-Replace-deprecated-PyEval_CallObject.patch
- debian/patches/croak-on-muscle5.patch
- debian/patches/fix-use-of-unversioned-python.patch
- debian/patches/muscle3.patch
- debian/patches/privacy_breach.patch
- debian/patches/privacy_breach_ie9.patch
- debian/patches/remove_mathml-qname.patch
- debian/patches/reproduciblebuild.patch
- debian/patches/seqxml-parser.patch
- debian/patches/series
- debian/patches/skip-scipy-in-codonalign.patch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,14 @@
+python-biopython (1.83+dfsg1-5) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Cherry-pick patch from upstream to fix FTBFS with Python 3.13.
+    Closes: #1081665
+  * Remove constraints unnecessary since bullseye (oldstable):
+    + python3-biopython: Drop versioned constraint on ncbi-blast+ (>= 2.10.1-3)
+      in Recommends.
+
+ -- Michael R. Crusoe <crusoe at debian.org>  Sat, 14 Sep 2024 09:51:48 +0200
+
 python-biopython (1.83+dfsg1-4) unstable; urgency=medium
 
   * skip-scipy-in-codonalign.patch: new: skip scipy tests on riscv64.


=====================================
debian/control
=====================================
@@ -57,7 +57,7 @@ Depends: ${python3:Depends},
          python3-reportlab (>= 4.0.4-1~),
          w3c-sgml-lib
 Recommends: python-biopython-doc (= ${source:Version}),
-            ncbi-blast+ (>= 2.10.1-3)
+            ncbi-blast+
 Suggests: python3-tk,
           bwa,
           clustalo,


=====================================
debian/patches/0010-Python-3.13-Replace-deprecated-PyEval_CallObject.patch
=====================================
@@ -0,0 +1,25 @@
+From: Sandro <devel at penguinpee.nl>
+Date: Fri, 19 Apr 2024 14:41:38 +0200
+Subject: Python 3.13: Replace deprecated PyEval_CallObject()
+
+The function has been deprecated since Python 3.9 and will be removed
+from Python 3.13.
+
+See: https://docs.python.org/3.13/whatsnew/3.13.html#id9
+---
+ Bio/cpairwise2module.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Bio/cpairwise2module.c b/Bio/cpairwise2module.c
+index af7843e..ada6663 100644
+--- a/Bio/cpairwise2module.c
++++ b/Bio/cpairwise2module.c
+@@ -57,7 +57,7 @@ static double _get_match_score(PyObject *py_sequenceA, PyObject *py_sequenceB,
+     if(!(py_arglist = Py_BuildValue("(OO)", py_A, py_B)))
+         goto _get_match_score_cleanup;
+ 
+-    if(!(py_result = PyEval_CallObject(py_match_fn, py_arglist)))
++    if(!(py_result = PyObject_CallObject(py_match_fn, py_arglist)))
+         goto _get_match_score_cleanup;
+     score = PyFloat_AsDouble(py_result);
+ 


=====================================
debian/patches/croak-on-muscle5.patch
=====================================
@@ -1,17 +1,25 @@
-Description: raise runtime error when trying to use wrapper on muscle 5.
- The muscle wrapper only supports muscle 3, and the biopython project is aiming
- to remove wrapper support in an upcoming version.  Port of the wrapping code
- to support both muscle versions will thus probably never happen.  The affected
- code section is due to disappear in an upcoming biopython version and it thus
- not forwarded upstream.
-Author: Étienne Mollier <emollier at debian.org>
+From: =?utf-8?q?=C3=89tienne_Mollier?= <emollier at debian.org>
+Date: Sat, 14 Sep 2024 09:48:28 +0200
+Subject: raise runtime error when trying to use wrapper on muscle 5.
+
 Bug: https://github.com/biopython/biopython/issues/3902
 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009118
 Last-Update: 2022-11-24
+
+The muscle wrapper only supports muscle 3, and the biopython project is aiming
+to remove wrapper support in an upcoming version.  Port of the wrapping code
+to support both muscle versions will thus probably never happen.  The affected
+code section is due to disappear in an upcoming biopython version and it thus
+not forwarded upstream.
+Last-Update: 2022-11-24
 ---
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- python-biopython.orig/Bio/Align/Applications/_Muscle.py
-+++ python-biopython/Bio/Align/Applications/_Muscle.py
+ Bio/Align/Applications/_Muscle.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/Bio/Align/Applications/_Muscle.py b/Bio/Align/Applications/_Muscle.py
+index 6a67e2a..e7502e3 100644
+--- a/Bio/Align/Applications/_Muscle.py
++++ b/Bio/Align/Applications/_Muscle.py
 @@ -8,6 +8,7 @@
  
  
@@ -20,7 +28,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  
  
  class MuscleCommandline(AbstractCommandline):
-@@ -676,6 +677,10 @@
+@@ -676,6 +677,10 @@ class MuscleCommandline(AbstractCommandline):
              #                           stdout and exit
              _Switch(["-version", "version"], "Write version string to stdout and exit"),
          ]


=====================================
debian/patches/fix-use-of-unversioned-python.patch
=====================================
@@ -1,14 +1,22 @@
-Description: fix use of unversioned 'python' interpreter
- The Doc/Makefile uses python to evaluate the current version of the library in
- order to build the documentation, but the unversioned "python" interpreter is
- not available anymore, at least not in the build context.
-Author: Étienne Mollier <etienne.mollier at mailoo.org>
+From: =?utf-8?q?=C3=89tienne_Mollier?= <etienne.mollier at mailoo.org>
+Date: Sat, 14 Sep 2024 09:48:28 +0200
+Subject: fix use of unversioned 'python' interpreter
+
 Forwarded: not-needed
 Last-Update: 2020-09-09
+
+The Doc/Makefile uses python to evaluate the current version of the library in
+order to build the documentation, but the unversioned "python" interpreter is
+not available anymore, at least not in the build context.
+Last-Update: 2020-09-09
 ---
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- python-biopython.orig/Doc/Makefile
-+++ python-biopython/Doc/Makefile
+ Doc/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Doc/Makefile b/Doc/Makefile
+index 20c9564..f7d3823 100644
+--- a/Doc/Makefile
++++ b/Doc/Makefile
 @@ -1,5 +1,5 @@
  subdirs :=
 -BP_VERSION := $(shell python -c "`grep ^__version__ ../Bio/__init__.py`; print('dev' if 'dev' in __version__ else __version__)")


=====================================
debian/patches/muscle3.patch
=====================================
@@ -1,16 +1,25 @@
-Description: expect muscle3 as executable instead of muscle.
- When installed concurrently, muscle3 may be a preferable default over plain
- muscle because the latter would probably be muscle 5, which is not compatible
- with the biopython wrapper.
- .
- Forwarding is not needed since wrappers are deprecated and due to be removed
- in an upcoming biopython version.
-Author: Étienne Mollier <emollier at debian.org>
+From: =?utf-8?q?=C3=89tienne_Mollier?= <emollier at debian.org>
+Date: Sat, 14 Sep 2024 09:48:28 +0200
+Subject: expect muscle3 as executable instead of muscle.
+
 Bug-Debian: https://bugs.debian.org/1009118
 Forwarded: not-needed
 Last-Update: 2022-11-24
+
+When installed concurrently, muscle3 may be a preferable default over plain
+muscle because the latter would probably be muscle 5, which is not compatible
+with the biopython wrapper.
+
+Forwarding is not needed since wrappers are deprecated and due to be removed
+in an upcoming biopython version.
+Last-Update: 2022-11-24
 ---
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+ Bio/Align/Applications/_Muscle.py | 10 +++++++++-
+ Tests/test_Muscle_tool.py         | 12 +++++++++---
+ 2 files changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/Bio/Align/Applications/_Muscle.py b/Bio/Align/Applications/_Muscle.py
+index e7502e3..ff59668 100644
 --- a/Bio/Align/Applications/_Muscle.py
 +++ b/Bio/Align/Applications/_Muscle.py
 @@ -10,6 +10,14 @@
@@ -28,7 +37,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  
  class MuscleCommandline(AbstractCommandline):
      r"""Command line wrapper for the multiple alignment program MUSCLE.
-@@ -43,7 +51,7 @@ class MuscleCommandline(AbstractCommandl
+@@ -43,7 +51,7 @@ class MuscleCommandline(AbstractCommandline):
  
      """
  
@@ -37,6 +46,8 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
          """Initialize the class."""
          CLUSTERING_ALGORITHMS = ["upgma", "upgmb", "neighborjoining"]
          DISTANCE_MEASURES_ITER1 = [
+diff --git a/Tests/test_Muscle_tool.py b/Tests/test_Muscle_tool.py
+index 7d9349b..7fe05b8 100644
 --- a/Tests/test_Muscle_tool.py
 +++ b/Tests/test_Muscle_tool.py
 @@ -58,12 +58,18 @@ if sys.platform == "win32":
@@ -60,7 +71,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  
  if not muscle_exe:
      raise MissingExternalDependencyError(
-@@ -190,7 +196,7 @@ class SimpleAlignTest(unittest.TestCase)
+@@ -190,7 +196,7 @@ class SimpleAlignTest(unittest.TestCase):
          cmdline.set_parameter("stable")
          #Set some others options just to test them
          cmdline.set_parameter("maxiters", 2)


=====================================
debian/patches/privacy_breach.patch
=====================================
@@ -1,8 +1,15 @@
-Author: Andreas Tille <tille at debian.org>
+From: Andreas Tille <tille at debian.org>
+Date: Sat, 14 Sep 2024 09:48:28 +0200
+Subject: Do not use privacy-breach-logo
+
 Last-Update: Tue, 12 May 2015 11:08:43 +0200
-Description: Do not use privacy-breach-logo
 Forwarded: not-needed
+---
+ Tests/Blast/html_msgid_29_blastx_001.html | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
 
+diff --git a/Tests/Blast/html_msgid_29_blastx_001.html b/Tests/Blast/html_msgid_29_blastx_001.html
+index 876b519..bff96b7 100644
 --- a/Tests/Blast/html_msgid_29_blastx_001.html
 +++ b/Tests/Blast/html_msgid_29_blastx_001.html
 @@ -42,8 +42,7 @@


=====================================
debian/patches/privacy_breach_ie9.patch
=====================================
@@ -1,15 +1,23 @@
-Description: fix privacy breach with html5shiv
- Actually the script called is commented out, except when reading the page with
- Internet Explorer 9.  This patch makes sure the script is not called at all,
- even if it is very unlikely that HTML document installed in Debian will ever
- be read with this browser.
-Author: Étienne Mollier <etienne.mollier at mailoo.org>
+From: =?utf-8?q?=C3=89tienne_Mollier?= <etienne.mollier at mailoo.org>
+Date: Sat, 14 Sep 2024 09:48:28 +0200
+Subject: fix privacy breach with html5shiv
+
 Forwarded: not-needed
 Last-Update: 2020-09-11
+
+Actually the script called is commented out, except when reading the page with
+Internet Explorer 9.  This patch makes sure the script is not called at all,
+even if it is very unlikely that HTML document installed in Debian will ever
+be read with this browser.
+Last-Update: 2020-09-11
 ---
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- python-biopython.orig/Doc/cookbook/Restriction/Restriction.html
-+++ python-biopython/Doc/cookbook/Restriction/Restriction.html
+ Doc/cookbook/Restriction/Restriction.html | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/Doc/cookbook/Restriction/Restriction.html b/Doc/cookbook/Restriction/Restriction.html
+index 8f6c3de..1ae75d9 100644
+--- a/Doc/cookbook/Restriction/Restriction.html
++++ b/Doc/cookbook/Restriction/Restriction.html
 @@ -208,9 +208,6 @@
      code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
      .display.math{display: block; text-align: center; margin: 0.5rem auto;}


=====================================
debian/patches/remove_mathml-qname.patch
=====================================
@@ -1,12 +1,19 @@
-Author: Andreas Tille <tille at debian.org>
+From: Andreas Tille <tille at debian.org>
+Date: Sat, 14 Sep 2024 09:48:28 +0200
+Subject: Remove non DFSG free DTD
+
 Last-Update: Wed, 30 Apr 2014 14:47:53 +0200
 Bugs-Debian: http://bugs.debian.org/746484
 Forwarded: https://bugs.debian.org/746484#15
-Description: Remove non DFSG free DTD
+---
+ Bio/Entrez/DTDs/modules.ent | 7 -------
+ 1 file changed, 7 deletions(-)
 
+diff --git a/Bio/Entrez/DTDs/modules.ent b/Bio/Entrez/DTDs/modules.ent
+index 8458753..1caeb4b 100644
 --- a/Bio/Entrez/DTDs/modules.ent
 +++ b/Bio/Entrez/DTDs/modules.ent
-@@ -350,13 +350,6 @@ Version  Reason/Occasion
+@@ -350,13 +350,6 @@ Version  Reason/Occasion                   (who) vx.x (yyyy-mm-dd)
  "mathmlsetup.ent"                                                    >
  
  


=====================================
debian/patches/reproduciblebuild.patch
=====================================
@@ -1,17 +1,25 @@
-Description: make the build reproducible
- This patch removes the last update date, which would correspond to the moment
- when the package was build, and wouldn't be too relevant in the document.
- Focusing on the version number would be a better approach here.  This patch is
- not needed upstream, as it would interfere with development releases, marked
- only with the version "dev", so would benefit of the date here.
-Author: Étienne Mollier <etienne.mollier at mailoo.org>
+From: =?utf-8?q?=C3=89tienne_Mollier?= <etienne.mollier at mailoo.org>
+Date: Sat, 14 Sep 2024 09:48:28 +0200
+Subject: make the build reproducible
+
 Forwarded: not-needed
 Last-Update: 2020-09-12
+
+This patch removes the last update date, which would correspond to the moment
+when the package was build, and wouldn't be too relevant in the document.
+Focusing on the version number would be a better approach here.  This patch is
+not needed upstream, as it would interfere with development releases, marked
+only with the version "dev", so would benefit of the date here.
+Last-Update: 2020-09-12
 ---
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- python-biopython.orig/Doc/Tutorial.tex
-+++ python-biopython/Doc/Tutorial.tex
-@@ -86,7 +86,7 @@
+ Doc/Tutorial.tex | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Doc/Tutorial.tex b/Doc/Tutorial.tex
+index 49634c8..5dab884 100644
+--- a/Doc/Tutorial.tex
++++ b/Doc/Tutorial.tex
+@@ -86,7 +86,7 @@ Biopython Tutorial and Cookbook}
  
  \author{Jeff Chang, Brad Chapman, Iddo Friedberg, Thomas Hamelryck, \\
  Michiel de Hoon, Peter Cock, Tiago Antao, Eric Talevich, Bartek Wilczy\'{n}ski}


=====================================
debian/patches/seqxml-parser.patch
=====================================
@@ -1,22 +1,31 @@
-Description: Trying to figure out what is going wrong in the SeqXML parser
-  * using original block size
-  * print data
-  * print data
-  * print data
-  * print data
-  * closing the parser on time does the trick
+From: Michiel de Hoon <mdehoon at tkx249.genome.gsc.riken.jp>
+Date: Sat, 14 Sep 2024 09:48:28 +0200
+Subject: Trying to figure out what is going wrong in the SeqXML parser
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
 
-Author: Michiel de Hoon <mdehoon at tkx249.genome.gsc.riken.jp>
 Origin: upstream, https://github.com/biopython/biopython/pull/4686
 Bug: https://github.com/biopython/biopython/issues/4640
 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1064147
 Reviewed-by: Étienne Mollier <emollier at debian.org>
 Last-Update: 2024-05-22
+
+ * using original block size
+ * print data
+ * print data
+ * print data
+ * print data
+ * closing the parser on time does the trick
 ---
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- python-biopython.orig/Bio/SeqIO/SeqXmlIO.py
-+++ python-biopython/Bio/SeqIO/SeqXmlIO.py
-@@ -440,11 +440,12 @@
+ Bio/SeqIO/SeqXmlIO.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Bio/SeqIO/SeqXmlIO.py b/Bio/SeqIO/SeqXmlIO.py
+index a5c1b29..7b62fbe 100644
+--- a/Bio/SeqIO/SeqXmlIO.py
++++ b/Bio/SeqIO/SeqXmlIO.py
+@@ -440,11 +440,12 @@ class SeqXmlIterator(SequenceIterator):
              if not text:
                  break
              parser.feed(text)


=====================================
debian/patches/series
=====================================
@@ -8,3 +8,4 @@ muscle3.patch
 #port_tutorial_to_muscle3.patch
 seqxml-parser.patch
 skip-scipy-in-codonalign.patch
+0010-Python-3.13-Replace-deprecated-PyEval_CallObject.patch


=====================================
debian/patches/skip-scipy-in-codonalign.patch
=====================================
@@ -1,16 +1,23 @@
-Description: skip scipy tests within test_Align_codonalign.
- This patch is introduced to give some breath to Risc-V CI runners while
- the core of the problem is investigated.
+From: =?utf-8?q?=C3=89tienne_Mollier?= <emollier at debian.org>
+Date: Sat, 14 Sep 2024 09:48:28 +0200
+Subject: skip scipy tests within test_Align_codonalign.
 
-Author: Étienne Mollier <emollier at debian.org>
 Bug-Debian: https://bugs.debian.org/1079439
 Forwarded: not-needed
 Last-Update: 2024-08-25
+
+This patch is introduced to give some breath to Risc-V CI runners while
+the core of the problem is investigated.
 ---
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- python-biopython.orig/Tests/test_Align_codonalign.py
-+++ python-biopython/Tests/test_Align_codonalign.py
-@@ -8230,6 +8230,12 @@
+ Tests/test_Align_codonalign.py | 6 ++++++
+ Tests/test_codonalign.py       | 6 ++++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/Tests/test_Align_codonalign.py b/Tests/test_Align_codonalign.py
+index 27cb528..c246b05 100644
+--- a/Tests/test_Align_codonalign.py
++++ b/Tests/test_Align_codonalign.py
+@@ -8230,6 +8230,12 @@ gi|6478867|gb|M37394.2|RATEGFR      AGAGTACCTGCGGGTGGCACCGCCAAGCAGTGAGTTTAGTGGAG
          self.assertAlmostEqual(dN, 0.0203, places=4)
          self.assertAlmostEqual(dS, 0.0164, places=4)
  
@@ -23,9 +30,11 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
          try:
              import scipy
          except ImportError:
---- python-biopython.orig/Tests/test_codonalign.py
-+++ python-biopython/Tests/test_codonalign.py
-@@ -307,6 +307,12 @@
+diff --git a/Tests/test_codonalign.py b/Tests/test_codonalign.py
+index d4bcd52..2f9c41d 100644
+--- a/Tests/test_codonalign.py
++++ b/Tests/test_codonalign.py
+@@ -307,6 +307,12 @@ class Test_dn_ds(unittest.TestCase):
          self.assertAlmostEqual(dN, 0.0203, places=4)
          self.assertAlmostEqual(dS, 0.0164, places=4)
  



View it on GitLab: https://salsa.debian.org/med-team/python-biopython/-/compare/d6aeea05e684eb76d338347f4598414d7c0e7c17...b3524b225d8e88a23c57915f85a4d9cb419631af

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-biopython/-/compare/d6aeea05e684eb76d338347f4598414d7c0e7c17...b3524b225d8e88a23c57915f85a4d9cb419631af
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240914/e84acee7/attachment-0001.htm>


More information about the debian-med-commit mailing list