[Python-checkins] r51566 - in python/branches/release24-maint: Lib/test/test_array.py Misc/ACKS Modules/arraymodule.c
thomas.wouters
python-checkins at python.org
Thu Aug 24 20:55:01 CEST 2006
Author: thomas.wouters
Date: Thu Aug 24 20:55:01 2006
New Revision: 51566
Modified:
python/branches/release24-maint/Lib/test/test_array.py
python/branches/release24-maint/Misc/ACKS
python/branches/release24-maint/Modules/arraymodule.c
Log:
Backport trunk's revision 51565:
Fix SF bug #1545837: array.array borks on deepcopy.
array.__deepcopy__() needs to take an argument, even if it doesn't actually
use it. Will backport to 2.5 and 2.4 (if applicable.)
Modified: python/branches/release24-maint/Lib/test/test_array.py
==============================================================================
--- python/branches/release24-maint/Lib/test/test_array.py (original)
+++ python/branches/release24-maint/Lib/test/test_array.py Thu Aug 24 20:55:01 2006
@@ -81,6 +81,13 @@
self.assertNotEqual(id(a), id(b))
self.assertEqual(a, b)
+ def test_deepcopy(self):
+ import copy
+ a = array.array(self.typecode, self.example)
+ b = copy.deepcopy(a)
+ self.assertNotEqual(id(a), id(b))
+ self.assertEqual(a, b)
+
def test_insert(self):
a = array.array(self.typecode, self.example)
a.insert(0, self.example[0])
Modified: python/branches/release24-maint/Misc/ACKS
==============================================================================
--- python/branches/release24-maint/Misc/ACKS (original)
+++ python/branches/release24-maint/Misc/ACKS Thu Aug 24 20:55:01 2006
@@ -227,6 +227,7 @@
Michael Guravage
Lars Gustäbel
Barry Haddow
+Václav Haisman
Paul ten Hagen
Rasmus Hahn
Peter Haight
Modified: python/branches/release24-maint/Modules/arraymodule.c
==============================================================================
--- python/branches/release24-maint/Modules/arraymodule.c (original)
+++ python/branches/release24-maint/Modules/arraymodule.c Thu Aug 24 20:55:01 2006
@@ -1468,7 +1468,7 @@
copy_doc},
{"count", (PyCFunction)array_count, METH_O,
count_doc},
- {"__deepcopy__",(PyCFunction)array_copy, METH_NOARGS,
+ {"__deepcopy__",(PyCFunction)array_copy, METH_O,
copy_doc},
{"extend", (PyCFunction)array_extend, METH_O,
extend_doc},
More information about the Python-checkins
mailing list