Guido van Rossum [Sun, 30 Nov 2003 22:07:34 +0000 (22:07 +0000)]
Backport:
Remove all uses of alloca() from this module. The alloca() return value
isn't checked, and it *is* possible that a very large alloca() call is
made, e.g. when a large registry value is being read. I don't know if
alloca() in that case returns NULL or returns a pointer pointing outside
the stack, and I don't want to know -- I've simply replaced all calls to
alloca() with either PyMem_Malloc() or PyString_FromStringAndSize(NULL,)
as appropriate, followed by a size check. This addresses SF buf 851056.
Thomas Heller [Fri, 28 Nov 2003 19:35:58 +0000 (19:35 +0000)]
See SF #848614: distutils' msvccompiler now tries to detect that MSVC6
is installed but the registry settings are incomplete because the gui
has never been run.
Jack Jansen [Thu, 27 Nov 2003 23:20:06 +0000 (23:20 +0000)]
Fix (workaround, actually) for bug #844676: deselecting "show hidden" can
cause an index error. We now select the first package if this threatens
to happen. Backport of 1.17.
Jack Jansen [Thu, 27 Nov 2003 23:12:37 +0000 (23:12 +0000)]
Package Mnager error dialogs could refer to hidden packages, which was
confusing. To be on the safe side we always show hidden packages before
showing error dialogs. Backport of 1.16.
Kurt B. Kaiser [Mon, 24 Nov 2003 02:34:01 +0000 (02:34 +0000)]
Backport:
- 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
Update NEWS and include some items missed in IDLE1.0b2.
Tim Peters [Sat, 22 Nov 2003 03:46:30 +0000 (03:46 +0000)]
Indented and repaired the maze of #ifdefs setting USE_RECURSION_LIMIT.
Indented because it was incomprehensible. "Repaired" means someone
checked in a change that screwed up the multiple nesting levels, causing
USE_RECURSION_LIMIT to stop getting defined on all non-LP64 boxes other
than FreeBSD. Tried to repair that in a more-robust way. That error
in turn caused a bogus change to get checked in to test_re.py, which I
repaired earlier.
This needs fresh testing on all non-Win32 platforms (Win32 never used
USE_RECURSION_LIMIT, and still doesn't). Running the standard test_re.py
is an adequate test.
Tim Peters [Sat, 22 Nov 2003 03:25:40 +0000 (03:25 +0000)]
Reverted from rev 1.45.6.1 to rev 1.45: deep recursion is still part of
sre in 2.3, and the backport of the 2.4 version of the tests should not
have been done. It got confused because someone else checked a bad
change into _sre.c that caused the tests that are *supposed* to raise
a recursion exception to stop doing so on some (most?) platforms.
test_re passes again on Windows now. Until the bad change to _sre gets
fixed, it will fail on platforms other than Windows and FreeBSD, either
by "Test Failed", or by bad consequences of C stack overflow.
Tim Peters [Thu, 20 Nov 2003 22:13:51 +0000 (22:13 +0000)]
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.
Barry Warsaw [Wed, 19 Nov 2003 02:20:14 +0000 (02:20 +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.
Barry Warsaw [Wed, 19 Nov 2003 02:19:43 +0000 (02:19 +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.
Just van Rossum [Tue, 18 Nov 2003 23:04:28 +0000 (23:04 +0000)]
Backport of 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.
Thomas Heller [Fri, 14 Nov 2003 10:23:03 +0000 (10:23 +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 [Thu, 13 Nov 2003 22:48:42 +0000 (22:48 +0000)]
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.
Tim Peters [Thu, 13 Nov 2003 15:52:25 +0000 (15:52 +0000)]
#define HAVE_MEMMOVE on the cmdline for the pyexpat project; it doesn't
include Python.h, Fred doesn't want the source code changed, and it
won't compile on Windows otherwise.
Tim Peters [Thu, 13 Nov 2003 01:17:55 +0000 (01:17 +0000)]
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.
Anthony Baxter [Thu, 6 Nov 2003 13:57:49 +0000 (13:57 +0000)]
On RH10, the PIE additions to gcc mean that id() can sometimes be a very
large 32 bit int, which comes out as a negative int. Workaround this to
prevent warnings from the test suite and the std lib.
Anthony Baxter [Thu, 6 Nov 2003 13:40:46 +0000 (13:40 +0000)]
On RH10, the PIE additions to gcc mean that id() can sometimes be a very
large 32 bit int, which comes out as a negative int. Workaround this to
prevent warnings from the test suite.
Jack Jansen [Tue, 4 Nov 2003 22:45:16 +0000 (22:45 +0000)]
Temporary "fix" for the fact that pbxbuild is replaced with xcodebuild
on Panther: make it a variable. Changing the variable has to be done
by hand, for now, that remains to be worked on.
Jack Jansen [Tue, 4 Nov 2003 21:04:22 +0000 (21:04 +0000)]
Various fixes to make the standard applets have a correct version number,
and to make BuildApplet have an icon again (albeit a quickly converted
OS9 icon).
Anthony Baxter [Tue, 4 Nov 2003 14:11:01 +0000 (14:11 +0000)]
get tests working again. partial backport of 1.46 - I fixed the
recursive tests that used to fail, but left test_re_groupref_exists
disabled, as it fails on the release23-maint branch. Maybe something
else needs to be backported?
Jack Jansen [Sat, 1 Nov 2003 22:30:50 +0000 (22:30 +0000)]
- 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.
- When building the IDE for use with Apple-provided MacPython add
PythonIDEMain.py to the Resources folder.
Together these two makes fixes to PythonIDEMain available to Panther
users.
Jack Jansen [Sat, 1 Nov 2003 22:28:19 +0000 (22:28 +0000)]
Two related fixes:
- 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.
Together, these solve the problem that some people had (but, curiously
enough, only some) that the IDE crashed at startup because it couldn't
create "/Scripts".
Walter Dörwald [Fri, 24 Oct 2003 15:05:29 +0000 (15:05 +0000)]
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.
Fred Drake [Tue, 21 Oct 2003 20:01:21 +0000 (20:01 +0000)]
Provide a bit more information to the compiler when building Expat.
This avoids having to modify the Expat sources in any way starting
with Expat 1.95.7.