[pypy-commit] pypy py3k: Fix pickle of builtin types.
amauryfa
noreply at buildbot.pypy.org
Sun Nov 6 20:59:16 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r48840:0face036f35c
Date: 2011-10-26 12:31 +0200
http://bitbucket.org/pypy/pypy/changeset/0face036f35c/
Log: Fix pickle of builtin types.
diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -517,16 +517,16 @@
space.isinstance_w(w_self.getdictvalue(space, '__module__'),
space.w_unicode)):
return w_self.getdictvalue(space, '__module__')
- return space.wrap('__builtin__')
+ return space.wrap('builtins')
def get_module_type_name(w_self):
space = w_self.space
w_mod = w_self.get_module()
if not space.isinstance_w(w_mod, space.w_str):
- mod = '__builtin__'
+ mod = 'builtins'
else:
mod = space.str_w(w_mod)
- if mod !='__builtin__':
+ if mod != 'builtins':
return '%s.%s' % (mod, w_self.name)
else:
return w_self.name
@@ -884,7 +884,7 @@
kind = 'type'
else:
kind = 'class'
- if mod is not None and mod !='__builtin__':
+ if mod is not None and mod !='builtins':
return space.wrap("<%s '%s.%s'>" % (kind, mod, w_obj.name))
else:
return space.wrap("<%s '%s'>" % (kind, w_obj.name))
More information about the pypy-commit
mailing list