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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 28 Mar 2015 12:11:11 +0100
changeset 4187
61fd08bac49b
parent 4186
e2bf1c32272b
child 4189
283cc9507dcd

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

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	Sat Mar 28 11:49:02 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	Sat Mar 28 11:49:02 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	Sat Mar 28 11:49:02 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	Sat Mar 28 11:49:02 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