[New-bugs-announce] [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>

More information about the New-bugs-announce mailing list