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.

classification
Title: ABC issubclass/isinstance leaks in Python 2
Type: Stage:
Components: Versions: Python 2.7, Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, j1m
Priority: normal Keywords:

Created on 2010-09-01 18:46 by j1m, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
abc_issubclass_leak.py j1m, 2010-09-01 18:46
Messages (2)
msg115323 - (view) Author: Jim Fulton (j1m) * (Python committer) Date: 2010-09-01 18:46
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.
msg115351 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2010-09-02 01:28
Will be fixed in 2.7.1.
History
Date User Action Args
2022-04-11 14:57:06adminsetgithub: 53943
2010-09-02 01:28:36benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg115351

resolution: out of date
2010-09-01 18:46:12j1mcreate