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: deepcopying listlike and dictlike objects
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, ajaksu2, alexandre.vassalotti, ezio.melotti, maker, pitrou, rcoyner, serhiy.storchaka, sonderblade
Priority: normal Keywords: easy, patch

Created on 2005-01-12 00:49 by sonderblade, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix_1099746.patch sonderblade, 2005-01-12 00:49 patch that should fix 1099746
issue1100562.patch maker, 2010-05-13 21:21 issue1100562 patch for python2.7
issue1100562_py3k.patch maker, 2010-06-22 15:09 Patch for python3
Messages (11)
msg47512 - (view) Author: Björn Lindqvist (sonderblade) Date: 2005-01-12 00:49
This patch should fix this
https://sourceforge.net/tracker/index.php?func=detail&aid=1099746&group_id=5470&atid=105470
problem. It does it by changing the order in which
objects are deepcopied. First the attributes and then
the list/dict elements are copied.
msg86304 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-04-22 16:03
See issue 1099746 for an example that can be used as a starting point
for the unit tests.
msg105659 - (view) Author: Michele Orrù (maker) * Date: 2010-05-13 21:21
Unit tests added; tested both on python2.6 and python2.7.
msg108391 - (view) Author: Michele Orrù (maker) * Date: 2010-06-22 15:00
Ported to Py3k.
msg110430 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-16 12:25
I've made this a feature request as #1099746 title is "copy.deepcopy barfs when copying a class derived from dict".  Michelle can you confirm that you have run the unit tests and that all passed ok?
msg110447 - (view) Author: Michele Orrù (maker) * Date: 2010-07-16 14:38
Yes. Anyway, to be sure, I've just re-checked on py3.2, py3.1 and py2.7 with last svn revision. 
I'm pretty sure all works well.
msg110477 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-16 19:45
Michele, thanks for your prompt response.  I should of course have said "I'm making this a behaviour type", sorry.  alexandre, could you please comment on whether the patches are acceptable or not, thanks.
msg112773 - (view) Author: Michele Orrù (maker) * Date: 2010-08-04 08:42
Ping.
msg114993 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-08-26 15:55
The patch is small and clean, can a core dev please take a look and commit if you see fit, thanks.
msg115592 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-09-04 17:53
Committed in r84495 (3.x), r84498 (3.1), r84499 (2.7). Thank you!
msg255438 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-11-26 22:08
Note that this change added discrepancy between pickle and copy modules and broke deepcopying of minidom documents (issue10131).
History
Date User Action Args
2022-04-11 14:56:09adminsetgithub: 41428
2015-11-26 22:08:28serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg255438
2010-09-04 17:53:16pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg115592

resolution: fixed
stage: patch review -> resolved
2010-08-26 15:55:00BreamoreBoysetmessages: + msg114993
2010-08-04 08:42:00makersetmessages: + msg112773
2010-07-16 19:45:26BreamoreBoysetnosy: + alexandre.vassalotti
messages: + msg110477
2010-07-16 14:38:01makersetmessages: + msg110447
2010-07-16 12:25:57BreamoreBoysetversions: + Python 3.1, Python 2.7
nosy: + BreamoreBoy

messages: + msg110430

type: enhancement -> behavior
2010-06-22 15:09:28makersetfiles: + issue1100562_py3k.patch
2010-06-22 15:08:31makersetfiles: - issue1100562_py3k.patch
2010-06-22 15:00:13makersetfiles: + issue1100562_py3k.patch

messages: + msg108391
versions: + Python 3.2, - Python 2.6, Python 2.7
2010-05-28 15:56:25rcoynersetnosy: + rcoyner
2010-05-13 23:27:01ezio.melottisetnosy: + ezio.melotti

components: + Library (Lib), - None
stage: test needed -> patch review
2010-05-13 21:21:01makersetfiles: + issue1100562.patch
versions: + Python 2.6
nosy: + maker

messages: + msg105659
2009-04-22 16:03:59ajaksu2setkeywords: + easy
nosy: + ajaksu2
messages: + msg86304

2009-02-14 19:08:33ajaksu2setstage: test needed
type: enhancement
versions: + Python 2.7, - Python 2.5
2008-01-20 19:30:38christian.heimeslinkissue1099746 superseder
2005-01-12 00:49:23sonderbladecreate