[issue9734] ABC issubclass/isinstance leaks in Python 2

Jim Fulton report at bugs.python.org
Wed Sep 1 20:46:13 CEST 2010


New submission from Jim Fulton <jim at zope.com>:

I assume ABCs use some sort of cache for issubclass checks.

I also assume the cache doesn't use weakrefs, leading to leaks in classes created on the fly (as is common in tests).

The attached script demonstrates the leak.

The leak doesn't seem to occur in Python 3.1.2.

----------
files: abc_issubclass_leak.py
messages: 115323
nosy: j1m
priority: normal
severity: normal
status: open
title: ABC issubclass/isinstance leaks in Python 2
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file18703/abc_issubclass_leak.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9734>
_______________________________________


More information about the Python-bugs-list mailing list