Patch 1352 (continued in issue 1329) by Christian Heimes.
Before sys.stderr is set to the proper thing, set it to a really simple
file-like object that can print tracebacks using direct file descriptor I/O.
This is handy for debugging.
diff --git a/Objects/object.c b/Objects/object.c
index f6d125f..77ddb1d 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -1595,6 +1595,9 @@
if (PyType_Ready(&PyCode_Type) < 0)
Py_FatalError("Can't initialize 'code'");
+
+ if (PyType_Ready(&PyStdPrinter_Type) < 0)
+ Py_FatalError("Can't initialize StdPrinter");
}