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

Proposed by Andreas Hasenack
Status: Merged
Merged at revision: d54c731f77da003524fbff1d6b49ca51c32ca6f7
Proposed branch: ~ahasenack/ubuntu/+source/pythonpy:jammy-py310-collections-import
Merge into: ubuntu/+source/pythonpy:ubuntu/devel
Diff against target: 68 lines (+35/-1)
4 files modified
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/0003-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+415105@code.launchpad.net

Description of the change

Another python 3.10 collections import fix.

Upstream is gone, there is just the pypi page[1] but the "homepage" link[2] is 404.

Debian VCS tags from d/control[3] are also gone.

To test, just run:

$ py "3 * 2"
6

And this, with the patches applied (dquilt push -a):
$ python3 -m unittest discover -v
test_empty (test.test_pythonpy.TestPythonPy) ... ok
test_ignore_errors (test.test_pythonpy.TestPythonPy) ... ok
test_imports (test.test_pythonpy.TestPythonPy) ... ok
test_numbers (test.test_pythonpy.TestPythonPy) ... ok
test_range (test.test_pythonpy.TestPythonPy) ... ok
test_split_input (test.test_pythonpy.TestPythonPy) ... ok
test_split_output (test.test_pythonpy.TestPythonPy) ... ok
test_statements (test.test_pythonpy.TestPythonPy) ... ok

----------------------------------------------------------------------
Ran 8 tests in 1.188s

Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004971
PPA: thttps://launchpad.net/~ahasenack/+archive/ubuntu/py310-collections/+packages

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

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 6dc01d6..7e3dc4d 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+pythonpy (0.4.11b-3ubuntu1) jammy; urgency=medium
7+
8+ * d/p/0003-py310-collections-import.patch: fix collections import
9+ under python 3.10+ (LP: #1878935)
10+
11+ -- Andreas Hasenack <andreas@canonical.com> Fri, 04 Feb 2022 14:37:46 +0000
12+
13 pythonpy (0.4.11b-3) unstable; urgency=medium
14
15 * Avoid 'pycompleter' as a system-wide executable:
16diff --git a/debian/control b/debian/control
17index 0cadb15..e62ab35 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -1,7 +1,8 @@
21 Source: pythonpy
22 Section: utils
23 Priority: optional
24-Maintainer: Tiago Ilieve <tiago.myhro@gmail.com>
25+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
26+XSBC-Original-Maintainer: Tiago Ilieve <tiago.myhro@gmail.com>
27 Build-Depends: bash-completion,
28 debhelper (>= 9),
29 dh-python,
30diff --git a/debian/patches/0003-py310-collections-import.patch b/debian/patches/0003-py310-collections-import.patch
31new file mode 100644
32index 0000000..7de4027
33--- /dev/null
34+++ b/debian/patches/0003-py310-collections-import.patch
35@@ -0,0 +1,25 @@
36+Description: fix collections import under py3.10+
37+ In python 3.10[1] deprecated aliases to Collections Abstract Base Classes from
38+ the collections module have been removed. These imports must be done from
39+ collections.abc.
40+ .
41+ 1. https://docs.python.org/3/whatsnew/3.10.html
42+Author: Daniel Franklin <https://launchpad.net/~dzfranklin>
43+Origin: other, https://bugs.launchpad.net/ubuntu/+source/pythonpy/+bug/1878935/comments/1
44+Bug-Debian: https://bugs.debian.org/1004971
45+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/pythonpy/+bug/1878935
46+Forwarded: no, upstream is gone
47+Last-Update: 2022-02-04
48+diff --git a/pythonpy/__main__.py b/pythonpy/__main__.py
49+index 8602b28..7fa3733 100755
50+--- a/pythonpy/__main__.py
51++++ b/pythonpy/__main__.py
52+@@ -13,7 +13,7 @@ signal(SIGPIPE,SIG_DFL)
53+ import argparse
54+ import json
55+ import re
56+-from collections import Iterable
57++from collections.abc import Iterable
58+
59+ try:
60+ from . import __version__
61diff --git a/debian/patches/series b/debian/patches/series
62index 48edd71..7435bb6 100644
63--- a/debian/patches/series
64+++ b/debian/patches/series
65@@ -1,2 +1,3 @@
66 0001-remove-entry-points-scripts.patch
67 0002-fix-bash-completion.patch
68+0003-py310-collections-import.patch

Subscribers

People subscribed via source and target branches