[issue22995] Restrict default pickleability

Barry A. Warsaw report at bugs.python.org
Mon Jan 11 13:36:55 EST 2016


Barry A. Warsaw added the comment:

On Jan 11, 2016, at 05:50 PM, Serhiy Storchaka wrote:

>
>Therefore my guess was true. There is a bug in Cython. It creates classes
>that can't be correctly unpickled or copied.

I don't think that's necessarily true.  Clearly the classes *can* be copied
and unpickled because they *are*, otherwise Cython builds would be failing for
a long time now, and I can find no evidence of that either in Debian/Ubuntu
packages which use Cython nor in upstream bug reports for Cython or the
affected packages.  It's just as likely that the assumptions of the
typeobject.c code are incorrect.

>The question is wherever we should replace TypeError with a warning in
>maintained releases, or remove this check at all? Here is a patch against 3.5
>that replaces TypeError with a warning.

I am final testing a patch to typeobject.c that ifdefs that test out in 2.7,
3.5 and 3.6.  I think given the observed regressions, this is the right way to
go for now.  If you can figure out more detail about what's going on and can
adjust the change to avoid the regressions, then this code can be unifdef'd
away and fixed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22995>
_______________________________________


More information about the Python-bugs-list mailing list