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 gvanrossum
Recipients
Date 2002-12-26.15:23:39
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
save_global() in cPickle calls PyImport_ImportModule()
to import the module of a global that's about to be
pickled, in order to check whether the given name in
fact refers to the given object.

But when it is invoked from code living inside a
package, PyImport_ImportModule() first tries a relative
import, and if by sheer accident that relative import
succeeds, it performs the wrong test.

Example: in a package that has a submodule
"exceptions", pickling instances of built-in exceptions
will attempt to look up the exception class name in the
exceptions submodule rather than in the built-in
toplevel module by that name.
History
Date User Action Args
2008-01-20 09:55:53adminlinkissue658693 messages
2008-01-20 09:55:53admincreate