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

Subscribers

People subscribed via source and target branches