This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author petr.viktorin
Recipients petr.viktorin
Date 2021-09-07.13:57:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631023038.1.0.991246928913.issue45127@roundup.psfhosted.org>
In-reply-to
Content
The `replace` method of `code` allows setting e.g.
* co_filename to a subclass of str
* co_consts to an arbitrary tuple
and possibly more weird cases.

This makes code objects unmarshallable.

One way to create such a code object is to call `compileall.compile_file` with a str subclass as path. See the attached reproducers.

This hit pip, see: https://github.com/pypa/pip/pull/10358#issuecomment-914320728
History
Date User Action Args
2021-09-07 13:57:18petr.viktorinsetrecipients: + petr.viktorin
2021-09-07 13:57:18petr.viktorinsetmessageid: <1631023038.1.0.991246928913.issue45127@roundup.psfhosted.org>
2021-09-07 13:57:18petr.viktorinlinkissue45127 messages
2021-09-07 13:57:18petr.viktorincreate