Message92113
For compatibility w/ import, importlib needs the ability to set
code.co_filename to the actual location of the bytecode used to create a
module and not the path embedded in the marshal data. But since
co_filename is read-only it can't be done at the moment.
The idea is to add an optional argument to marshal.load* that takes a
string representing the file path that co_filename should be set to,
overriding what is in the marshal data.
A long-term perk of this is that eventually this argument can become
required for marshal.loads() and the file path embedded in the marshal
data can be removed entirely. marshal.load() would infer its path from
file.name.
This was all discussed on python-dev;
http://mail.python.org/pipermail/python-dev/2009-August/091460.html |
|
Date |
User |
Action |
Args |
2009-08-31 18:58:53 | brett.cannon | set | recipients:
+ brett.cannon |
2009-08-31 18:58:53 | brett.cannon | set | messageid: <1251745133.13.0.463652094911.issue6811@psf.upfronthosting.co.za> |
2009-08-31 18:58:51 | brett.cannon | link | issue6811 messages |
2009-08-31 18:58:50 | brett.cannon | create | |
|