Pedantic pickling error after reload?
Robert
no-spam at non-existing.invalid
Thu Feb 25 12:08:28 EST 2010
After (intended/controlled) reload or similar action on a
module/class the pickle/cPickle.dump raises errors like
pickle.PicklingError: Can't pickle <class 'somemodule.SomeClass'>:
it's not the same object as somemodule.SomeClass
Cause in pickle.py (and cPickle) is a line
"if klass is not obj:"
Shouldn't it be enough to have "if klass.__name__ !=
obj.__name__:" there?
=> a bug report/feature request?
Classes can change face anyway during pickled state, why should a
over-pedantic reaction break things here during runtime?
(So far I'd need to walk the object tree in all facets and save
against inf loops like pickle himself and re-class things .. )
More information about the Python-list
mailing list