diff -r b66e82c9f852 Lib/importlib/abc.py --- a/Lib/importlib/abc.py Tue Jun 26 23:05:27 2012 +0200 +++ b/Lib/importlib/abc.py Tue Jun 26 22:33:07 2012 -0700 @@ -302,7 +302,14 @@ raise else: # Bytecode seems fine, so try to use it. - return marshal.loads(bytecode) + try: + return marshal.loads(bytecode) + except ValueError as e: + bytecode = data[12:] # Python 3.3 added file size field to header + try: + return marshal.loads(bytecode) + except EOFError: # If we get EOF, raise original ValueError exception + raise e elif source_timestamp is None: raise ImportError("no source or bytecode available to create code " "object for {0!r}".format(fullname),