Merge ~ahasenack/ubuntu/+source/sepp:jammy-py310-collections-import into ubuntu/+source/sepp:ubuntu/devel

Proposed by Andreas Hasenack
Status: Merged
Merge reported by: Andreas Hasenack
Merged at revision: 95f7718f879f7d401db3e0281fd31726fec888e0
Proposed branch: ~ahasenack/ubuntu/+source/sepp:jammy-py310-collections-import
Merge into: ubuntu/+source/sepp:ubuntu/devel
Diff against target: 67 lines (+35/-1)
4 files modified
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/py310_collections_import.patch (+25/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Lucas Kanashiro (community) Approve
Canonical Server Pending
Review via email: mp+415097@code.launchpad.net

Description of the change

Another collections import fix. Submitted upstream[1] and to debian via BTS[2] and salsa[3].

I wondered about wrapping the import in a version check, but I went to old ubuntu releases, and in all current ones the import from collections.abc works. I'll leave it for upstream to check which python versions they support and decide if they want to do a version check or not.

PPA: https://launchpad.net/~ahasenack/+archive/ubuntu/py310-collections/+packages

1. https://github.com/smirarab/sepp/issues/117
2. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004968
3. https://salsa.debian.org/med-team/sepp/-/merge_requests/1

To post a comment you must log in.
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

LGTM, +1.

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks, uploaded

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This migrated

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index fffa670..96941a6 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+sepp (4.5.1+really4.5.1+dfsg-2ubuntu1) jammy; urgency=medium
7+
8+ * d/p/py310_collections_import.patch: fix collections import
9+ under python 3.10+ (LP: #1959938)
10+
11+ -- Andreas Hasenack <andreas@canonical.com> Thu, 03 Feb 2022 21:21:56 +0000
12+
13 sepp (4.5.1+really4.5.1+dfsg-2) unstable; urgency=medium
14
15 * Upload to unstable, tipp has now exited NEW
16diff --git a/debian/control b/debian/control
17index a6edc56..bc4a2e5 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -1,5 +1,6 @@
21 Source: sepp
22-Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
23+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
24+XSBC-Original-Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
25 Uploaders: Andreas Tille <tille@debian.org>,
26 Pierre Gruet <pgt@debian.org>
27 Section: science
28diff --git a/debian/patches/py310_collections_import.patch b/debian/patches/py310_collections_import.patch
29new file mode 100644
30index 0000000..497f145
31--- /dev/null
32+++ b/debian/patches/py310_collections_import.patch
33@@ -0,0 +1,25 @@
34+Description: fix collections import
35+ In python 3.10[1] deprecated aliases to Collections Abstract Base Classes from
36+ the collections module have been removed. These imports must be done from
37+ collections.abc.
38+ .
39+ 1. https://docs.python.org/3/whatsnew/3.10.html
40+Author: Andreas Hasenack <andreas@canonical.com>
41+Bug: https://github.com/smirarab/sepp/issues/117
42+Bug-Debian: https://bugs.debian.org/1004968
43+Bub-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/sepp/+bug/1959938
44+Last-Update: 2022-02-03
45+diff --git a/sepp/alignment.py b/sepp/alignment.py
46+index ada5de8..61e9adb 100644
47+--- a/sepp/alignment.py
48++++ b/sepp/alignment.py
49+@@ -26,7 +26,8 @@ import re
50+
51+ from sepp.filemgr import open_with_intermediates
52+
53+-from collections import Mapping
54++
55++from collections.abc import Mapping
56+ import copy
57+ from sepp import get_logger
58+ import io
59diff --git a/debian/patches/series b/debian/patches/series
60index 7d1d553..ea62f10 100644
61--- a/debian/patches/series
62+++ b/debian/patches/series
63@@ -6,3 +6,4 @@ configuration_files_in_etc_and_per_user.patch
64 deactivating_log_test.patch
65 using_python3_interpreter.patch
66 hmmbuild_path_for_testUPP.patch
67+py310_collections_import.patch

Subscribers

People subscribed via source and target branches