[New-bugs-announce] [issue11640] Shelve references globals in its __del__ method

Peter Davies report at bugs.python.org
Tue Mar 22 23:15:44 CET 2011

New submission from Peter Davies <ultratwo at gmail.com>:

Shelf.__setitem__ (which is called from __del__ when writeback is enabled) references globals. This was causing exceptions on interpreter  shutdown (due to another exception) for me.

I have attached a patch which stores the relevant globals in the Shelf object.

components: Library (Lib)
files: shelve_del_fix.diff
keywords: patch
messages: 131793
nosy: Peter.Davies
priority: normal
severity: normal
status: open
title: Shelve references globals in its __del__ method
type: behavior
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file21345/shelve_del_fix.diff

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list