Skip to content

Commit

Permalink
Online help: Avoid pydev warning under all circumstances
Browse files Browse the repository at this point in the history
This can also happen when Spyder is installed in a Python 3.11
environment besides our installer.
  • Loading branch information
ccordoba12 committed Oct 20, 2023
1 parent 39dc4c4 commit 3ad43e5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions spyder/plugins/onlinehelp/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 3ad43e5

Please sign in to comment.