summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_copy.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #26167: Minimized overhead in copy.copy() and copy.deepcopy().Serhiy Storchaka2016-03-061-6/+49
| | | | | Optimized copying and deepcopying bytearrays, NotImplemented, slices, short lists, tuples, dicts, sets.
* Issue #26202: copy.deepcopy() now correctly copies range() objects withSerhiy Storchaka2016-01-281-1/+12
| | | | non-atomic attributes.
* Issue #25718: Fixed copying object with state with boolean value is false.Serhiy Storchaka2015-11-301-0/+9
|\
| * Issue #25718: Fixed copying object with state with boolean value is false.Serhiy Storchaka2015-11-301-0/+9
| |
* | Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.Yury Selivanov2015-07-031-3/+3
| |
* | Issue #21741: Update 147 test modules to use test discovery.Zachary Ware2015-04-131-5/+1
| | | | | | | | | | | | | | I have compared output between pre- and post-patch runs of these tests to make sure there's nothing missing and nothing broken, on both Windows and Linux. The only differences I found were actually tests that were previously *not* run.
* | Issue #20289: The copy module now uses pickle protocol 4 (PEP 3154) andSerhiy Storchaka2015-03-241-0/+70
|/ | | | | supports copying of instances of classes whose __new__ method takes keyword-only arguments.
* Issue #20791: copy.copy() now doesn't make a copy when the input is a bytes ↵Antoine Pitrou2014-02-271-0/+1
| | | | object. Initial patch by Peter Otten.
* Issue #11480: Fixed copy.copy to work with classes with custom metaclasses.Alexandre Vassalotti2013-12-011-1/+4
| | | | Patch by Daniel Urban.
* #11572: improvements to copy module tests along with removal of old test suiteSandro Tosi2011-08-051-73/+95
|
* don't memoize objects that are their own copies (closes #12422)Benjamin Peterson2011-06-271-2/+17
| | | | Patch mostly by Alex Gaynor.
* Issue #1100562: Fix deep-copying of objects derived from the list and dict ↵Antoine Pitrou2010-09-041-0/+20
| | | | | | types. Patch by Michele Orrù and Björn Lindqvist.
* use assert[Not]In where appropriateEzio Melotti2010-01-231-1/+1
|
* Merged revisions 76571 via svnmerge fromAntoine Pitrou2009-11-281-0/+11
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76571 | antoine.pitrou | 2009-11-28 16:55:58 +0100 (sam., 28 nov. 2009) | 3 lines Issue #1515: Enable use of deepcopy() with instance methods. Patch by Robert Collins. ........
* convert old fail* assertions to assert*Benjamin Peterson2009-06-301-62/+62
|
* Merged revisions 72669 via svnmerge fromAntoine Pitrou2009-05-151-0/+88
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72669 | antoine.pitrou | 2009-05-15 18:54:52 +0200 (ven., 15 mai 2009) | 3 lines Issue #2116: Weak references and weak dictionaries now support copy()ing and deepcopy()ing. ........
* Issue #1717: Remove cmp. Stage 1: remove all uses of cmp and __cmp__ fromMark Dickinson2009-01-271-4/+13
| | | | the standard library and tests.
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-4/+4
|
* Rename copy_reg module to copyreg.Alexandre Vassalotti2008-05-111-3/+3
| | | | | | | | | | | | | | | Updated documentation. Merged revisions 63042 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r63042 | alexandre.vassalotti | 2008-05-11 04:25:28 -0400 (Sun, 11 May 2008) | 5 lines Added module stub for copy_reg renaming in 3.0. Renamed copy_reg to copyreg in the standard library, to avoid spurious warnings and ease later merging to py3k branch. Public documentation remains intact. ........
* Merged revisions 60990-61002 via svnmerge fromChristian Heimes2008-02-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r60990 | eric.smith | 2008-02-23 17:05:26 +0100 (Sat, 23 Feb 2008) | 1 line Removed duplicate Py_CHARMASK define. It's already defined in Python.h. ........ r60991 | andrew.kuchling | 2008-02-23 17:23:05 +0100 (Sat, 23 Feb 2008) | 4 lines #1330538: Improve comparison of xmlrpclib.DateTime and datetime instances. Remove automatic handling of datetime.date and datetime.time. This breaks backward compatibility, but python-dev discussion was strongly against this automatic conversion; see the bug for a link. ........ r60994 | andrew.kuchling | 2008-02-23 17:39:43 +0100 (Sat, 23 Feb 2008) | 1 line #835521: Add index entries for various pickle-protocol methods and attributes ........ r60995 | andrew.kuchling | 2008-02-23 18:10:46 +0100 (Sat, 23 Feb 2008) | 2 lines #1433694: minidom's .normalize() failed to set .nextSibling for last element. Fix by Malte Helmert ........ r61000 | christian.heimes | 2008-02-23 18:40:11 +0100 (Sat, 23 Feb 2008) | 1 line Patch #2167 from calvin: Remove unused imports ........ r61001 | christian.heimes | 2008-02-23 18:42:31 +0100 (Sat, 23 Feb 2008) | 1 line Patch #1957: syslogmodule: Release GIL when calling syslog(3) ........ r61002 | christian.heimes | 2008-02-23 18:52:07 +0100 (Sat, 23 Feb 2008) | 2 lines Issue #2051 and patch from Alexander Belopolsky: Permission for pyc and pyo files are inherited from the py file. ........
* Raise statement normalization in Lib/test/.Collin Winter2007-08-291-5/+5
|
* Merged revisions 55007-55179 via svnmerge fromGuido van Rossum2007-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55077 | guido.van.rossum | 2007-05-02 11:54:37 -0700 (Wed, 02 May 2007) | 2 lines Use the new print syntax, at least. ........ r55142 | fred.drake | 2007-05-04 21:27:30 -0700 (Fri, 04 May 2007) | 1 line remove old cruftiness ........ r55143 | fred.drake | 2007-05-04 21:52:16 -0700 (Fri, 04 May 2007) | 1 line make this work with the new Python ........ r55162 | neal.norwitz | 2007-05-06 22:29:18 -0700 (Sun, 06 May 2007) | 1 line Get asdl code gen working with Python 2.3. Should continue to work with 3.0 ........ r55164 | neal.norwitz | 2007-05-07 00:00:38 -0700 (Mon, 07 May 2007) | 1 line Verify checkins to p3yk (sic) branch go to 3000 list. ........ r55166 | neal.norwitz | 2007-05-07 00:12:35 -0700 (Mon, 07 May 2007) | 1 line Fix this test so it runs again by importing warnings_test properly. ........ r55167 | neal.norwitz | 2007-05-07 01:03:22 -0700 (Mon, 07 May 2007) | 8 lines So long xrange. range() now supports values that are outside -sys.maxint to sys.maxint. floats raise a TypeError. This has been sitting for a long time. It probably has some problems and needs cleanup. Objects/rangeobject.c now uses 4-space indents since it is almost completely new. ........ r55171 | guido.van.rossum | 2007-05-07 10:21:26 -0700 (Mon, 07 May 2007) | 4 lines Fix two tests that were previously depending on significant spaces at the end of a line (and before that on Python 2.x print behavior that has no exact equivalent in 3.0). ........
* Rip out all the u"..." literals and calls to unicode().Guido van Rossum2007-05-021-2/+2
|
* Implement PEP 3115 -- new metaclass syntax and semantics.Guido van Rossum2007-03-181-2/+2
| | | | | | | The compiler package hasn't been updated yet; test_compiler.py fails. Otherwise all tests seem to be passing now. There are no occurrences of __metaclass__ left in the standard library. Docs have not been updated.
* Change all the function attributes from func_* -> __*__. This gets ridNeal Norwitz2007-02-251-2/+2
| | | | | of func_name, func_dict and func_doc as they already exist as __name__, __dict__ and __doc__.
* - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone;Guido van Rossum2007-02-111-1/+1
| | | | | | | | | | and .keys(), .items(), .values() return dict views. The dict views aren't fully functional yet; in particular, they can't be compared to sets yet. but they are useful as "iterator wells". There are still 27 failing unit tests; I expect that many of these have fairly trivial fixes, but there are so many, I could use help.
* Rip out 'long' and 'L'-suffixed integer literals.Guido van Rossum2007-01-151-2/+2
| | | | (Rough first cut.)
* Restructure comparison dramatically. There is no longer a defaultGuido van Rossum2006-08-241-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *ordering* between objects; there is only a default equality test (defined by an object being equal to itself only). Read the comment in object.c. The current implementation never uses a three-way comparison to compute a rich comparison, but it does use a rich comparison to compute a three-way comparison. I'm not quite done ripping out all the calls to PyObject_Compare/Cmp, or replacing tp_compare implementations with tp_richcompare implementations; but much of that has happened (to make most unit tests pass). The following tests still fail, because I need help deciding or understanding: test_codeop -- depends on comparing code objects test_datetime -- need Tim Peters' opinion test_marshal -- depends on comparing code objects test_mutants -- need help understanding it The problem with test_codeop and test_marshal is this: these tests compare two different code objects and expect them to be equal. Is that still a feature we'd like to support? I've temporarily removed the comparison and hash code from code objects, so they use the default (equality by pointer only) comparison. For the other two tests, run them to see for yourself. (There may be more failing test with "-u all".) A general problem with getting lots of these tests to pass is the reality that for object types that have a natural total ordering, implementing __cmp__ is much more convenient than implementing __eq__, __ne__, __lt__, and so on. Should we go back to allowing __cmp__ to provide a total ordering? Should we provide some other way to implement rich comparison with a single method override? Alex proposed a __key__() method; I've considered a __richcmp__() method. Or perhaps __cmp__() just shouldn't be killed off...
* - Patch 1433928:Guido van Rossum2006-02-251-0/+16
| | | | | | | | - The copy module now "copies" function objects (as atomic objects). - dict.__getitem__ now looks for a __missing__ hook before raising KeyError. - Added a new type, defaultdict, to the collections module. This uses the new __missing__ hook behavior added to dict (see above).
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-2/+2
| | | | From SF patch #852334.
* Deleting cyclic object comparison.Armin Rigo2003-10-281-6/+6
| | | | | SF patch 825639 http://mail.python.org/pipermail/python-dev/2003-October/039445.html
* Copy builtin functions as atomic. Fixes #746304. Will backport to 2.2.Martin v. Löwis2003-06-141-2/+2
|
* SF patch 707900, fixing bug 702858, by Steven Taschuk.Guido van Rossum2003-06-131-2/+49
| | | | | Copying a new-style class that had a reference to itself didn't work. (The same thing worked fine for old-style classes.)
* Fix SF #749831, copy raises SystemError when getstate raises exceptionNeal Norwitz2003-06-081-0/+6
|
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-3/+1
| | | | | | | | | | and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
* Use __reduce_ex__ in copy.py. The test_*copy_cant() tests are simpler again.Guido van Rossum2003-02-191-8/+24
|
* Somehow, copy() of a classic class object was handledGuido van Rossum2003-02-071-1/+1
| | | | | | atomically, but deepcopy() didn't support this at all. I don't see any reason for this, so I'm adding ClassType to the set of types that are deep-copied atomically.
* Add support for copy_reg.dispatch_table.Guido van Rossum2003-02-071-0/+27
| | | | | Rewrote copy() and deepcopy() without avoidable try/except statements; getattr(x, name, None) or dict.get() are much faster than try/except.
* Fix a bug in the way __getnewargs__ was handled.Guido van Rossum2003-02-061-0/+18
|
* Support all the new stuff supported by the new pickle code:Guido van Rossum2003-02-061-2/+45
| | | | | | - subclasses of list or dict - __reduce__ returning a 4-tuple or 5-tuple - slots
* Support __reduce__ returning a 4-tuple or 5-tuple.Guido van Rossum2003-02-061-0/+36
|
* A test suite for the copy module. This should provide full codeGuido van Rossum2003-02-061-0/+384
coverage.