Oops.  I copied a slightly older version of the email package from the sandbox.
This should restore the email package in the py3k branch to exactly what's in
the sandbox.

This wipes out 1-2 fixes made post-copy, which I'll re-apply shortly.
diff --git a/Lib/email/generator.py b/Lib/email/generator.py
index 1352ede..2d6a191 100644
--- a/Lib/email/generator.py
+++ b/Lib/email/generator.py
@@ -133,12 +133,8 @@
     def _write_headers(self, msg):
         for h, v in msg.items():
             print('%s:' % h, end=' ', file=self._fp)
-            if self._maxheaderlen == 0:
-                # Explicit no-wrapping
-                print(v, file=self._fp)
-            elif isinstance(v, Header):
-                # Header instances know what to do
-                print(v.encode(), file=self._fp)
+            if isinstance(v, Header):
+                print(v.encode(maxlinelen=self._maxheaderlen), file=self._fp)
             else:
                 # Header's got lots of smarts, so use it.
                 header = Header(v, maxlinelen=self._maxheaderlen,