src/eric7/Project/Project.py

branch
eric7-maintenance
changeset 10349
df7edc29cbfb
parent 10272
7ae72d1df070
parent 10321
4a017fdf316f
child 10364
e90957951622
diff -r e075c8fe07fd -r df7edc29cbfb src/eric7/Project/Project.py
--- a/src/eric7/Project/Project.py	Tue Oct 31 09:23:05 2023 +0100
+++ b/src/eric7/Project/Project.py	Wed Nov 29 14:23:36 2023 +0100
@@ -505,12 +505,12 @@
         self.dbgCmdline = ""
         self.dbgWd = ""
         self.dbgEnv = ""
-        self.dbgReportExceptions = True
         self.dbgExcList = []
         self.dbgExcIgnoreList = []
         self.dbgAutoClearShell = True
         self.dbgTracePython = False
         self.dbgAutoContinue = True
+        self.dbgReportAllExceptions = False
         self.dbgEnableMultiprocess = True
         self.dbgMultiprocessNoDebug = ""
         self.dbgGlobalConfigOverride = {
@@ -712,9 +712,7 @@
         """
         return list(self.__fileCategoriesRepository.keys())
 
-    def getFileCategoryFilters(
-        self, categories=None, withOthers=False, withAll=True
-    ):
+    def getFileCategoryFilters(self, categories=None, withOthers=False, withAll=True):
         """
         Public method to get a list of file selection filters for the given categories.
 
@@ -775,7 +773,7 @@
         """
         return ";;".join(
             self.getFileCategoryFilters(
-                categ=categories, withOthers=withOthers, withAll=withAll
+                categories=categories, withOthers=withOthers, withAll=withAll
             )
         )
 
@@ -1563,6 +1561,7 @@
             "REMOTEDEBUGGER": False,
             "REMOTEHOST": "",
             "REMOTECOMMAND": "",
+            "REMOTEDEBUGCLIENT": "",
             "PATHTRANSLATION": False,
             "REMOTEPATH": "",
             "LOCALPATH": "",
@@ -1612,12 +1611,12 @@
         argv,
         wd,
         env,
-        excReporting,
         excList,
         excIgnoreList,
         autoClearShell,
         tracePython=None,
         autoContinue=None,
+        reportAllExceptions=None,
         enableMultiprocess=None,
         multiprocessNoDebug=None,
         configOverride=None,
@@ -1633,8 +1632,6 @@
         @type str
         @param env environment setting
         @type str
-        @param excReporting flag indicating the highlighting of exceptions
-        @type bool
         @param excList list of exceptions to be highlighted
         @type list of str
         @param excIgnoreList list of exceptions to be ignored
@@ -1648,6 +1645,9 @@
         @param autoContinue flag indicating, that the debugger should not
             stop at the first executable line
         @type bool
+        @param reportAllExceptions flag indicating to report all exceptions
+            instead of unhandled exceptions only
+        @type bool
         @param enableMultiprocess flag indicating, that the debugger should
             run in multi process mode
         @type bool
@@ -1662,7 +1662,6 @@
         self.dbgCmdline = argv
         self.dbgWd = wd
         self.dbgEnv = env
-        self.dbgReportExceptions = excReporting
         self.dbgExcList = excList[:]  # keep a copy of the list
         self.dbgExcIgnoreList = excIgnoreList[:]  # keep a copy of the list
         self.dbgAutoClearShell = autoClearShell
@@ -1670,6 +1669,8 @@
             self.dbgTracePython = tracePython
         if autoContinue is not None:
             self.dbgAutoContinue = autoContinue
+        if reportAllExceptions is not None:
+            self.dbgReportAllExceptions = reportAllExceptions
         if enableMultiprocess is not None:
             self.dbgEnableMultiprocess = enableMultiprocess
         if multiprocessNoDebug is not None:
@@ -6516,6 +6517,7 @@
 
         for sourceline in sourcelines:
             if sourceline.startswith("version = "):
+                # old variant of plugin header
                 version = (
                     sourceline.replace("version = ", "")
                     .strip()
@@ -6523,6 +6525,17 @@
                     .replace("'", "")
                 )
                 break
+            elif sourceline.strip().startswith(('"version":', "'version':")):
+                # new variant of plugin header
+                version = (
+                    sourceline.replace('"version":', "")
+                    .replace("'version':", "")
+                    .replace('"', "")
+                    .replace("'", "")
+                    .replace(",", "")
+                    .strip()
+                )
+                break
 
         return version
 
@@ -7119,6 +7132,17 @@
                 self.__venvConfiguration["interpreter"]
             ) or not os.access(self.__venvConfiguration["interpreter"], os.X_OK):
                 self.__venvConfiguration["interpreter"] = ""
+                upgrade = EricMessageBox.yesNo(
+                    None,
+                    self.tr("Interpreter Missing"),
+                    self.tr(
+                        "The configured interpreter of the embedded environment does"
+                        " not exist anymore. Shall the environment be upgraded?"
+                    ),
+                    yesDefault=True,
+                )
+                if upgrade:
+                    self.__createEmbeddedEnvironment(upgrade=True)
         except (OSError, json.JSONDecodeError):
             # the configuration file does not exist or is invalid JSON
             self.__initVenvConfiguration()

eric ide

mercurial