New submission from Bohuslav "Slavek" Kabrda: ModuleFinder.load_module currently only skips 8 bytes before trying to marshal.load the rest of the file, but it should skip 12 since 3.3 (magic, date, file size). I'm attaching a patch with test case.
BTW this was very painful to find out, since I couldn't find any reference to written pyc files - am I searching wrong or is this really not documented anywhere? (Note, that this was originally reported at https://bugzilla.redhat.com/show_bug.cgi?id=1060338). ---------- components: Library (Lib) files: fix-bytes-skipped-in-load_module.patch keywords: patch messages: 212244 nosy: bkabrda priority: normal severity: normal status: open title: ModuleFinder.load_module skips incorrect number of bytes in pyc files versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file34226/fix-bytes-skipped-in-load_module.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20778> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com