dev-python/cython: Disable obsolete with_outer_raising test
authorMichał Górny <mgorny@gentoo.org>
Sun, 15 Jul 2018 18:18:59 +0000 (20:18 +0200)
committerMichał Górny <mgorny@gentoo.org>
Mon, 16 Jul 2018 19:56:22 +0000 (21:56 +0200)
Disable with_outer_raising test that is now obsolete because Python 3.7
forbids using StopIteration to terminate a generator (PEP 479).

dev-python/cython/cython-0.28.4.ebuild

index eecc7a4ba32698eca514a4eccd0d28f07d709942..cf9e239cebaef7b97181f1817b83f50955bcabaa 100644 (file)
@@ -32,6 +32,14 @@ DEPEND="${RDEPEND}
 SITEFILE=50cython-gentoo.el
 S="${WORKDIR}/${MY_PN}-${PV%_*}"
 
+python_prepare_all() {
+       # tests behavior that is illegal in Python 3.7+
+       # https://github.com/cython/cython/issues/2454
+       sed -i -e '/with_outer_raising/,/return/d' tests/run/generators_py.py || die
+
+       distutils-r1_python_prepare_all
+}
+
 python_compile() {
        if ! python_is_python3; then
                local CFLAGS="${CFLAGS} -fno-strict-aliasing"