[issue15031] Split .pyc parsing from module loading

Brett Cannon report at bugs.python.org
Thu Nov 15 20:57:00 CET 2012


Brett Cannon added the comment:

Here is my current plan::

parse_bytecode_file(data, source_stats, source_path) -> code

This will take in the bytes from the bytecode file and a stats dict from SourceLoader.path_stats(). The method will parse the bytecode file, verify the magic number, timestamp, and file size. If all of that passes, then the bytecode will be compiled into a code object (with its source path fixed if necessary based on source_path) and returned. All arguments are required as you should explicitly state you want to skip sanity checks of the bytecode and that you don't want to fix the file path.

----------
stage:  -> test needed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15031>
_______________________________________


More information about the Python-bugs-list mailing list