[med-svn] [Git][med-team/sepp][master] 3 commits: Dropping U mode in open() invocations
Pierre Gruet (@pgt)
gitlab at salsa.debian.org
Wed Jan 25 12:26:53 GMT 2023
Pierre Gruet pushed to branch master at Debian Med / sepp
Commits:
ade98c56 by Pierre Gruet at 2023-01-25T12:39:16+01:00
Dropping U mode in open() invocations
- - - - -
8dddfe94 by Pierre Gruet at 2023-01-25T12:40:42+01:00
routine-update: Standards-Version: 4.6.2
- - - - -
4ba8cab5 by Pierre Gruet at 2023-01-25T12:41:16+01:00
routine-update: Ready to upload to unstable
- - - - -
4 changed files:
- debian/changelog
- debian/control
- + debian/patches/open-U-obsolete.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+sepp (4.5.1+really4.5.1+dfsg-5) unstable; urgency=medium
+
+ * Dropping "U" mode from open() invocations, thanks to Steve Langasek!
+ (Closes: #1029580)
+ * Standards-Version: 4.6.2 (routine-update)
+
+ -- Pierre Gruet <pgt at debian.org> Wed, 25 Jan 2023 12:41:16 +0100
+
sepp (4.5.1+really4.5.1+dfsg-4) unstable; urgency=medium
* Updating d/watch after a change in the Github layout
=====================================
debian/control
=====================================
@@ -15,7 +15,7 @@ Build-Depends: debhelper-compat (= 13),
ncbi-blast+ <!nocheck>,
pplacer <!nocheck>,
hmmer <!nocheck>
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
Vcs-Browser: https://salsa.debian.org/med-team/sepp
Vcs-Git: https://salsa.debian.org/med-team/sepp.git
Homepage: https://github.com/smirarab/sepp/
=====================================
debian/patches/open-U-obsolete.patch
=====================================
@@ -0,0 +1,49 @@
+Description: Drop obsolete "U" mode passed to open()
+ The "U" mode has been deprecated in python since python3 and has had no
+ effect. In python 3.11, it is now disallowed. Drop this mode flag that
+ causes runtime failures.
+Author: Steve Langasek <steve.langasek at ubuntu.com>
+Forwarded: https://github.com/smirarab/sepp/issues/124
+Reviewed-by: Pierre Gruet <pgt at debian.org>
+Last-Update: 2023-01-24
+
+--- a/sepp/alignment.py
++++ b/sepp/alignment.py
+@@ -108,7 +108,7 @@
+ file_obj = None
+ if isinstance(src, str):
+ try:
+- file_obj = open(src, "rU")
++ file_obj = open(src, "r")
+ except IOError:
+ print(("The file `%s` does not exist, exiting gracefully" % src))
+ elif isinstance(src, filetypes):
+@@ -291,7 +291,7 @@
+ If duplicate sequence names are encountered then the old name will
+ be replaced.
+ """
+- file_obj = open(filename, 'rU')
++ file_obj = open(filename, 'r')
+ return self.read_file_object(file_obj, file_format=file_format)
+
+ def read_file_object(self, file_obj, file_format='FASTA'):
+@@ -582,7 +582,7 @@
+ columns. Labels insertion columns with special labels and labels the
+ rest of columns (i.e. original columns) sequentially.
+ """
+- handle = open(path, 'rU')
++ handle = open(path, 'r')
+ insertions = None
+ if aformat.lower() == "stockholm":
+ insertions = self._read_sto(handle)
+--- a/sepp/tree.py
++++ b/sepp/tree.py
+@@ -314,7 +314,7 @@
+
+ def read_tree_from_file(self, treefile, file_format):
+ dataset = Dataset()
+- dataset.read(open(treefile, 'rU'), schema=file_format)
++ dataset.read(open(treefile, 'r'), schema=file_format)
+ dendropy_tree = dataset.trees_blocks[0][0]
+ self._tree = dendropy_tree
+ self.n_leaves = self.count_leaves()
=====================================
debian/patches/series
=====================================
@@ -7,3 +7,4 @@ deactivating_log_test.patch
using_python3_interpreter.patch
hmmbuild_path_for_testUPP.patch
py310_collections_import.patch
+open-U-obsolete.patch
View it on GitLab: https://salsa.debian.org/med-team/sepp/-/compare/9117831622906a23e3aca4bbcc061530494c1de1...4ba8cab591159d6b61bf6566ba86d53c11f66b86
--
View it on GitLab: https://salsa.debian.org/med-team/sepp/-/compare/9117831622906a23e3aca4bbcc061530494c1de1...4ba8cab591159d6b61bf6566ba86d53c11f66b86
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/20230125/92a64118/attachment-0001.htm>
More information about the debian-med-commit
mailing list