Merge ~athos-ribeiro/ubuntu/+source/python-testtools:python-310 into ubuntu/+source/python-testtools:ubuntu/devel

Proposed by Athos Ribeiro
Status: Merged
Merge reported by: Athos Ribeiro
Merged at revision: 094a81363c503df5f0405415d4e9e71c35341ec2
Proposed branch: ~athos-ribeiro/ubuntu/+source/python-testtools:python-310
Merge into: ubuntu/+source/python-testtools:ubuntu/devel
Diff against target: 155 lines (+122/-1)
4 files modified
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/add-python-3.10-support.patch (+112/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Ubuntu Sponsors Pending
git-ubuntu import Pending
Review via email: mp+412239@code.launchpad.net

Description of the change

This is a fix for https://bugs.launchpad.net/ubuntu/+source/python-testtools/+bug/1951877 to add Python 3.10 support to this package.

This package is available in a PPA at https://launchpad.net/~athos-ribeiro/+archive/ubuntu/python-testtools-310-support/+packages

I ran the dep8 tests for this package locally. This is the results summary:

autopkgtest [17:33:53]: @@@@@@@@@@@@@@@@@@@@ summary
testsuite-py3 PASS

To post a comment you must log in.

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 69a0f86..cdd8bcd 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+python-testtools (2.5.0-2ubuntu1) jammy; urgency=medium
7+
8+ * d/p/add-python-3.10-support.patch: Add support for Python 3.10
9+ (LP: #1951877)
10+
11+ -- Athos Ribeiro <athos.ribeiro@canonical.com> Mon, 22 Nov 2021 17:19:39 -0300
12+
13 python-testtools (2.5.0-2) unstable; urgency=medium
14
15 * Uploading to unstable.
16diff --git a/debian/control b/debian/control
17index 3e0b0a5..53b1fba 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -1,7 +1,8 @@
21 Source: python-testtools
22 Section: python
23 Priority: optional
24-Maintainer: Debian OpenStack <team+openstack@tracker.debian.org>
25+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
26+XSBC-Original-Maintainer: Debian OpenStack <team+openstack@tracker.debian.org>
27 Uploaders:
28 Thomas Goirand <zigo@debian.org>,
29 Jelmer Vernooij <jelmer@debian.org>,
30diff --git a/debian/patches/add-python-3.10-support.patch b/debian/patches/add-python-3.10-support.patch
31new file mode 100644
32index 0000000..63a2376
33--- /dev/null
34+++ b/debian/patches/add-python-3.10-support.patch
35@@ -0,0 +1,112 @@
36+From ec9bb7ed026566688a14be9d8d5d1e4c506e71c0 Mon Sep 17 00:00:00 2001
37+From: =?UTF-8?q?J=C3=BCrgen=20Gmach?= <juergen.gmach@googlemail.com>
38+Date: Thu, 14 Oct 2021 21:00:21 +0200
39+Subject: [PATCH] Add support for Python 3.10
40+
41+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-testtools/+bug/1951877
42+Last-Update: 2021-11-22
43+Origin: upstream, https://github.com/testing-cabal/testtools/commit/ec9bb7ed026566688a14be9d8d5d1e4c506e71c0
44+---
45+ .github/workflows/test.yml | 2 +-
46+ NEWS | 9 +++++++++
47+ scripts/all-pythons | 2 +-
48+ setup.cfg | 1 +
49+ testtools/tests/test_testresult.py | 5 ++++-
50+ tox.ini | 2 +-
51+ 6 files changed, 17 insertions(+), 4 deletions(-)
52+
53+diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
54+index 70cacf7..44c27b7 100644
55+--- a/.github/workflows/test.yml
56++++ b/.github/workflows/test.yml
57+@@ -8,7 +8,7 @@ jobs:
58+ strategy:
59+ fail-fast: false
60+ matrix:
61+- python-version: [3.5, 3.6, 3.7, 3.8, 3.9, 3.10-dev, pypy3]
62++ python-version: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10", pypy3]
63+
64+ steps:
65+ - uses: actions/checkout@v2
66+diff --git a/NEWS b/NEWS
67+index df49f5e..cf7f84f 100644
68+--- a/NEWS
69++++ b/NEWS
70+@@ -3,6 +3,15 @@ testtools NEWS
71+
72+ Changes and improvements to testtools_, grouped by release.
73+
74++NEXT
75++~~~~
76++
77++Improvements
78++------------
79++
80++* Add support for Python 3.10.
81++ (Jürgen Gmach)
82++
83+ 2.5.0
84+ ~~~~~
85+
86+diff --git a/scripts/all-pythons b/scripts/all-pythons
87+index 6996a44..0fbe010 100755
88+--- a/scripts/all-pythons
89++++ b/scripts/all-pythons
90+@@ -89,5 +89,5 @@ def now():
91+ if __name__ == '__main__':
92+ sys.path.append(ROOT)
93+ result = TestProtocolClient(sys.stdout)
94+- for version in '3.5 3.6 3.7 3.8 3.9'.split():
95++ for version in '3.5 3.6 3.7 3.8 3.9 3.10'.split():
96+ run_for_python(version, result, sys.argv[1:])
97+diff --git a/setup.cfg b/setup.cfg
98+index f252785..c31f8f3 100644
99+--- a/setup.cfg
100++++ b/setup.cfg
101+@@ -17,6 +17,7 @@ classifier =
102+ Programming Language :: Python :: 3.7
103+ Programming Language :: Python :: 3.8
104+ Programming Language :: Python :: 3.9
105++ Programming Language :: Python :: 3.10
106+ Programming Language :: Python :: 3 :: Only
107+ Programming Language :: Python :: Implementation :: CPython
108+ Programming Language :: Python :: Implementation :: PyPy
109+diff --git a/testtools/tests/test_testresult.py b/testtools/tests/test_testresult.py
110+index a9db0e2..4fbf15d 100644
111+--- a/testtools/tests/test_testresult.py
112++++ b/testtools/tests/test_testresult.py
113+@@ -2667,16 +2667,19 @@ class TestNonAsciiResults(TestCase):
114+ """Syntax errors should still have fancy special-case formatting"""
115+ if platform.python_implementation() == "PyPy":
116+ spaces = ' '
117++ marker = '^'
118+ elif sys.version_info >= (3, 10):
119+ spaces = ' '
120++ marker = '^^^'
121+ else:
122+ spaces = ' '
123++ marker = '^'
124+ textoutput = self._test_external_case("exec ('f(a, b c)')")
125+ self.assertIn(self._as_output(
126+ ' File "<string>", line 1\n'
127+ ' f(a, b c)\n'
128+ + ' ' * self._error_on_character +
129+- spaces + '^\n'
130++ spaces + marker + '\n'
131+ 'SyntaxError: '
132+ ), textoutput)
133+
134+diff --git a/tox.ini b/tox.ini
135+index 5e9ab12..0416e06 100644
136+--- a/tox.ini
137++++ b/tox.ini
138+@@ -1,5 +1,5 @@
139+ [tox]
140+-envlist = py35,py36,py37,py38,py39,310,pypy3
141++envlist = py35,py36,py37,py38,py39,py310,pypy3
142+ minversion = 1.6
143+
144+ [testenv]
145+--
146+2.32.0
147+
148diff --git a/debian/patches/series b/debian/patches/series
149index 7b6c61e..0cbb43c 100644
150--- a/debian/patches/series
151+++ b/debian/patches/series
152@@ -1,2 +1,3 @@
153 neutralize-failing-test.patch
154 remove-test_syntax_error_line_utf_8.patch
155+add-python-3.10-support.patch

Subscribers

People subscribed via source and target branches