Merged revisions 70956 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70956 | brett.cannon | 2009-04-01 09:00:34 -0700 (Wed, 01 Apr 2009) | 5 lines

  The cgitb module had imports in its functions. This can cause deadlock with the
  import lock if called from within a thread that was triggered by an import.

  Partially fixes issue #1665206.
........
diff --git a/Misc/NEWS b/Misc/NEWS
index 4a90ba5..524a79c 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -286,6 +286,10 @@
 Library
 -------
 
+- Issue #1665206 (partially): Move imports in cgitb to the top of the module
+  instead of performing them in functions. Helps prevent import deadlocking in
+  threads.
+
 - Issue #2522: locale.format now checks its first argument to ensure it has
   been passed only one pattern, avoiding mysterious errors where it appeared
   that it was failing to do localization.