From 936cc119e6cf4608bcc37e2dafe99b18a41728f9 Mon Sep 17 00:00:00 2001 From: Ryan Clary Date: Wed, 22 Dec 2021 12:43:22 -0800 Subject: [PATCH] Put PYTHONPATH Manager paths at the front of sys.path rather than inserting at position 1. Was the intention to always have the current working directory ('') at position 0? Because it was not at position 0. --- spyder/app/mainwindow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spyder/app/mainwindow.py b/spyder/app/mainwindow.py index 938ea1e68bb..9a185b23a3c 100644 --- a/spyder/app/mainwindow.py +++ b/spyder/app/mainwindow.py @@ -1748,7 +1748,8 @@ def update_python_path(self, new_path_dict): for path, active in reversed(new_path_dict_p.items()): if active: - sys.path.insert(1, path) + # TODO: should cwd ('') always be at front? + sys.path.insert(0, path) # Any plugin that needs to do some work based on this signal should # connect to it on plugin registration