Guido van Rossum [Sat, 22 Nov 2003 23:55:50 +0000 (23:55 +0000)]
- When method objects have an attribute that can be satisfied either
by the function object or by the method object, the function
object's attribute usually wins. Christian Tismer pointed out that
that this is really a mistake, because this only happens for special
methods (like __reduce__) where the method object's version is
really more appropriate than the function's attribute. So from now
on, all method attributes will have precedence over function
attributes with the same name.
Jack Jansen [Wed, 19 Nov 2003 14:34:18 +0000 (14:34 +0000)]
Getting rid of support for MacOS9 and earlier. This is the first step,
and the biggest in size, but probably the easiest. Hunting through the
source code comes next.
Jack Jansen [Wed, 19 Nov 2003 13:45:26 +0000 (13:45 +0000)]
Forward port of various fixes that were initially only done on the
release23-maint branch:
- Remember the scroll position when rebuilding the browser (as we do far
too often). Fixes #824430.
- Allow for the documentation to be inside PythonIDE as well as in
the Python.app inside the framework (the original location for 2.3).
- Updated version numbers
- In PythonIDE, add the Tools/IDE directory as the second entry in
sys.path in stead of as the first, leaving PythonIDE.app/Contents/Resources
as the first one.
- The code for setting the working directory to $HOME was both incorrect
and in the wrong place, fixed.
- On OSX the default location for IDE scripts is now
$HOME/Library/Python/IDE-Scripts.
Kurt B. Kaiser [Wed, 19 Nov 2003 04:52:32 +0000 (04:52 +0000)]
- After an exception, run.py was not setting the exception vector. Noam
Raphael suggested correcting this so pdb's postmortem pm() would work.
IDLEfork Patch 844675
Barry Warsaw [Wed, 19 Nov 2003 02:23:01 +0000 (02:23 +0000)]
__init__(): The docstring was incorrect regarding how header wrapping
gets done when maxheaderlen <> 0. The header really gets wrapped via
the email.Header.Header class, which has a more sophisticated
algorithm than just splitting on semi-colons.
Barry Warsaw [Wed, 19 Nov 2003 02:22:36 +0000 (02:22 +0000)]
Generator's constructor: The documentation was incorrect regarding how
header wrapping gets done when maxheaderlen <> 0. The header really
gets wrapped via the email.Header.Header class, which has a more
sophisticated algorithm than just splitting on semi-colons.
Jack Jansen [Tue, 18 Nov 2003 23:09:19 +0000 (23:09 +0000)]
Modified version by Bob Ippolito. It passes the just-added test_applesingle
after some minor mods. Fixes #803498, but should NOT be backported because
the original problem seems to be unreproducable.
Just van Rossum [Tue, 18 Nov 2003 23:00:55 +0000 (23:00 +0000)]
Fix for [ 765456 ]: testAFakeZlib failed on platforms that use a
statically linked zlib module, but since the problem it tests can't
exist on these systems, simply skip it then. Will backport.
* Migrate set() and frozenset() from the sandbox.
* Install the unittests, docs, newsitem, include file, and makefile update.
* Exercise the new functions whereever sets.py was being used.
Includes the docs for libfuncs.tex. Separate docs for the types are
forthcoming.
Thomas Heller [Fri, 14 Nov 2003 10:28:42 +0000 (10:28 +0000)]
SF #841977 - modulefinder fails to find extension modules in packages
The find_all_submodules() method in modulefinder only
looks for *.py, *.pyc, and *.pyo files. Python
extension modules are only found if they are referenced
in import statements somewhere.
This patch uses the actual list from imp.get_suffixes().
Tim Peters [Fri, 14 Nov 2003 00:01:17 +0000 (00:01 +0000)]
update_refs(): assert that incoming refcounts aren't 0. The comment
for this function has always claimed that was true, but it wasn't
verified before. For the latest batch of "double deallocation" bugs
(stemming from weakref callbacks invoked by way of subtype_dealloc),
this assert would have triggered (instead of waiting for
_Py_ForgetReference to die with a segfault later).
Tim Peters [Thu, 13 Nov 2003 22:50:00 +0000 (22:50 +0000)]
subtype_dealloc(): Simplified overly contorted retracking logic. With
this change, I think subtype_dealloc is actually a smidgen less obscure
than it was in 2.3 -- we got rid of a negation in an "if" <wink>.
Tim Peters [Wed, 12 Nov 2003 20:43:28 +0000 (20:43 +0000)]
SF bug 840829: weakref callbacks and gc corrupt memory.
subtype_dealloc(): This left the dying object exposed to gc, so that
if cyclic gc triggered during the weakref callback, gc tried to delete
the dying object a second time. That's a disaster. subtype_dealloc()
had a (I hope!) unique problem here, as every normal dealloc routine
untracks the object (from gc) before fiddling with weakrefs etc. But
subtype_dealloc has obscure technical reasons for re-registering the
dying object with gc (already explained in a large comment block at
the bottom of the function).
The fix amounts to simply refraining from reregistering the dying object
with gc until after the weakref callback (if any) has been called.
This is a critical bug (hard to predict, and causes seemingly random
memory corruption when it occurs). I'll backport it to 2.3 later.
Tim Peters [Wed, 12 Nov 2003 19:30:36 +0000 (19:30 +0000)]
pyexpat stopped building on Windows -- whining about the lack of a
HAVE_MEMMOVE define. Just defined it on the cmdline (it doesn't
include Python.h, and Fred doesn't want to change the code).
Guido van Rossum [Mon, 10 Nov 2003 02:16:36 +0000 (02:16 +0000)]
mktemp() shouldn't rely on os.path.exists(), which can return False if
the file is a symlink. Instead, use os.lstat directly, if it exists;
fall back on os.stat or the built-in open. Thanks to Iustin Pop.
Alex Martelli [Sun, 9 Nov 2003 16:33:56 +0000 (16:33 +0000)]
clarified (in the 5.14 summary) that tests and comparisons all chain,
added a specific \ref to 5.9 in lieu of previous vague "see above".
(same as commit of Sun Nov 2 to the release23-maint branch)