- 16 Eyl, 2002 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 14 Agu, 2002 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 13 Agu, 2002 1 kayıt (commit)
-
-
Neal Norwitz yazdı
-
- 04 Agu, 2002 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
2.2 bugfix candidate (may cause RuntimeError for applications that currently work fine).
-
- 02 Agu, 2002 1 kayıt (commit)
-
-
Mark Hammond yazdı
for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
-
- 18 Tem, 2002 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
- 17 Tem, 2002 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
The staticforward define was needed to support certain broken C compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the static keyword when it was used with a forward declaration of a static initialized structure. Standard C allows the forward declaration with static, and we've decided to stop catering to broken C compilers. (In fact, we expect that the compilers are all fixed eight years later.) I'm leaving staticforward and statichere defined in object.h as static. This is only for backwards compatibility with C extensions that might still use it. XXX I haven't updated the documentation.
-
- 16 Tem, 2002 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
Some persistent picklers (well, probably, the *only* persistent pickler) would like to pickle some classes in a special way.
-
- 11 Tem, 2002 2 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
Jeremy Hylton yazdı
PyImport_ImportModule() is not guaranteed to return a module object. When another type of object was returned, the PyModule_GetDict() call return NULL and the subsequent GetItem() seg faulted. Bug fix candidate.
-
- 26 Haz, 2002 1 kayıt (commit)
-
-
Jack Jansen yazdı
-
- 13 Haz, 2002 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
- 01 May, 2002 1 kayıt (commit)
-
-
Fred Drake yazdı
-
- 27 Nis, 2002 1 kayıt (commit)
-
-
Tim Peters yazdı
don't understand how this function works, also beefed up the docs. The most common usage error is of this form (often spread out across gotos): if (_PyString_Resize(&s, n) < 0) { Py_DECREF(s); s = NULL; goto outtahere; } The error is that if _PyString_Resize runs out of memory, it automatically decrefs the input string object s (which also deallocates it, since its refcount must be 1 upon entry), and sets s to NULL. So if the "if" branch ever triggers, it's an error to call Py_DECREF(s): s is already NULL! A correct way to write the above is the simpler (and intended) if (_PyString_Resize(&s, n) < 0) goto outtahere; Bugfix candidate.
-
- 21 Nis, 2002 1 kayıt (commit)
-
-
Neal Norwitz yazdı
-
- 05 Nis, 2002 1 kayıt (commit)
-
-
Guido van Rossum yazdı
Change pickling format for bools to use a backwards compatible encoding. This means you can pickle True or False on Python 2.3 and Python 2.2 or before will read it back as 1 or 0. The code used for pickling bools before would create pickles that could not be read in previous Python versions.
-
- 04 Nis, 2002 1 kayıt (commit)
-
-
Guido van Rossum yazdı
permission from Paul Everitt). Also removed a few other references to Digital Creations and changed the remaining ones to Zope Corporation.
-
- 03 Nis, 2002 1 kayıt (commit)
-
-
Guido van Rossum yazdı
PEP 285. Everything described in the PEP is here, and there is even some documentation. I had to fix 12 unit tests; all but one of these were printing Boolean outcomes that changed from 0/1 to False/True. (The exception is test_unicode.py, which did a type(x) == type(y) style comparison. I could've fixed that with a single line using issubtype(x, type(y)), but instead chose to be explicit about those places where a bool is expected. Still to do: perhaps more documentation; change standard library modules to return False/True from predicates.
-
- 01 Nis, 2002 2 kayıt (commit)
-
-
Martin v. Löwis yazdı
-
Martin v. Löwis yazdı
-
- 31 Mar, 2002 1 kayıt (commit)
-
-
Neal Norwitz yazdı
-
- 22 Mar, 2002 1 kayıt (commit)
-
-
Neil Schemenauer yazdı
-
- 21 Ara, 2001 1 kayıt (commit)
-
-
Barry Warsaw yazdı
-
- 19 Ara, 2001 1 kayıt (commit)
-
-
Guido van Rossum yazdı
metaclass, reported by Dan Parisien. Objects that are instances of custom metaclasses, i.e. whose ob_type is a subclass of PyType_Type, should be pickled the same as new-style classes (objects whose ob_type is PyType_Type). This can't be done through the existing dispatch switches, and the __reduce__ trick doesn't work for these, since it finds the unbound __reduce__ for instances of the class (inherited from PyBaseObject_Type). So check explicitly using PyType_IsSubtype().
-
- 08 Ara, 2001 1 kayıt (commit)
-
-
Guido van Rossum yazdı
type.__module__ behavior. This adds the module name and a dot in front of the type name in every type object initializer, except for built-in types (and those that already had this). Note that it touches lots of Mac modules -- I have no way to test these but the changes look right. Apologies if they're not. This also touches the weakref docs, which contains a sample type object initializer. It also touches the mmap test output, because the mmap type's repr is included in that output. It touches object.h to put the correct description in a comment.
-
- 28 Kas, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
- 15 Kas, 2001 1 kayıt (commit)
-
-
Barry Warsaw yazdı
find_class(): We no longer mask all exceptions[1] by transforming them into SystemError. The latter is definitely not the right thing to do, so we let any exceptions that occur in the PyObject_GetAttr() call to simply propagate up if they occur. [1] Note that pickle only masked ImportError, KeyError, and AttributeError, but cPickle masked all exceptions.
-
- 12 Kas, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
clearly (but incorrectly) assuming it.
-
- 09 Kas, 2001 1 kayıt (commit)
-
-
Michael W. Hudson yazdı
other platforms that have funny ideas about whether addresses of functions in dlls are compile-time constants.
-
- 16 Eki, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
-
- 15 Eki, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
Raise ValueError when an object contains an arbitrarily nested reference to itself. (The previous fix just produced invalid pickles.) Solution is very much like Py_ReprEnter() and Py_ReprLeave(): fast_save_enter() and fast_save_leave() that tracks the fast_container limit and keeps a fast_memo of objects currently being pickled. The cost of the solution is moderately expensive for deeply nested structures, but it still seems to be faster than normal pickling, based on tests with deeply nested lists. Once FAST_LIMIT is exceeded, the new code is about twice as slow as fast-mode code that doesn't check for recursion. It's still twice as fast as the normal pickling code. In the absence of deeply nested structures, I couldn't measure a difference.
-
- 12 Eki, 2001 1 kayıt (commit)
-
-
Jeremy Hylton yazdı
Add a fast_container member to Picklerobject. If fast is true, then fast_container counts the depth of nested container calls. If the depth exceeds FAST_LIMIT (2000), the fast flag is ignored and the normal checks occur. This approach is much like the approach for prevent stack overflow for comparison and reprs of recursive objects (e.g. [[...]]). - Fast container used for save_list(), save_dict(), and save_inst(). XXX Not clear which other save_xxx() functions should use it. Make Picklerobject into new-style types, using PyObject_GenericGetAttr() and PyObject_GenericSetAttr(). - Use PyMemberDef for binary and fast members - Use PyGetSetDef for persistent_id, inst_persistent_id, memo, and PicklingError. XXX Not all of these seem like they need to use getset, but it's not clear why the old getattr() and setattr() had such odd semantics. One change is that the getvalue() attribute will exist on all Picklers, not just list-based picklers; I think this is a more rationale interface. There is a long laundry list of other changes: - Remove unused #defines for PyList_SET_ITEM() etc. - Make some of the indentation consistent - Replace uses of cPickle_PyMapping_HasKey() where the first argument is self->memo with calls to PyDict_GetItem(), because self->memo must be a dictionary. - Don't bother to check if cPickle_PyMapping_HasKey() returns < 0, because it can only return 0 or 1. - Replace uses of PyObject_CallObject() with PyObject_Call(), when we can guarantee that the argument tuple is really a tuple. Performance impacts of these changes: - 5% speedup for normal pickling - No change to fast-mode pickling. XXX Really need tests for all the features in cPickle that aren't in pickle.
-
- 28 Agu, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
couldn't succeed. Fixed.
-
- 18 Agu, 2001 1 kayıt (commit)
-
-
Guido van Rossum yazdı
This patch attempts to do to cPickle what Guido did for pickle.py v 1.50. That is: save_global tries importing the module, and fetching the name from the module. If that fails, or the returned object is not the same one we started with, it raises a PicklingError. (All this so pickling a lambda will fail at save time, rather than load time).
-
- 17 Agu, 2001 1 kayıt (commit)
-
-
Martin v. Löwis yazdı
- 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.
-
- 02 Agu, 2001 1 kayıt (commit)
-
-
Tim Peters yazdı
-
- 17 Tem, 2001 1 kayıt (commit)
-
-
Fred Drake yazdı
Add some casts to quiet warnings from an unspecified non-GCC compiler. This closes SF patch #436258.
-
- 10 Nis, 2001 3 kayıt (commit)
-
-
Tim Peters yazdı
of 2-space and 4-space indents. Whatever, when I saw the checkin diff it was clear that what my editor thinks a tab means didn't match this module's belief. Removed all the tabs from the lines I added and changed, left everything else alone.
-
Tim Peters yazdı
pickled into the signed(!) 4-byte BININT format, so were getting unpickled again as negative ints. Repaired that. Added some minimal docs at the top about what I've learned about the pickle format codes (little of which was obvious from staring at the code, although that's partly because all the size-related bugs greatly obscured the true intent of the code). Happy side effect: because save_int() needed to grow a *proper* range check in order to fix this bug, it can now use the more-efficient BININT1, BININT2 and BININT formats when the long's value is small enough to fit in a signed 4-byte int (before this, on a sizeof(long)==8 box it always used the general INT format for negative ints). test_cpickle works again on sizeof(long)==8 machines. test_pickle is still busted big-time.
-
Tim Peters yazdı
binary pickle, and the latter contains a pickle of a negative Python int i written on a sizeof(long)==4 box (and whether by cPickle or pickle.py), it's read incorrectly as i + 2**32. The patch repairs that, and allows test_cpickle.py (to which I added a relevant test case earlier today) to work again on sizeof(long)==8 boxes. There's another (at least one) sizeof(long)==8 binary pickle bug, but in pickle.py instead. That bug is still there, and test_pickle.py doesn't catch it yet (try pickling and unpickling, e.g., 1 << 46).
-