diff --git a/MantidPlot/ipython_widget/mantid_ipython_widget.py b/MantidPlot/ipython_widget/mantid_ipython_widget.py index 69c4164872225dc0c68980d134ae7c8afa57f93f..1db19db04451d36f6222875d0e3f21346218eff4 100644 --- a/MantidPlot/ipython_widget/mantid_ipython_widget.py +++ b/MantidPlot/ipython_widget/mantid_ipython_widget.py @@ -7,6 +7,7 @@ from __future__ import (absolute_import, division, print_function) +import sys import threading import types import warnings @@ -36,6 +37,13 @@ except ImportError: from IPython.qt.inprocess import QtInProcessKernelManager +if sys.version_info.major >= 3 and sys.platform == 'win32': + # Tornado requires WindowsSelectorEventLoop + # https://www.tornadoweb.org/en/stable/#installation + import asyncio + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) + + def our_run_code(self, code_obj, result=None, async_=False): """ Method with which we replace the run_code method of IPython's InteractiveShell class. It calls the original method (renamed to ipython_run_code) on a separate thread diff --git a/buildconfig/CMake/Bootstrap.cmake b/buildconfig/CMake/Bootstrap.cmake index d8c80ef345f19c54eddb1a823dcdb0d1c0f159c1..1fda0d665ace20935775320f68fc7723e29b49e2 100644 --- a/buildconfig/CMake/Bootstrap.cmake +++ b/buildconfig/CMake/Bootstrap.cmake @@ -10,7 +10,7 @@ if( MSVC ) include ( ExternalProject ) set( EXTERNAL_ROOT ${PROJECT_SOURCE_DIR}/external CACHE PATH "Location to clone third party dependencies to" ) set( THIRD_PARTY_GIT_URL "https://github.com/mantidproject/thirdparty-msvc2015.git" ) - set ( THIRD_PARTY_GIT_SHA1 39a9535ce1320e49c6c34f9146e4cc140b31eca7 ) + set ( THIRD_PARTY_GIT_SHA1 85d085a4ca4e0813aff753c7b14c84cd50675897 ) set ( THIRD_PARTY_DIR ${EXTERNAL_ROOT}/src/ThirdParty ) # Generates a script to do the clone/update in tmp set ( _project_name ThirdParty ) diff --git a/qt/applications/workbench/workbench/app/mainwindow.py b/qt/applications/workbench/workbench/app/mainwindow.py index b4dc787f43e1ec4255e31ac1dafcda8fcbdf495c..14fa70eb2c0e588ed3c3339cd460e8c0c854b989 100644 --- a/qt/applications/workbench/workbench/app/mainwindow.py +++ b/qt/applications/workbench/workbench/app/mainwindow.py @@ -727,11 +727,19 @@ class MainWindow(QMainWindow): def initialize(): - """Perform an initialization of the application instance. Most notably - this patches sys.exit so that it does nothing. + """Perform an initialization of the application instance. + + - Patches sys.exit so that it does nothing. + - Uses WindowsSelectorEventLoop required by Tornado :return: A reference to the existing application instance """ + if sys.version_info.major >= 3 and sys.platform == 'win32': + # Tornado requires WindowsSelectorEventLoop + # https://www.tornadoweb.org/en/stable/#installation + import asyncio + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) + app = qapplication() # Monkey patching sys.exit so users can't kill