[issue21333] Document recommended exception for objects that shouldn't be pickled

2020-07-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: 2.7 docs are no longer revised -- nosy: +terry.reedy resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker __

[issue21333] Document recommended exception for objects that shouldn't be pickled

2015-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PicklingError is raised in following cases: 1. Programmical Pickler error (Pickler.__init__() was not called by subclass' __init__()). 2. Due to protocol or implementation limitations: memoizing more than 2**32 objects, saving non-ASCII globals with protoco

[issue21333] Document recommended exception for objects that shouldn't be pickled

2015-10-28 Thread Michael Crouch
Michael Crouch added the comment: When pickling an object fails on line 70 of copy_reg.py, a "TypeError" is raised. However, according to section 11.1.3 of the Standard Library documentation, when an unpicklable object is passed to the dump() method the "PicklingError" exception will be raised

[issue21333] Document recommended exception for objects that shouldn't be pickled

2014-04-23 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +alexandre.vassalotti, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue21333] Document recommended exception for objects that shouldn't be pickled

2014-04-22 Thread Stefan Schwarzer
New submission from Stefan Schwarzer: I recently was confused whether to raise a `PicklingError` or `TypeError` in `__getstate__` if objects of my class can't and shouldn't be pickled. [1] Terry Reedy advised I should use `TypeError`. [2] I wonder if the `pickle` module documention should expl