[Zope3-checkins] CVS: ZODB4/src/zodb/code - module.py:1.15
Jeremy Hylton
jeremy@zope.com
Thu, 26 Jun 2003 19:18:21 -0400
Update of /cvs-repository/ZODB4/src/zodb/code
In directory cvs.zope.org:/tmp/cvs-serv4266
Modified Files:
module.py
Log Message:
Make modules picklable.
=== ZODB4/src/zodb/code/module.py 1.14 => 1.15 ===
--- ZODB4/src/zodb/code/module.py:1.14 Thu Jun 26 15:11:08 2003
+++ ZODB4/src/zodb/code/module.py Thu Jun 26 19:17:50 2003
@@ -32,7 +32,7 @@
import copy_reg
def _pickle_module(mod):
- return mod.__name__
+ return _unpickle_module, (mod.__name__,)
def _unpickle_module(modname):
mod = __import__(modname)
@@ -42,7 +42,7 @@
mod = getattr(mod, part)
return mod
-copy_reg.pickle(type(copy_reg), _pickle_module, _unpickle_module)
+copy_reg.pickle(type(copy_reg), _pickle_module)
# XXX Is this comment still relevant?
#