]> granicus.if.org Git - python/commitdiff
Issue #3812: Failed to build python if configure --without-threads.
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Tue, 9 Sep 2008 17:55:11 +0000 (17:55 +0000)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>
Tue, 9 Sep 2008 17:55:11 +0000 (17:55 +0000)
Removed itertools usage from Lib/traceback.py, because itertools
is extension module, so maybe unavailable on build process.
(Lib/_dummy_thread.py uses Lib/traceback.py)

Reviewed by Amaury Forgeot d'Arc.

Lib/traceback.py
Misc/NEWS

index b7130d899f79ea0daee9ebad2fbab868baf6e593..fac73c4b3e7e2badd00bb55e92496f401262d030 100644 (file)
@@ -3,7 +3,6 @@
 import linecache
 import sys
 import types
-import itertools
 
 __all__ = ['extract_stack', 'extract_tb', 'format_exception',
            'format_exception_only', 'format_list', 'format_stack',
@@ -130,7 +129,10 @@ def _iter_chain(exc, custom_tb=None, seen=None):
         its.append(_iter_chain(context, None, seen))
         its.append([(_context_message, None)])
     its.append([(exc, custom_tb or exc.__traceback__)])
-    return itertools.chain(*its)
+    # itertools.chain is in an extension module and may be unavailable
+    for it in its:
+        for x in it:
+            yield x
 
 
 def print_exception(etype, value, tb, limit=None, file=None, chain=True):
index 2a54c0cfb2ef1cf588a0ea92d5e77cc2c98b8297..7dde481a8658b74e8ba5067838035d66e2887210 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -165,6 +165,8 @@ Tools/Demos
 Build
 -----
 
+- Issue #3812: Failed to build python if configure --without-threads.
+
 - Issue #3791: Remove the bsddb module from the Windows installer, and the
   core bsddb library from the Windows build files.