Author cyhawk
Recipients alexandre.vassalotti, bkline, cyhawk, jcea, schmir
Date 2008-04-27.07:53:00
SpamBayes Score 0.163764
Marked as misclassified No
Message-id <>
The documentation[1] says:

  Trying to pickle a highly recursive data structure may exceed the
  maximum recursion depth, a RuntimeError will be raised in this
  case. You can carefully raise this limit with sys.setrecursionlimit().

The lightweight pickle module handles this problem correctly (in that it
raises a RuntimeError), but cPickle sometimes raises KeyError instead,
or just silently terminates the interpreter (=crashes). (I have not been
able to pinpoint what it depends on. In the attached example I get
silent termination, but if instead of lists I use sets to describe the
connections, I get the RuntimeError.)

This was mentioned in issue 2480, but that has now been changed to a
feature request to eliminate recursion altogether. That may have a lower
priority, but this crash can be hard to diagnose in a complex
application, and I am not sure if sys.setrecursionlimit() affects
cPickle behavior (I guess not).

Date User Action Args
2008-04-27 07:53:10cyhawksetspambayes_score: 0.163764 -> 0.163764
recipients: + cyhawk, jcea, bkline, alexandre.vassalotti, schmir
2008-04-27 07:53:09cyhawksetspambayes_score: 0.163764 -> 0.163764
messageid: <>
2008-04-27 07:53:07cyhawklinkissue2702 messages
2008-04-27 07:53:06cyhawkcreate