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 Wed Jun 27 07:14:28 2012 -0700 @@ -302,7 +302,16 @@ raise else: # Bytecode seems fine, so try to use it. - return marshal.loads(bytecode) + try: + return marshal.loads(bytecode) + except ValueError as e: + # Python 3.3 added a file size field, so we might need to + # ignore 4 bytes for that. + bytecode = bytecode[4:] + 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),