This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients alexandre.vassalotti, amaury.forgeotdarc, belopolsky, nyevik, pitrou
Date 2011-03-16.14:18:15
SpamBayes Score 9.988749e-10
Marked as misclassified No
Message-id <>
In-reply-to <>
On Tue, Mar 15, 2011 at 7:05 PM, Antoine Pitrou <> wrote:
> - (bugfix) raise a proper exception when an object too large for handling by pickle is given

What would be the "proper exception" here?  With _pickle acceleration
disabled, I get a struct.error:

$ cat
import sys
sys.modules['_pickle'] = None
import pickle
s = b'a' * (2**31)
d = pickle.dumps(s)

$ ./python.exe
Traceback (most recent call last):
  File "Lib/", line 496, in save_bytes
    self.write(BINBYTES + pack("<i", n) + bytes(obj))
struct.error: 'i' format requires -2147483648 <= number <= 2147483647

I would say "proper exception" would be ValueError, but that means
that we should change python implementation in an incompatible way.
Date User Action Args
2011-03-16 14:18:15belopolskysetrecipients: + belopolsky, amaury.forgeotdarc, pitrou, alexandre.vassalotti, nyevik
2011-03-16 14:18:15belopolskylinkissue11564 messages
2011-03-16 14:18:15belopolskycreate