commit:     3c2955b86d47c5ad95e40295f2b400af491eed6b
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Sat May 15 00:34:54 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Sat May 15 00:36:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c2955b8

dev-python/cython: adapt IndentationError test to python3_10

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 dev-python/cython/cython-0.29.23.ebuild                    |  1 +
 .../files/cython-0.29.23-test_exceptions-py310.patch       | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/dev-python/cython/cython-0.29.23.ebuild 
b/dev-python/cython/cython-0.29.23.ebuild
index d091b7190eb..ef4189bc3f4 100644
--- a/dev-python/cython/cython-0.29.23.ebuild
+++ b/dev-python/cython/cython-0.29.23.ebuild
@@ -32,6 +32,7 @@ BDEPEND="${RDEPEND}
 PATCHES=(
        "${FILESDIR}/${PN}-0.29.14-sphinx-update.patch"
        "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
+       "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch"
        "${FILESDIR}/${PN}-0.29.23-tracing-py310.patch"
 )
 

diff --git a/dev-python/cython/files/cython-0.29.23-test_exceptions-py310.patch 
b/dev-python/cython/files/cython-0.29.23-test_exceptions-py310.patch
new file mode 100644
index 00000000000..0c9fb2c9ea5
--- /dev/null
+++ b/dev-python/cython/files/cython-0.29.23-test_exceptions-py310.patch
@@ -0,0 +1,14 @@
+--- a/tests/run/test_exceptions.pyx
++++ b/tests/run/test_exceptions.pyx
+@@ -188,7 +188,10 @@
+ 
+         # should not apply to subclasses, see issue #31161
+         s = '''if True:\nprint "No indent"'''
+-        ckmsg(s, "expected an indented block", IndentationError)
++        if sys.version_info >= (3, 10):
++            ckmsg(s, "expected an indented block after 'if' statement on line 
1", IndentationError)
++        else:
++            ckmsg(s, "expected an indented block", IndentationError)
+ 
+         s = '''if True:\n        print()\n\texec "mixed tabs and spaces"'''
+         ckmsg(s, "inconsistent use of tabs and spaces in indentation", 
TabError)

Reply via email to