From 3ad43e55fa9e5e0297981ff7c81576d6e019a416 Mon Sep 17 00:00:00 2001 From: Carlos Cordoba Date: Fri, 20 Oct 2023 17:51:53 -0500 Subject: [PATCH] Online help: Avoid pydev warning under all circumstances This can also happen when Spyder is installed in a Python 3.11 environment besides our installer. --- spyder/plugins/onlinehelp/widgets.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/spyder/plugins/onlinehelp/widgets.py b/spyder/plugins/onlinehelp/widgets.py index 2936a752615..ba5d9bb3e37 100644 --- a/spyder/plugins/onlinehelp/widgets.py +++ b/spyder/plugins/onlinehelp/widgets.py @@ -23,7 +23,6 @@ # Local imports from spyder.api.translations import _ from spyder.api.widgets.main_widget import PluginMainWidget -from spyder.config.base import is_pynsist from spyder.plugins.onlinehelp.pydoc_patch import _start_server, _url_handler from spyder.widgets.browser import FrameWebView, WebViewActions from spyder.widgets.comboboxes import UrlComboBox @@ -69,10 +68,9 @@ def spyder_safeimport(path, forceload=0, cache={}): except Exception: pass -# Needed to prevent showing a warning message regarding debugging -# See spyder-ide/spyder#20390 -if is_pynsist(): - os.environ["PYDEVD_DISABLE_FILE_VALIDATION"] = "1" +# Needed to prevent showing a warning message regarding debugging. +# Fixes spyder-ide/spyder#20390 and spyder-ide/spyder#21171 +os.environ["PYDEVD_DISABLE_FILE_VALIDATION"] = "1" class PydocServer(QThread):