[issue28416] defining persistent_id in _pickle.Pickler subclass causes reference cycle

2016-10-11 Thread Carl Witty
New submission from Carl Witty: On creation, _pickle.Pickler caches any .persistent_id() method defined by a subclass (in the pers_func field of PicklerObject). This causes a reference cycle (pickler -> bound method of pickler -> pickler), so the pickler is held in memory until th

[issue9869] long_subtype_new segfault in pure-Python code

2010-09-16 Thread Carl Witty
New submission from Carl Witty carl.wi...@gmail.com: PyNumber_Long() (and hence long_new()) are willing to return ints, rather than longs. However, when long_subtype_new() calls long_new(), it casts the result to PyLongObject* without a check. (Well, there is an assertion, so if assertions

[issue5794] pickle/cPickle of recursive tuples create pickles that cPickle can't load

2009-04-19 Thread Carl Witty
New submission from Carl Witty carl.wi...@gmail.com: When I try to pickle a recursive tuple (that recurses through a list), pickle can load the result but cPickle fails with unpickling stack overflow. (I just downloaded and built Python 2.6.2 on 64-bit x86 Debian testing to verify this bug