[issue9825] OrderedDict ref cycles cause memory leak

2010-09-10 Thread jason kirtland
jason kirtland added the comment: I find the behavior surprising compared to dict and other containers, where this is not an issue and weakrefs are not required in user code. I would not be surprised, however, to have to wait for a gc.collect() to clean up my cycles like I do for regular

[issue9826] OrderedDict ref cycles break repr()

2010-09-10 Thread jason kirtland
New submission from jason kirtland : repr of circular graphs of collections.OrderedDicts fails with 'RuntimeError: maximum recursion depth exceeded while calling a Python object'. >>> from collections import OrderedDict >>> left, right = OrderedDict(), OrderedDict

[issue9825] OrderedDict ref cycles cause memory leak

2010-09-10 Thread jason kirtland
New submission from jason kirtland : Circular graphs of collections.OrderedDict are uncollectable due to the presence of OrderedDict.__del__. >>> from collections import OrderedDict >>> import gc >>> left, right = OrderedDict(), OrderedDict() >>> left['

[issue3935] bisect insort C implementation ignores methods on list subclasses

2008-09-22 Thread jason kirtland
New submission from jason kirtland <[EMAIL PROTECTED]>: The C implementation (only) of bisect does not invoke list subclass methods when insorting. Code like this will not trigger the assert: class Boom(list): def insert(self, index, item): assert False bisect.insor

[issue2235] __eq__ / __hash__ check doesn't take inheritance into account

2008-03-04 Thread jason kirtland
New submission from jason kirtland: In 2.6a, seems like the __hash__ implementation and __eq__ must be defined together, in the same class. See also #1549. Ensuring that a __hash__ implementation isn't being pulled from a builtin type is probably a sufficient check...? >>> cla

[issue2045] defaultdict subclasses segfault with a bound method set as a default_factory

2008-02-07 Thread jason kirtland
New submission from jason kirtland: Python 2.5.1 (r251:54863, May 23 2007, 16:25:53) [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from collections import defaultdict