From c6c1a3e099a8139137d6ef133d1d399ba1ee38bd Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Mon, 25 Feb 2019 12:35:24 +0100 Subject: Prevent Python 3.5 From Crashing The Build Python 3.5 has a bug that crashes the build. See the description in the issue tracker. The cure is to use a more recent contextlib.py and to avoid a PySide cleanup function that creates the crash. The problem is not solved for Python 3.5, and it is not clear if the testbinding module has a hidden bug, too. But this fix seems to be good enough for the moment. We should decide if we are going to fix Python 3.5 or abandon it altogether. Change-Id: Iacf2237de1f34d2b3cd1d68f1fb5833bdca3fdc2 Fixes: PYSIDE-953 Reviewed-by: Friedemann Kleint --- sources/pyside2/tests/registry/init_platform.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sources/pyside2/tests') diff --git a/sources/pyside2/tests/registry/init_platform.py b/sources/pyside2/tests/registry/init_platform.py index a324c36a2..6031dd2ad 100644 --- a/sources/pyside2/tests/registry/init_platform.py +++ b/sources/pyside2/tests/registry/init_platform.py @@ -55,7 +55,8 @@ shiboken and pysidetest projects. import sys import os import re -from contextlib import contextmanager +# PYSIDE-953: Use a newer contextlib for Python 3.5 +# from contextlib import contextmanager from textwrap import dedent script_dir = os.path.normpath(os.path.join(__file__, *".. .. .. .. ..".split())) @@ -117,6 +118,9 @@ sys.path[:0] = [os.path.join(shiboken_build_dir, "shibokenmodule"), pyside_build_dir] import PySide2 +# PYSIDE-953: Use a newer contextlib for Python 3.5 +import PySide2.support.signature # new contextlib +from contextlib import contextmanager all_modules = list("PySide2." + x for x in PySide2.__all__) -- cgit v1.2.3