[New-bugs-announce] [issue10330] trace module doesn't work without threads

Antoine Pitrou report at bugs.python.org
Fri Nov 5 21:21:19 CET 2010

New submission from Antoine Pitrou <pitrou at free.fr>:

The trace module doesn't work when threading is disabled ("./configure --without-threads"). The following patch fixes this:

diff -r 345827dcf409 Lib/trace.py
--- a/Lib/trace.py      Fri Nov 05 20:58:28 2010 +0100
+++ b/Lib/trace.py      Fri Nov 05 21:20:09 2010 +0100
@@ -53,7 +53,10 @@ import linecache
 import os
 import re
 import sys
-import threading
+    import threading
+except ImportError:
+    import dummy_threading as threading
 import time
 import token
 import tokenize

assignee: belopolsky
components: Library (Lib)
messages: 120529
nosy: belopolsky, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: trace module doesn't work without threads
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list