Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/zope-testrunner/files/, dev-python/zope-testrunner/
Date: Mon, 31 May 2021 12:09:49
Message-Id: 1622461615.2990366dbf3fe43fba228ef3d3701cd4b453346c.mgorny@gentoo
1 commit: 2990366dbf3fe43fba228ef3d3701cd4b453346c
2 Author: Zamarin Arthur <arthurzam <AT> gmail <DOT> com>
3 AuthorDate: Sun May 23 08:55:07 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon May 31 11:46:55 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2990366d
7
8 dev-python/zope-testrunner: bump to python 3.10
9
10 fix tests for python3.10
11 passes tests
12
13 Signed-off-by: Zamarin Arthur <arthurzam <AT> gmail.com>
14 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
15
16 .../zope-testrunner-5.3.0-fix-test-py3.10.patch | 64 ++++++++++++++++++++++
17 .../zope-testrunner/zope-testrunner-5.3.0.ebuild | 10 +++-
18 2 files changed, 71 insertions(+), 3 deletions(-)
19
20 diff --git a/dev-python/zope-testrunner/files/zope-testrunner-5.3.0-fix-test-py3.10.patch b/dev-python/zope-testrunner/files/zope-testrunner-5.3.0-fix-test-py3.10.patch
21 new file mode 100644
22 index 00000000000..6d495ba2cf5
23 --- /dev/null
24 +++ b/dev-python/zope-testrunner/files/zope-testrunner-5.3.0-fix-test-py3.10.patch
25 @@ -0,0 +1,64 @@
26 +From af8bfec49d90613633b76e914a6f54884463ba94 Mon Sep 17 00:00:00 2001
27 +From: Jerry James <loganjerry@×××××.com>
28 +Date: Mon, 10 May 2021 09:55:23 -0600
29 +Subject: [PATCH] Adapt to python 3.10 SyntaxError messages
30 +
31 +---
32 + .../testrunner/tests/testrunner-debugging-import-failure.rst | 2 +-
33 + src/zope/testrunner/tests/testrunner-errors.rst | 2 +-
34 + src/zope/testrunner/tests/testrunner-subunit-v2.rst | 2 +-
35 + src/zope/testrunner/tests/testrunner-subunit.rst | 2 +-
36 + 4 files changed, 4 insertions(+), 4 deletions(-)
37 +
38 +diff --git a/src/zope/testrunner/tests/testrunner-debugging-import-failure.rst b/src/zope/testrunner/tests/testrunner-debugging-import-failure.rst
39 +index 1613cb9..c0b2aee 100644
40 +--- a/src/zope/testrunner/tests/testrunner-debugging-import-failure.rst
41 ++++ b/src/zope/testrunner/tests/testrunner-debugging-import-failure.rst
42 +@@ -41,7 +41,7 @@ Post-mortem debugging also works when there is an import failure.
43 + File ".../TESTS-DIR/tests.py", line 2
44 + impot doctest
45 + ^
46 +- SyntaxError: invalid syntax
47 ++ SyntaxError: invalid syntax...
48 + > ...find.py(399)import_name()
49 + -> __import__(name)
50 + (Pdb) c
51 +diff --git a/src/zope/testrunner/tests/testrunner-errors.rst b/src/zope/testrunner/tests/testrunner-errors.rst
52 +index e210fe3..05d74b8 100644
53 +--- a/src/zope/testrunner/tests/testrunner-errors.rst
54 ++++ b/src/zope/testrunner/tests/testrunner-errors.rst
55 +@@ -818,7 +818,7 @@ Then run the tests:
56 + File "testrunner-ex/sample2/sampletests_i.py", line 1
57 + importx unittest
58 + ^
59 +- SyntaxError: invalid syntax
60 ++ SyntaxError: invalid syntax...
61 + <BLANKLINE>
62 + <BLANKLINE>
63 + Module: sample2.sample21.sampletests_i
64 +diff --git a/src/zope/testrunner/tests/testrunner-subunit-v2.rst b/src/zope/testrunner/tests/testrunner-subunit-v2.rst
65 +index 8658fe3..c165b23 100644
66 +--- a/src/zope/testrunner/tests/testrunner-subunit-v2.rst
67 ++++ b/src/zope/testrunner/tests/testrunner-subunit-v2.rst
68 +@@ -447,7 +447,7 @@ Let's run tests including a module with some bad syntax:
69 + File "/home/benji/workspace/all-the-trunks/zope.testrunner/src/zope/testrunner/testrunner-ex/sample2/badsyntax.py", line 16
70 + importx unittest # noqa: E999
71 + ^
72 +- SyntaxError: invalid syntax
73 ++ SyntaxError: invalid syntax...
74 + <BLANKLINE>
75 + id=sample2.badsyntax status=fail tags=(zope:import_error)
76 + id=sample2.sample21.sampletests_i status=inprogress
77 +diff --git a/src/zope/testrunner/tests/testrunner-subunit.rst b/src/zope/testrunner/tests/testrunner-subunit.rst
78 +index 6597a88..1882671 100644
79 +--- a/src/zope/testrunner/tests/testrunner-subunit.rst
80 ++++ b/src/zope/testrunner/tests/testrunner-subunit.rst
81 +@@ -480,7 +480,7 @@ Let's run tests including a module with some bad syntax:
82 + File "/home/benji/workspace/all-the-trunks/zope.testrunner/src/zope/testrunner/testrunner-ex/sample2/badsyntax.py", line 16
83 + importx unittest # noqa: E999
84 + ^
85 +- SyntaxError: invalid syntax
86 ++ SyntaxError: invalid syntax...
87 + ]
88 + test: sample2.sample21.sampletests_i
89 + tags: zope:import_error
90
91 diff --git a/dev-python/zope-testrunner/zope-testrunner-5.3.0.ebuild b/dev-python/zope-testrunner/zope-testrunner-5.3.0.ebuild
92 index 07f992c4b75..1142107a76c 100644
93 --- a/dev-python/zope-testrunner/zope-testrunner-5.3.0.ebuild
94 +++ b/dev-python/zope-testrunner/zope-testrunner-5.3.0.ebuild
95 @@ -4,7 +4,7 @@
96 EAPI=7
97
98 DISTUTILS_USE_SETUPTOOLS=rdepend
99 -PYTHON_COMPAT=( python3_{7..9} pypy3 )
100 +PYTHON_COMPAT=( python3_{7..10} pypy3 )
101
102 inherit distutils-r1
103
104 @@ -20,13 +20,17 @@ LICENSE="ZPL"
105 SLOT="0"
106 KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
107
108 -BDEPEND="
109 - test? ( dev-python/zope-testing[${PYTHON_USEDEP}] )"
110 RDEPEND="
111 dev-python/namespace-zope[${PYTHON_USEDEP}]
112 dev-python/six[${PYTHON_USEDEP}]
113 dev-python/zope-exceptions[${PYTHON_USEDEP}]
114 dev-python/zope-interface[${PYTHON_USEDEP}]"
115 +BDEPEND="
116 + test? ( dev-python/zope-testing[${PYTHON_USEDEP}] )"
117 +
118 +PATCHES=(
119 + "${FILESDIR}/${P}-fix-test-py3.10.patch"
120 +)
121
122 distutils_enable_tests setup.py