[issue19021] AttributeError in Popen.__del__

Serhiy Storchaka report at bugs.python.org
Sun Sep 15 01:46:46 CEST 2013


New submission from Serhiy Storchaka:

Sometimes closing IDLE I got such exception:

Exception ignored in: <bound method Popen.__del__ of <subprocess.Popen object at 0xb5b8618c>>
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/subprocess.py", line 890, in __del__
TypeError: 'NoneType' object is not callable

It is happened because the builtins module was destroyed before running __del__ in process of garbage collecting.

Here is a patch which should fix the bug. Anothe possible solution is get rid from getattr and catch AttributeError instead.

See also issue16650.

----------
components: Library (Lib)
files: subprocess_del_getattr.patch
keywords: patch
messages: 197737
nosy: serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: AttributeError in Popen.__del__
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31762/subprocess_del_getattr.patch

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


More information about the Python-bugs-list mailing list