[New-bugs-announce] [issue2116] weakref copy module interaction

Rick Harris report at bugs.python.org
Thu Feb 14 22:22:35 CET 2008


New submission from Rick Harris:

The copy module will not properly copy/deepcopy weakrefs, it will bomb
out with __new__ not having enough args. This is a problem b/c it makes
deepcopying of objects that make use of Weak(Key|Value)Dictionaries
difficult.

To replicate:

import copy, weakref
class Test(object): pass
t = Test()
wr = weakref.ref(t)
wr_new = copy.copy(wr)

----------
components: Library (Lib)
files: copy.patch
messages: 62413
nosy: rharris
severity: normal
status: open
title: weakref copy module interaction
type: crash
versions: Python 2.5
Added file: http://bugs.python.org/file9433/copy.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2116>
__________________________________


More information about the New-bugs-announce mailing list