Phillip J. Eby
f12b642f1c
Ensure super() lookup of descriptor from classmethod works (SF ID# 743627)
...
(Backport to 2.3 maintenance branch)
2004-03-25 02:36:29 +00:00
Armin Rigo
42b2cbcb62
Backported fix of revision 2.217.
2004-03-22 20:39:42 +00:00
Brett Cannon
9aee99be16
Raise RuntimeError if the second argument to isinstance() or issubclass()
...
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 .
2004-03-20 21:54:35 +00:00
Fred Drake
acfe104847
PyFile_WriteObject(): some of the local variables are only used when
...
Py_USING_UNICODE is defined
2004-03-19 15:23:14 +00:00
Jim Fulton
95e4f23b09
Fixed a bug in object.__reduce_ex__ (reduce_2) when using protocol
...
2. Failure to clear the error when attempts to get the __getstate__
attribute fail caused intermittent errors and odd behavior.
2004-02-09 02:57:18 +00:00
Raymond Hettinger
d6ea07f9ac
SF patch #875689 : >100k alloc wasted on startup
...
(Contributed by Mike Pall.)
Make sure fill_free_list() is called only once rather than 106 times
when pre-allocating small ints.
2004-02-08 18:56:07 +00:00
Walter Dörwald
8c077f99d0
Backport checkin:
...
Fix reallocation bug in unicode.translate(): The code was comparing
characters instead of character pointers to determine space requirements.
2004-02-05 17:44:26 +00:00
Fred Drake
74788b6af4
Allocating a new weakref object can cause existing weakref objects for
...
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.
2004-02-04 23:13:43 +00:00
Fred Drake
a7555f8413
Fix bug in interpretation of the "callback" argument in the constructors for
...
weakref ref and proxy objects; None was not being treated as identical to
NULL, though it was documented as equivalent.
2004-02-03 20:15:31 +00:00
Tim Peters
ca6919c180
SF bug 839548: Bug in type's GC handling causes segfaults.
...
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.
2003-11-20 22:13:51 +00:00
Tim Peters
8e81b7efad
subtype_dealloc(): A more complete fix for critical bug 840829 +
...
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.
2003-11-13 22:48:42 +00:00
Tim Peters
695461f200
Backport of fix for SF bug 840829, memory corruption in some cases of
...
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.
2003-11-13 01:17:55 +00:00
Walter Dörwald
218f9abe45
Backport checkin:
...
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 .
2003-10-24 15:05:29 +00:00
Fred Drake
c7cd9cff3c
Avoid confusing name for the 3rd argument to str.replace().
...
This closes SF bug #827260 .
2003-10-22 02:57:23 +00:00
Jeremy Hylton
2e39d5755d
Backport removal of bogus Py_DECREF() and indentation fix.
2003-10-21 18:15:44 +00:00
Walter Dörwald
4958f2741a
Backport checkin:
...
Fix a bunch of typos in documentation, docstrings and comments.
(From SF patch #810751 )
2003-10-20 14:34:48 +00:00
Martin v. Löwis
ee52452721
Patch #825679 : Clarify semantics of .isfoo on empty strings.
2003-10-18 09:54:38 +00:00
Martin v. Löwis
661598f4bc
Patch #809535 : Mention behaviour of seek on text files.
2003-10-18 09:37:12 +00:00
Raymond Hettinger
5307bc50ea
Backport fix to SF bug #820397 : __nonzero__() returns 1/0
2003-10-12 23:41:21 +00:00
Raymond Hettinger
6b560bc648
SF patch #820195 : make object.__contains__() returns True or False instead
...
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.
2003-10-09 20:51:07 +00:00
Jeremy Hylton
77ecfdd171
Backport Tim's portability improvement and comments.
2003-09-17 03:22:27 +00:00
Jeremy Hylton
6687ded893
Backport: Double-fix of crash in Unicode freelist handling.
2003-09-16 20:30:03 +00:00
Raymond Hettinger
bd40b91238
Fix leak in classobject.c. The leak surfaced on the error exit when
...
hashing a class that does not define __hash__ but does define a
comparison.
2003-09-16 07:13:56 +00:00
Raymond Hettinger
5ae2511c06
Backport Neal's fix for bug #789402 -- a memory leak in fileobject.c
2003-09-16 05:29:50 +00:00
Martin v. Löwis
8dc455fe59
Only release buffer after file has been closed. Fixes #800824 .
2003-09-07 20:43:24 +00:00