summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Backport Tim's portability improvement and comments.Jeremy Hylton2003-09-171-1/+13
|
* Backport: Double-fix of crash in Unicode freelist handling.Jeremy Hylton2003-09-161-1/+2
|
* Fix leak in classobject.c. The leak surfaced on the error exit whenRaymond Hettinger2003-09-161-0/+1
| | | | | hashing a class that does not define __hash__ but does define a comparison.
* Backport Neal's fix for bug #789402 -- a memory leak in fileobject.cRaymond Hettinger2003-09-161-0/+1
|
* Only release buffer after file has been closed. Fixes #800824.Martin v. Löwis2003-09-071-1/+1
|
* SF bug #800796: Difference between hash() and __hash__()Raymond Hettinger2003-09-051-1/+8
| | | | slice(5).__hash__() now raises a TypeError.
* Patch #788249: Pass an explicit buffer to setvbuf in PyFile_SetBufSize().Martin v. Löwis2003-09-041-5/+19
| | | | Fixes #603724.
* SF patch #798467: Update docstring of has_key for bool changesRaymond Hettinger2003-09-012-2/+2
| | | | (Contributed by George Yoshida.)
* Remove 'e.g.' from error messageRaymond Hettinger2003-08-301-3/+3
|
* SF bug #795506: Wrong handling of string format code for float values.Raymond Hettinger2003-08-272-0/+6
| | | | Added missing support for '%F' as had been documented.
* Backport checkin:Walter Dörwald2003-08-151-0/+1
| | | | Fix refcounting leak in charmaptranslate_lookup()
* Backport checkin:Walter Dörwald2003-08-151-1/+3
| | | | Fix another refcounting leak in PyUnicode_EncodeCharmap().
* Backport checkin:Walter Dörwald2003-08-151-0/+2
| | | | Fix another refcounting leak (in PyUnicode_DecodeUnicodeEscape()).
* Backport my fix to my fix:Michael W. Hudson2003-08-151-1/+1
| | | | | My last fix left n used unitialized in tha a==b case. Fix, by not using n at all in that case.
* Backport checkins:Walter Dörwald2003-08-141-3/+3
| | | | | | | | | | | Fix refcount leak in PyUnicode_EncodeCharmap(). The bug surfaces when an encoding error occurs and the callback name is unknown, i.e. when the callback has to be called. The problem was that the fact that the callback has already been looked up was only recorded in a local variable in charmap_encoding_error(), because charmap_encoding_error() got it's own copy of the errorHandler pointer instead of a pointer to the pointer in PyUnicode_EncodeCharmap().
* And backport-2-3-4:Michael W. Hudson2003-08-141-9/+9
| | | | | Fix reference leak noted in test_types: Check for a[:] = a _before_ calling PySequence_Fast on a.
* As penance for forgetting to flag my last checkins as bugfix candidates,Michael W. Hudson2003-08-071-3/+6
| | | | | | just do the backport. These changes do not apply to release22-maint.
* Remove code that tried to warn about shadowing builtin names after aNeil Schemenauer2003-07-161-66/+1
| | | | module had been compiled. It gives too many spurious warnings.
* Remove stray comments.Jeremy Hylton2003-07-161-1/+0
|
* Remove unnecessary check in tests for slots allowed.Jeremy Hylton2003-07-161-1/+1
| | | | | | | The !PyType_Check(base) check snuck in as part of rev 2.215, but was unrelated to the SF patch that is mentioned in the checkin comment. The test is currently unnecessary because base is set to the return value of best_bases(), which returns a type or NULL.
* Remove proxy_print(), since that caused an inconsistency betweenFred Drake2003-07-141-10/+2
| | | | | "print repr(proxy(a))" and "proxy(a)" at an interactive prompt. Closes SF bug #722763.
* Add whitespace.Jeremy Hylton2003-07-111-3/+3
|
* Support 'mbcs' as a 'built-in' encoding, so the C API can use it withoutMark Hammond2003-07-011-0/+19
| | | | | defering to the encodings package. As described in [ 763111 ] mbcs encoding should skip encodings package
* Fix SF 762891: "del p[key]" on proxy object raises SystemError()Raymond Hettinger2003-06-301-1/+5
|
* SF patch 703666: Several objects don't decref tmp on failure in subtype_newRaymond Hettinger2003-06-284-4/+13
| | | | | | Submitted By: Christopher A. Craig Fillin some missing decrefs.
* Require that __nonzero__() return a bool or exactly an int.Jeremy Hylton2003-06-271-6/+2
|
* Check return type of __nonzero__() method.Jeremy Hylton2003-06-271-1/+13
| | | | | | The language reference says you must return an int or a bool. This fix limits the scope of SF bug 759227 (infinite recursion) to subclasses of int.
* Whitespace normalization.Walter Dörwald2003-06-251-3/+3
|
* Fix whitespace.Walter Dörwald2003-06-181-1/+1
|
* SF bug #753451: classmethod abuse --> SystemErrorRaymond Hettinger2003-06-181-0/+6
| | | | | | Check the argument to classmethod for callability. Backport candidate.
* Fix typo in comment.Walter Dörwald2003-06-171-1/+1
|
* Use _PyEval_SliceIndex to handle list.index() calls withWalter Dörwald2003-06-171-1/+3
| | | | huge start and stop arguments. Add tests.
* Whitespace normalization.Walter Dörwald2003-06-171-6/+6
|
* Fix sloppy index() implementation:Guido van Rossum2003-06-171-2/+12
| | | | | - don't use min() and max() - interpret negative start/stop argument like negative slice indices
* SF #754014: list.index() should accept optional start, end argumentsRaymond Hettinger2003-06-171-5/+10
| | | | Also, modified UserList.index() to match and expanded the related tests.
* - SF patch 751998 fixes an unwanted side effect of the previous fixGuido van Rossum2003-06-131-5/+13
| | | | for SF bug 742860 (the next item).
* Fixed a comment.Brett Cannon2003-06-111-1/+1
|
* Warn about creating global variables by __setattr__ that shadow builtinNeil Schemenauer2003-06-091-1/+66
| | | | | names. Unfortunately, this is not bulletproof since the module dictionary can be modified directly.
* Fix SF #749831, copy raises SystemError when getstate raises exceptionNeal Norwitz2003-06-081-0/+2
|
* Fix for SF 742911. We now clear the weakrefs *before* calling __del__Guido van Rossum2003-05-291-11/+12
| | | | or emptying __dict__, just as we do for classic classes.
* Add notes on use cases with paired accesses to the same key.Raymond Hettinger2003-05-281-5/+30
|
* * Beefed-up testsRaymond Hettinger2003-05-281-13/+42
| | | | | * Allow tuple re-use * Call tp_iternext directly
* SF bug 705231: Assertion failed, python aborts.Tim Peters2003-05-241-6/+38
| | | | | | | float_pow(): Don't let the platform pow() raise -1.0 to an integer power anymore; at least glibc gets it wrong in some cases. Note that math.pow() will continue to deliver wrong (but platform-native) results in such cases.
* PyType_Ready(): Complain if the type is a base type, and gc'able, andTim Peters2003-05-211-1/+31
| | | | | | | | | | | | | | | | | | tp_free is NULL or PyObject_Del at the end. Because it's a base type it must call tp_free in its dealloc function, and because it's gc'able it must not call PyObject_Del. inherit_slots(): Don't inherit tp_free unless the type and its base agree about whether they're gc'able. If the type is gc'able and the base is not, and the base uses the default PyObject_Del for its tp_free, give the type PyObject_GC_Del for its tp_free (the appropriate default for a gc'able type). cPickle.c: The Pickler and Unpickler types claim to be base classes and gc'able, but their dealloc functions didn't call tp_free. Repaired that. Also call PyType_Ready() on these typeobjects, so that the correct (PyObject_GC_Del) default memory-freeing function gets plugged into these types' tp_free slots.
* SF bug #604716: faster [None]*n or []*nRaymond Hettinger2003-05-211-0/+12
| | | | Fulfilled request to special case repetitions of lists of length 0 or 1.
* Fixing the previous patch to have the changes be to the proper docstrings.Brett Cannon2003-05-201-8/+8
|
* Fix docstrings for __(get|set|del)slice__ to mention that negative indices ↵Brett Cannon2003-05-201-3/+9
| | | | are not supported.
* Only encode Unicode objects when printing them raw.Martin v. Löwis2003-05-181-1/+2
|
* Consider \U-escapes in raw-unicode-escape. Fixes #444514.Martin v. Löwis2003-05-181-3/+42
|
* Removed the out of date and no-longer-referenced xxobject.c exampleJim Fulton2003-05-161-108/+0
| | | | | type implementation. Note that this same example lives in Modules/xxmodule.c. (It is just as out of date there.)