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 embe-navalgo
Recipients embe-navalgo
Date 2021-11-02.08:21:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635841316.88.0.961902802593.issue45687@roundup.psfhosted.org>
In-reply-to
Content
The following code, which seems reasonable:
import io
import pickle

class Pickler(pickle.Pickler):
  def persistent_id(self, obj):
    return super().persistent_id(obj)

Pickler(io.BytesIO()).dump(42)

crashes with:
RecursionError: maximum recursion depth exceeded while calling a Python object

It works perfectly when inheriting from pickle._Pickler (the Python implementation).
History
Date User Action Args
2021-11-02 08:21:56embe-navalgosetrecipients: + embe-navalgo
2021-11-02 08:21:56embe-navalgosetmessageid: <1635841316.88.0.961902802593.issue45687@roundup.psfhosted.org>
2021-11-02 08:21:56embe-navalgolinkissue45687 messages
2021-11-02 08:21:56embe-navalgocreate