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 loewis
Recipients brett.cannon, loewis, pitrou
Date 2012-10-12.19:19:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350069547.21.0.650704247739.issue16213@psf.upfronthosting.co.za>
In-reply-to
Content
I don't understand this issue at all:

a) _bootstrap does not currently use any private API of marshal. Instead, it has functions _w_long and _r_long implemented in pure Python. So where is the special functionality that only importlib has? Anybody could easily replicate these functions.

b) Isn't it easy to implement it as such:

def _w_long(x):
  return x.to_bytes(4, 'little')

As for fix_co_filename, I think it would indeed be useful if marshal.load(s) supported an optional filename= parameter, which then fills rf.current_filename. It's better to load it into the correct form in the first place instead of fixing it after loading completed - in particular since marshal already has a mechanism to update all filenames.
History
Date User Action Args
2012-10-12 19:19:07loewissetrecipients: + loewis, brett.cannon, pitrou
2012-10-12 19:19:07loewissetmessageid: <1350069547.21.0.650704247739.issue16213@psf.upfronthosting.co.za>
2012-10-12 19:19:07loewislinkissue16213 messages
2012-10-12 19:19:07loewiscreate