summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Backport of r61180:Martin v. Löwis2008-03-022-2/+15
| | | | | | Added checks for integer overflows, contributed by Google. Some are only available if asserts are left in the code, in cases where they can't be triggered from Python code.
* patch for PSF-2006-001.Anthony Baxter2006-10-231-12/+25
|
* SF 1055820: weakref callback vs gc vs threadsTim Peters2004-10-311-1/+3
| | | | | | | | In cyclic gc, clear all weakrefs to unreachable objects before allowing any Python code (weakref callbacks or __del__ methods) to run. This is a critical bugfix, affecting all versions of Python since weakrefs were introduced.
* Patch #980082: Missing INCREF in PyType_Ready.Martin v. Löwis2004-08-181-1/+3
|
* Be more careful about maintaining the invariants; it was actuallyFred Drake2004-08-031-3/+25
| | | | | possible that the callback-less flavors of the ref or proxy could have been added during GC, so we don't want to replace them.
* Fix leak found by Eric Huss.Raymond Hettinger2004-06-251-1/+6
|
* Backport:Anthony Baxter2004-06-111-0/+4
| | | | | Fix for bug #966623 - classes created with type() in an exec(, {}) don't have a __module__. Test for this case.
* Reword messageAndrew M. Kuchling2004-06-051-1/+1
|
* Fix exception wordingAndrew M. Kuchling2004-06-051-1/+1
|
* super_getattro(): Repaired compiler warning about mixed-type comparison.Tim Peters2004-05-111-1/+2
|
* Backport to 2.3:Andrew MacIntyre2004-04-041-0/+2
| | | | | | | | | If a file is opened with an explicit buffer size >= 1, repeated close() calls would attempt to free() the buffer already free()ed on the first close(). [bug introduced with patch #788249] Making sure that the buffer is free()ed in file object deallocation is a belt-n-braces bit of insurance against a memory leak.
* Ensure super() lookup of descriptor from classmethod works (SF ID# 743627)Phillip J. Eby2004-03-251-1/+8
| | | | (Backport to 2.3 maintenance branch)
* Backported fix of revision 2.217.Armin Rigo2004-03-221-2/+2
|
* Raise RuntimeError if the second argument to isinstance() or issubclass()Brett Cannon2004-03-201-9/+48
| | | | | | is a tuple nested to a depth beyond the interpreter's recursion limit to prevent a segfault from blowing the C stack. Fixes bug #858016 .
* PyFile_WriteObject(): some of the local variables are only used whenFred Drake2004-03-191-0/+2
| | | | Py_USING_UNICODE is defined
* Fixed a bug in object.__reduce_ex__ (reduce_2) when using protocolJim Fulton2004-02-091-0/+1
| | | | | 2. Failure to clear the error when attempts to get the __getstate__ attribute fail caused intermittent errors and odd behavior.
* SF patch #875689: >100k alloc wasted on startupRaymond Hettinger2004-02-081-1/+1
| | | | | | | (Contributed by Mike Pall.) Make sure fill_free_list() is called only once rather than 106 times when pre-allocating small ints.
* Backport checkin:Walter Dörwald2004-02-051-1/+1
| | | | | Fix reallocation bug in unicode.translate(): The code was comparing characters instead of character pointers to determine space requirements.
* Allocating a new weakref object can cause existing weakref objects forFred Drake2004-02-041-3/+16
| | | | | | | | | the same object to be collected by the cyclic GC support if they are only referenced by a cycle. If the weakref being collected was one of the weakrefs without callbacks, some local variables for the constructor became invalid and have to be re-computed. The test caused a segfault under a debug build without the fix applied.
* Fix bug in interpretation of the "callback" argument in the constructors forFred Drake2004-02-031-1/+5
| | | | | weakref ref and proxy objects; None was not being treated as identical to NULL, though it was documented as equivalent.
* SF bug 839548: Bug in type's GC handling causes segfaults.Tim Peters2003-11-201-4/+30
| | | | | | | | Also SF patch 843455. This is a critical bugfix, backported from 2.4 development. I don't intend to backport beyond 2.3 maint. The bugs this fixes have been there since weakrefs were introduced.
* subtype_dealloc(): A more complete fix for critical bug 840829 +Tim Peters2003-11-131-11/+23
| | | | | | | | expanded the test case with a piece that needs the more-complete fix. I don't intend to backport this beyond 2.3 maint. It's a critical bugfix, and should be backported to 2.2, 2.1, ..., if more releases in those lines get made.
* Backport of fix for SF bug 840829, memory corruption in some cases ofTim Peters2003-11-131-1/+6
| | | | | | | | weakref callbacks. This is a critical bugfix. It's already been fixed on the trunk (2.4 development). I don't intend to backport it to the 22 line, but if a 2.2.4 ever gets released, this should be in it.
* Backport checkin:Walter Dörwald2003-10-241-19/+20
| | | | | | | | Fix a bug in the memory reallocation code of PyUnicode_TranslateCharmap(). charmaptranslate_makespace() allocates more memory than required for the next replacement but didn't remember that fact, so memory size was growing exponentially every time a replacement string is longer that one character. This fixes SF bug #828737.
* Avoid confusing name for the 3rd argument to str.replace().Fred Drake2003-10-221-3/+3
| | | | This closes SF bug #827260.
* Backport removal of bogus Py_DECREF() and indentation fix.Jeremy Hylton2003-10-211-2/+1
|
* Backport checkin:Walter Dörwald2003-10-201-1/+1
| | | | | Fix a bunch of typos in documentation, docstrings and comments. (From SF patch #810751)
* Patch #825679: Clarify semantics of .isfoo on empty strings.Martin v. Löwis2003-10-182-22/+24
|
* Patch #809535: Mention behaviour of seek on text files.Martin v. Löwis2003-10-181-1/+3
|
* Backport fix to SF bug #820397: __nonzero__() returns 1/0Raymond Hettinger2003-10-121-1/+15
|
* SF patch #820195: make object.__contains__() returns True or False insteadRaymond Hettinger2003-10-092-2/+6
| | | | | | | of 1 or 0. Backport Guido's fix to the default __contains__() and to proxy_has_key() so they will properly return booleans instead of integers.
* 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
|