Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3.3
Changeset: r73047:02521bd8cd1c
Date: 2014-08-18 00:01 +0200
http://bitbucket.org/pypy/pypy/changeset/02521bd8cd1c/
Log: Rename the function, to avoid the (unlikely) case where the host
CPython tries to pickle this interp-level class.
diff --git a/pypy/module/bz2/interp_bz2.py b/pypy/module/bz2/interp_bz2.py
--- a/pypy/module/bz2/interp_bz2.py
+++ b/pypy/module/bz2/interp_bz2.py
@@ -268,7 +268,7 @@
BZ2_bzCompressEnd(self.bzs)
lltype.free(self.bzs, flavor='raw')
- def __getstate__(self):
+ def descr_getstate(self):
raise oefmt(self.space.w_TypeError, "cannot serialize '%T' object",
self)
@unwrap_spec(data='bufferstr')
@@ -336,7 +336,7 @@
W_BZ2Compressor.typedef = TypeDef("_bz2.BZ2Compressor",
__doc__ = W_BZ2Compressor.__doc__,
__new__ = interp2app(descr_compressor__new__),
- __getstate__ = interp2app(W_BZ2Compressor.__getstate__),
+ __getstate__ = interp2app(W_BZ2Compressor.descr_getstate),
compress = interp2app(W_BZ2Compressor.compress),
flush = interp2app(W_BZ2Compressor.flush),
)
@@ -376,7 +376,7 @@
BZ2_bzDecompressEnd(self.bzs)
lltype.free(self.bzs, flavor='raw')
- def __getstate__(self):
+ def descr_getstate(self):
raise oefmt(self.space.w_TypeError, "cannot serialize '%T' object",
self)
def eof_w(self, space):
@@ -436,7 +436,7 @@
W_BZ2Decompressor.typedef = TypeDef("_bz2.BZ2Decompressor",
__doc__ = W_BZ2Decompressor.__doc__,
__new__ = interp2app(descr_decompressor__new__),
- __getstate__ = interp2app(W_BZ2Decompressor.__getstate__),
+ __getstate__ = interp2app(W_BZ2Decompressor.descr_getstate),
unused_data = interp_attrproperty_bytes("unused_data", W_BZ2Decompressor),
eof = GetSetProperty(W_BZ2Decompressor.eof_w),
decompress = interp2app(W_BZ2Decompressor.decompress),
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit