Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
number of tests, all because of the codecs/_multibytecodecs issue described
here (it's not a Py3K issue, just something Py3K discovers):
http://mail.python.org/pipermail/python-dev/2006-April/064051.html

Hye-Shik Chang promised to look for a fix, so no need to fix it here. The
tests that are expected to break are:

test_codecencodings_cn
test_codecencodings_hk
test_codecencodings_jp
test_codecencodings_kr
test_codecencodings_tw
test_codecs
test_multibytecodec

This merge fixes an actual test failure (test_weakref) in this branch,
though, so I believe merging is the right thing to do anyway.
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index b42caa3..c64ad28 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -119,7 +119,8 @@
 # excepthandler, arguments, keywords, alias
 
 if __name__=='__main__' and sys.argv[1:] == ['-g']:
-    for statements, kind in ((exec_tests, "exec"), (single_tests, "single"), (eval_tests, "eval")):
+    for statements, kind in ((exec_tests, "exec"), (single_tests, "single"),
+                             (eval_tests, "eval")):
         print kind+"_results = ["
         for s in statements:
             print repr(to_tuple(compile(s, "?", kind, 0x400)))+","
@@ -131,7 +132,7 @@
 
     if not isinstance(ast_node, _ast.AST) or ast_node._fields == None:
         return
-    if isinstance(ast_node, (_ast.expr, _ast.stmt)):
+    if isinstance(ast_node, (_ast.expr, _ast.stmt, _ast.excepthandler)):
         node_pos = (ast_node.lineno, ast_node.col_offset)
         assert node_pos >= parent_pos, (node_pos, parent_pos)
         parent_pos = (ast_node.lineno, ast_node.col_offset)
@@ -145,8 +146,8 @@
 
 def run_tests():
     for input, output, kind in ((exec_tests, exec_results, "exec"),
-                                        (single_tests, single_results, "single"),
-                                        (eval_tests, eval_results, "eval")):
+                                (single_tests, single_results, "single"),
+                                (eval_tests, eval_results, "eval")):
         for i, o in itertools.izip(input, output):
             ast_tree = compile(i, "?", kind, 0x400)
             assert to_tuple(ast_tree) == o
@@ -165,7 +166,7 @@
 ('Module', [('While', (1, 0), ('Name', (1, 6), 'v', ('Load',)), [('Pass', (1, 8))], [])]),
 ('Module', [('If', (1, 0), ('Name', (1, 3), 'v', ('Load',)), [('Pass', (1, 5))], [])]),
 ('Module', [('Raise', (1, 0), ('Name', (1, 6), 'Exception', ('Load',)), ('Str', (1, 17), 'string'), None)]),
-('Module', [('TryExcept', (1, 0), [('Pass', (2, 2))], [('excepthandler', ('Name', (3, 7), 'Exception', ('Load',)), None, [('Pass', (4, 2))])], [])]),
+('Module', [('TryExcept', (1, 0), [('Pass', (2, 2))], [('excepthandler', (3, 0), ('Name', (3, 7), 'Exception', ('Load',)), None, [('Pass', (4, 2))], 3, 0)], [])]),
 ('Module', [('TryFinally', (1, 0), [('Pass', (2, 2))], [('Pass', (4, 2))])]),
 ('Module', [('Assert', (1, 0), ('Name', (1, 7), 'v', ('Load',)), None)]),
 ('Module', [('Import', (1, 0), [('alias', 'sys', None)])]),