[issue43252] deepcopy of weakref proxies

2021-04-15 Thread Konrad Schwarz
Konrad Schwarz added the comment: Well, in the example code, the memo dictionary contains the (hard) reference to newly created objects but ultimately, at the close of the deepcopy, the objects are (hard) referenced using the normal "child" attributes. I don't however know how this would wor

[issue43252] deepcopy of weakref proxies

2021-04-14 Thread Irit Katriel
Irit Katriel added the comment: If you deep-copy the referents, what would hold a reference to them? Wouldn't the new objects be immediately GCed? -- nosy: +iritkatriel ___ Python tracker __

[issue43252] deepcopy of weakref proxies

2021-02-18 Thread Konrad Schwarz
New submission from Konrad Schwarz : copy.deepcopy()-ing a tree structure that has internal parent and cross-reference links implemented as weakref.proxy() objects causes the weak reference proxies themselves to be copied (still refering to their original referents) rather than weak reference