[pypy-commit] pypy py3k: copy_reg is now named copyreg
amauryfa
noreply at buildbot.pypy.org
Sun Dec 18 19:34:23 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r50666:0ef2cb5eb4a6
Date: 2011-12-18 17:01 +0100
http://bitbucket.org/pypy/pypy/changeset/0ef2cb5eb4a6/
Log: copy_reg is now named copyreg
diff --git a/pypy/objspace/std/dicttype.py b/pypy/objspace/std/dicttype.py
--- a/pypy/objspace/std/dicttype.py
+++ b/pypy/objspace/std/dicttype.py
@@ -137,7 +137,7 @@
This is of course not the standard way.
XXX to do: remove this __reduce__ method and do
- a registration with copy_reg, instead.
+ a registration with copyreg, instead.
"""
w_mod = space.getbuiltinmodule('_pickle_support')
mod = space.interp_w(MixedModule, w_mod)
diff --git a/pypy/objspace/std/itertype.py b/pypy/objspace/std/itertype.py
--- a/pypy/objspace/std/itertype.py
+++ b/pypy/objspace/std/itertype.py
@@ -7,7 +7,7 @@
def descr_seqiter__reduce__(w_self, space):
"""
XXX to do: remove this __reduce__ method and do
- a registration with copy_reg, instead.
+ a registration with copyreg, instead.
"""
# cpython does not support pickling iterators but stackless python do
@@ -28,7 +28,7 @@
def descr_reverseseqiter__reduce__(w_self, space):
"""
XXX to do: remove this __reduce__ method and do
- a registration with copy_reg, instead.
+ a registration with copyreg, instead.
"""
from pypy.objspace.std.iterobject import W_ReverseSeqIterObject
assert isinstance(w_self, W_ReverseSeqIterObject)
diff --git a/pypy/objspace/std/objecttype.py b/pypy/objspace/std/objecttype.py
--- a/pypy/objspace/std/objecttype.py
+++ b/pypy/objspace/std/objecttype.py
@@ -136,8 +136,8 @@
app = gateway.applevel(r'''
def reduce_1(obj, proto):
- import copy_reg
- return copy_reg._reduce_ex(obj, proto)
+ import copyreg
+ return copyreg._reduce_ex(obj, proto)
def reduce_2(obj):
cls = obj.__class__
@@ -180,8 +180,8 @@
else:
dictitems = None
- import copy_reg
- newobj = copy_reg.__newobj__
+ import copyreg
+ newobj = copyreg.__newobj__
args2 = (cls,) + args
return newobj, args2, state, listitems, dictitems
@@ -195,10 +195,10 @@
except KeyError:
pass
- import copy_reg
- slotnames = copy_reg._slotnames(cls)
+ import copyreg
+ slotnames = copyreg._slotnames(cls)
if not isinstance(slotnames, list) and slotnames is not None:
- raise TypeError("copy_reg._slotnames didn't return a list or None")
+ raise TypeError("copyreg._slotnames didn't return a list or None")
return slotnames
''', filename=__file__)
diff --git a/pypy/translator/test/test_geninterp.py b/pypy/translator/test/test_geninterp.py
--- a/pypy/translator/test/test_geninterp.py
+++ b/pypy/translator/test/test_geninterp.py
@@ -37,8 +37,8 @@
snippet_ad = """if 1:
def import_func():
- import copy_reg
- return copy_reg._reconstructor.func_code.co_name
+ import copyreg
+ return copyreg._reconstructor.func_code.co_name
def import_sys_func():
import sys
More information about the pypy-commit
mailing list