Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Refactor the copy dispatcher code in copy.py. Simplifies and shortens | Raymond Hettinger | 2004-03-08 | 1 | -35/+17 |
| | | | | the code by grouping common cases together. | ||||
* | Copy builtin functions as atomic. Fixes #746304. Will backport to 2.2. | Martin v. Löwis | 2003-06-14 | 1 | -0/+2 |
| | |||||
* | SF patch 707900, fixing bug 702858, by Steven Taschuk. | Guido van Rossum | 2003-06-13 | 1 | -0/+1 |
| | | | | | Copying a new-style class that had a reference to itself didn't work. (The same thing worked fine for old-style classes.) | ||||
* | Get rid of many apply() calls. | Guido van Rossum | 2003-02-27 | 1 | -2/+2 |
| | |||||
* | Whitespace normalization. | Tim Peters | 2003-02-19 | 1 | -1/+1 |
| | |||||
* | Remove now unused _better_reduce. | Guido van Rossum | 2003-02-19 | 1 | -1/+1 |
| | |||||
* | Use __reduce_ex__ in copy.py. The test_*copy_cant() tests are simpler again. | Guido van Rossum | 2003-02-19 | 1 | -22/+34 |
| | |||||
* | Somehow, copy() of a classic class object was handled | Guido van Rossum | 2003-02-07 | 1 | -0/+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 Rossum | 2003-02-07 | 1 | -48/+50 |
| | | | | | Rewrote copy() and deepcopy() without avoidable try/except statements; getattr(x, name, None) or dict.get() are much faster than try/except. | ||||
* | Move _better_reduce from copy.py to copy_reg.py, and also use it in | Guido van Rossum | 2003-02-06 | 1 | -41/+1 |
| | | | | pickle.py, where it makes save_newobj() unnecessary. Tests pass. | ||||
* | Fix a bug in the way __getnewargs__ was handled. | Guido van Rossum | 2003-02-06 | 1 | -1/+1 |
| | |||||
* | Support all the new stuff supported by the new pickle code: | Guido van Rossum | 2003-02-06 | 1 | -11/+64 |
| | | | | | | - 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 Rossum | 2003-02-06 | 1 | -1/+20 |
| | |||||
* | Support copying booleans. Fixes #668925. | Martin v. Löwis | 2003-01-16 | 1 | -0/+2 |
| | |||||
* | Make sure that *any* object whose id() is used as a memo key is kept | Guido van Rossum | 2002-08-12 | 1 | -2/+1 |
| | | | | alive in the memo. This fixes SF bug 592567. | ||||
* | SF patch 560794 (Greg Chapman): deepcopy can't handle custom | Guido van Rossum | 2002-06-10 | 1 | -8/+15 |
| | | | | | | | | | | metaclasses. This is essentially the same problem as that reported in bug 494904 for pickle: deepcopy should treat instances of custom metaclasses the same way it treats instances of type 'type'. Bugfix candidate. | ||||
* | Fix from SF patch 565085: copy._reduction doesn't __setstate__. | Guido van Rossum | 2002-06-06 | 1 | -1/+4 |
| | | | | | | Straightforward fix. Will backport to 2.2. If there's ever a new 2.1 release, this could be backported there too (since it's an issue with anything that's got both a __reduce__ and a __setstate__). | ||||
* | Replaced .keys() with dictionary iterators | Raymond Hettinger | 2002-06-02 | 1 | -4/+4 |
| | |||||
* | SF 563203. Replaced 'has_key()' with 'in'. | Raymond Hettinger | 2002-06-01 | 1 | -1/+1 |
| | |||||
* | SF patch 518765 (Derek Harland): Bug in copy.py when used through | Guido van Rossum | 2002-02-28 | 1 | -1/+4 |
| | | | | | | | | | | rexec. When using a restricted environment, imports of copy will fail with an AttributeError when trying to access types.CodeType. Bugfix candidate (all the way back to 1.5.3, but at least 2.1.3 and 2.2.1). | ||||
* | Fix for SF bug ##497426: can't deepcopy recursive new objects | Guido van Rossum | 2001-12-28 | 1 | -4/+6 |
| | | | | | | | | deepcopy(), _reconstruct(): pass the memo to the other function, so that recursive data structures built out of new-style objects may be deeply copied correctly. 2.2.1 bugfix! | ||||
* | Add complex to the dispatch tables, to avoid going through the whole | Guido van Rossum | 2001-09-28 | 1 | -0/+8 |
| | | | | rigmarole of __reduce__. | ||||
* | Changes to copy() and deepcopy() in copy.py to support __reduce__ as a | Guido van Rossum | 2001-09-28 | 1 | -7/+39 |
| | | | | | | | | | | fallback for objects that are neither supported by our dispatch table nor have a __copy__ or __deepcopy__ method. Changes to _reduce() in copy_reg.py to support reducing objects that don't have a __dict__ -- copy.copy(complex()) now invokes _reduce(). Add tests for copy.copy() and copy.deepcopy() to test_regrtest.py. | ||||
* | Patch #445762: Support --disable-unicode | Martin v. Löwis | 2001-08-17 | 1 | -2/+8 |
| | | | | | | | | - Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled - check for Py_USING_UNICODE in all places that use Unicode functions - disables unicode literals, and the builtin functions - add the types.StringTypes list - remove Unicode literals from most tests. | ||||
* | added __all__ lists to a number of Python modules | Skip Montanaro | 2001-01-20 | 1 | -0/+2 |
| | | | | | | | | added test script and expected output file as well this closes patch 103297. __all__ attributes will be added to other modules without first submitting a patch, just adding the necessary line to the test script to verify more-or-less correct implementation. | ||||
* | Whitespace normalization. | Tim Peters | 2001-01-14 | 1 | -183/+183 |
| | |||||
* | Patch by Finn Bock to support PyStringMap in Jython. | Guido van Rossum | 2000-11-27 | 1 | -0/+9 |
| | |||||
* | Added Unicode objects to the copy mechanism. Since these are immutable, | Marc-André Lemburg | 2000-09-07 | 1 | -0/+2 |
| | | | | they are copied as atomic types. | ||||
* | Convert some old-style string exceptions to class exceptions. | Fred Drake | 2000-08-17 | 1 | -2/+3 |
| | |||||
* | Actually, the previous batch's comment should have been different; | Guido van Rossum | 2000-02-04 | 1 | -3/+1 |
| | | | | | | | | | | *this* set of patches is Ka-Ping's final sweep: The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac. | ||||
* | Don't die if CodeType doesn't exist -- ignore the error. This could | Guido van Rossum | 1999-01-25 | 1 | -1/+4 |
| | | | | happen in restricted mode. | ||||
* | A few lines were indented using spaces instead of tabs -- fix them. | Guido van Rossum | 1998-03-26 | 1 | -14/+14 |
| | |||||
* | As Mike Fletcher pointed out, a __deepcopy__() method should be called | Guido van Rossum | 1998-03-13 | 1 | -1/+1 |
| | | | | with the memo as an argument. | ||||
* | Apply the same change to classes without an __getinitargs__() method | Guido van Rossum | 1997-12-07 | 1 | -5/+11 |
| | | | | as in pickle: the new instance is created without calling __init__(). | ||||
* | Use __dict__.update(state) instead of for loop over state.items() and | Guido van Rossum | 1997-10-26 | 1 | -11/+9 |
| | | | | | | | call to setattr(). This changes semantics, following the change already implemented in pickle. Also reindented a few lines properly. | ||||
* | Add XXX note about wanting support for copy_reg.py... | Guido van Rossum | 1997-10-07 | 1 | -0/+2 |
| | |||||
* | Make sure the objects returned by __getinitargs__() are kept alive (in | Guido van Rossum | 1997-08-20 | 1 | -0/+18 |
| | | | | | | the memo) to avoid a certain kind of nasty crash. (Not easily reproducable because it requires a later call to __getinitargs__() to return a tuple that happens to be allocated at the same address.) | ||||
* | Remove '(' in column 0 of doc strings. | Guido van Rossum | 1997-05-28 | 1 | -10/+12 |
| | | | | Add dependency on dict.copy(). | ||||
* | Memoize _deepcopy_tuple() -- maybe this helps Tommy's problem. | Guido van Rossum | 1996-06-17 | 1 | -2/+6 |
| | |||||
* | fix bogus hasttr usage | Guido van Rossum | 1995-03-22 | 1 | -2/+2 |
| | |||||
* | rename copy.Error to copy.error | Guido van Rossum | 1995-03-14 | 1 | -5/+8 |
| | |||||
* | added __doc__ strings etc. | Guido van Rossum | 1995-02-09 | 1 | -34/+64 |
| | |||||
* | shallow and deep copy operations | Guido van Rossum | 1995-01-10 | 1 | -0/+240 |