Fixed an issue in the Python debug clients causing unit tests to fail for threaded code (s. issue 178). 6_0_x

Sat, 28 Mar 2015 12:11:11 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 28 Mar 2015 12:11:11 +0100
branch
6_0_x
changeset 4188
447bd181896b
parent 4185
07030b761baf
child 4190
d9693316149f

Fixed an issue in the Python debug clients causing unit tests to fail for threaded code (s. issue 178).
(grafted from 61fd08bac49ba3ce2bc15f897c7651b61f32077f)

DebugClients/Python/DebugClientThreads.py file | annotate | diff | comparison | revisions
DebugClients/Python/DebugThread.py file | annotate | diff | comparison | revisions
DebugClients/Python3/DebugClientThreads.py file | annotate | diff | comparison | revisions
DebugClients/Python3/DebugThread.py file | annotate | diff | comparison | revisions
--- a/DebugClients/Python/DebugClientThreads.py	Thu Mar 26 22:20:47 2015 +0100
+++ b/DebugClients/Python/DebugClientThreads.py	Sat Mar 28 12:11:11 2015 +0100
@@ -103,6 +103,8 @@
                     sys.setprofile(newThread.profile)
             else:
                 ident = _original_start_thread(newThread.bootstrap, ())
+                if self.mainThread is not None:
+                    self.tracePython = self.mainThread.tracePython
             newThread.set_ident(ident)
             self.threads[newThread.get_ident()] = newThread
         finally:
--- a/DebugClients/Python/DebugThread.py	Thu Mar 26 22:20:47 2015 +0100
+++ b/DebugClients/Python/DebugThread.py	Sat Mar 28 12:11:11 2015 +0100
@@ -46,6 +46,7 @@
         
         self.__ident = None  # id of this thread.
         self.__name = ""
+        self.tracePython = False
     
     def set_ident(self, id):
         """
--- a/DebugClients/Python3/DebugClientThreads.py	Thu Mar 26 22:20:47 2015 +0100
+++ b/DebugClients/Python3/DebugClientThreads.py	Sat Mar 28 12:11:11 2015 +0100
@@ -104,6 +104,8 @@
                     sys.setprofile(newThread.profile)
             else:
                 ident = _original_start_thread(newThread.bootstrap, ())
+                if self.mainThread is not None:
+                    self.tracePython = self.mainThread.tracePython
             newThread.set_ident(ident)
             self.threads[newThread.get_ident()] = newThread
         finally:
--- a/DebugClients/Python3/DebugThread.py	Thu Mar 26 22:20:47 2015 +0100
+++ b/DebugClients/Python3/DebugThread.py	Sat Mar 28 12:11:11 2015 +0100
@@ -46,6 +46,7 @@
         
         self.__ident = None  # id of this thread.
         self.__name = ""
+        self.tracePython = False
     
     def set_ident(self, id):
         """

eric ide

mercurial