no pickling code objects?

Steve Holden sholden at holdenweb.com
Thu May 9 17:10:36 EDT 2002


"Gonçalo Rodrigues" <op73418 at mail.telepac.pt> wrote ...
> Hi,
>
> On the docs on the pickle module it says that code objects can not be
> pickled, this in turn implies some limitations on the pickleability
> (man, I like this word!) of some objects. The docs mention security
> reasons for this choice. But somehow this doesn't feel right. Shouldn't
> the secuity concerns be left to the programmers? After all Python
> already has exec*. Is there something I am missing?
>
> I am asking this mainly from curiosity, I am in no need of such a
> feature. And then again, If I had the time and the knowedge + skill to
> come up with a patch...
>

One issue which nobody yet seems to have addressed is that code objects
change from version to version. So even if you could work out where the
dependency chain ended, the data (pickled code) would be useless in the next
major version.

regards
 Steve
--
-----------------------------------------------------------------------
Steve Holden                                 http://www.holdenweb.com/
Python Web Programming                http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------








More information about the Python-list mailing list