[med-svn] [Git][med-team/python-cgecore][master] 2 commits: use dh-sequence-python3

Alexandre Detiste (@detiste-guest) gitlab at salsa.debian.org
Tue Nov 19 20:26:59 GMT 2024



Alexandre Detiste pushed to branch master at Debian Med / python-cgecore


Commits:
e4798232 by Alexandre Detiste at 2024-11-19T21:17:48+01:00
use dh-sequence-python3

- - - - -
65c32693 by Alexandre Detiste at 2024-11-19T21:24:16+01:00
Python 3.12 + 3.13 transition

- - - - -


5 changed files:

- debian/changelog
- debian/control
- + debian/patches/python3.13.patch
- + debian/patches/series
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+python-cgecore (1.5.6+ds-2) unstable; urgency=medium
+
+  * Team upload.
+  * Patch out regexp that causes SyntaxWarning's (Closes: #1085895)
+  * Patch out usage of "pipes" module removed from Py3.13 (Closes: #1084632)
+  * Use dh-sequence-python3
+
+ -- Alexandre Detiste <tchet at debian.org>  Tue, 19 Nov 2024 21:23:35 +0100
+
 python-cgecore (1.5.6+ds-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -5,7 +5,7 @@ Section: python
 Testsuite: autopkgtest-pkg-python
 Priority: optional
 Build-Depends: debhelper-compat (= 13),
-               dh-python,
+               dh-sequence-python3,
                python3,
                python3-setuptools,
                python3-biopython


=====================================
debian/patches/python3.13.patch
=====================================
@@ -0,0 +1,70 @@
+--- a/cgecore/cmdline.py
++++ b/cgecore/cmdline.py
+@@ -6,7 +6,7 @@
+ # This script is part of the CGE Pipeline structure
+ import sys, os
+ from subprocess import Popen, PIPE
+-from pipes import quote
++from shlex import quote
+ from time import time, sleep
+ from datetime import timedelta
+ 
+--- a/cgecore/cgefinder.py
++++ b/cgecore/cgefinder.py
+@@ -239,8 +239,8 @@
+                 align_homo = "".join(kma_results[db][hit]['homo_string'])
+ 
+                 # Extract only aligned sequences
+-                start = re.search("^-*(\w+)", align_query).start(1)
+-                end = re.search("\w+(-*)$", align_query).start(1)
++                start = re.search(r"^-*(\w+)", align_query).start(1)
++                end = re.search(r"\w+(-*)$", align_query).start(1)
+ 
+                 kma_results[db][hit]['sbjct_string'] = align_sbjct[start:end]
+                 kma_results[db][hit]['query_string'] = align_query[start:end]
+--- a/cgecore/utility.py
++++ b/cgecore/utility.py
+@@ -134,7 +134,7 @@
+       return inv_map
+ 
+ class Reg:
+-   """
++   r"""
+    NAME:        Reg - Extended Regular Expression Handler
+    AUTHOR:      Martin Thomsen
+    DESCRIPTION:
+@@ -488,9 +488,9 @@
+    path given as input
+    """
+    # Sanity checkpoint
+-   src = re.sub('[^\w/\-\.\*]', '', src)
+-   dst = re.sub('[^\w/\-\.\*]', '', dst)
+-   if len(re.sub('[\W]', '', src)) < 5 or len(re.sub('[\W]', '', dst)) < 5:
++   src = re.sub(r'[^\w/\-\.\*]', '', src)
++   dst = re.sub(r'[^\w/\-\.\*]', '', dst)
++   if len(re.sub(r'[\W]', '', src)) < 5 or len(re.sub(r'[\W]', '', dst)) < 5:
+       debug.log("Error: Moving file failed. Provided paths are invalid! src='%s' dst='%s'"%(src, dst))
+    else:
+       # Check destination
+@@ -517,7 +517,7 @@
+             debug.log("Moving File(s)...", "Move from %s"%src, "to %s"%dst)
+             for file_ in files:
+                # Check if file contains invalid symbols:
+-               invalid_chars = re.findall('[^\w/\-\.\*]', os.path.basename(file_))
++               invalid_chars = re.findall(r'[^\w/\-\.\*]', os.path.basename(file_))
+                if invalid_chars:
+                   debug.graceful_exit(("Error: File %s contains invalid "
+                                       "characters %s!"
+@@ -536,9 +536,9 @@
+    path given as input
+    """
+    # Sanity checkpoint
+-   src = re.sub('[^\w/\-\.\*]', '', src)
+-   dst = re.sub('[^\w/\-\.\*]', '', dst)
+-   if len(re.sub('[\W]', '', src)) < 5 or len(re.sub('[\W]', '', dst)) < 5:
++   src = re.sub(r'[^\w/\-\.\*]', '', src)
++   dst = re.sub(r'[^\w/\-\.\*]', '', dst)
++   if len(re.sub(r'[\W]', '', src)) < 5 or len(re.sub(r'[\W]', '', dst)) < 5:
+       debug.log("Error: Copying file failed. Provided paths are invalid! src='%s' dst='%s'"%(src, dst))
+    else:
+       # Check destination


=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+python3.13.patch


=====================================
debian/rules
=====================================
@@ -3,7 +3,7 @@
 export PYBUILD_NAME=cgecore
 
 %:
-	dh $@ --with python3 --buildsystem=pybuild
+	dh $@ --buildsystem=pybuild
 
 override_dh_auto_clean:
 	dh_auto_clean



View it on GitLab: https://salsa.debian.org/med-team/python-cgecore/-/compare/80f95cd5fd2dcc44efd86fd806e4d753f9d75e7d...65c326937a1891ca06d94c2b78c6a065c7e97361

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-cgecore/-/compare/80f95cd5fd2dcc44efd86fd806e4d753f9d75e7d...65c326937a1891ca06d94c2b78c6a065c7e97361
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/20241119/603ccef2/attachment-0001.htm>


More information about the debian-med-commit mailing list