Jack Jansen [Fri, 13 Dec 2002 23:32:51 +0000 (23:32 +0000)]
Sigh: the Jaguar workaround for the prefs file broke saving it on OS9. Temporary workaround is to ignore the exception (it's only about file creator/type anyway).
Guido van Rossum [Fri, 13 Dec 2002 18:36:22 +0000 (18:36 +0000)]
execve(), spawnve(): add some extra sanity checking to env;
PyMapping_Check() doesn't guarantee that PyMapping_Size() won't raise
an exception, nor that keys and values are lists.
Also folded some long lines and did a little whitespace normalization.
Jack Jansen [Fri, 13 Dec 2002 13:38:28 +0000 (13:38 +0000)]
It was an old MacPython artefact that these files were still in the source
tree. Removed them, anyone really desparate to recover them can get them
from the CVS repository.
Kurt B. Kaiser [Thu, 12 Dec 2002 19:15:39 +0000 (19:15 +0000)]
M CallTipWindow.py
M CallTips.py
Calltip fetch was erroring when an Edit window was used without a Shell.
Also, fix CallTipWindow.py so test code will run and add a comment about a
bug which causes the calltip window to override all others.
Walter Dörwald [Thu, 12 Dec 2002 19:14:08 +0000 (19:14 +0000)]
Change issubclass() so that recursive tuples (directly or indirectly
containing class objects) are allowed as the second argument.
This makes issubclass() more similar to isinstance() where recursive
tuples are allowed too.
Thomas Heller [Thu, 12 Dec 2002 18:54:19 +0000 (18:54 +0000)]
Raw documentation for the bdist_wininst postinstallation script.
People are already using it, so these docs are certainly better than
no docs at all. Markup is mostly missing and the layout is probably
ugly, but this can be fixed later.
Question: there are references to MS docs for the CSIDL_... constants
and the IShellLink interface. Are these pointers sufficient, or should
the MS docs reworded and repeated here?
Jason Tishler [Thu, 12 Dec 2002 18:13:36 +0000 (18:13 +0000)]
Patch #551960: Add check for setrlimit() support
test_resource calls resource.setrlimit() to change the file size limits.
This fails on Cygwin, which supports setrlimit() and getrlimit(), just not
changing that particular setting. (The same would apply to any other
platform that has those functions but not that particular feature.)
Since getrlimit() works and setrlimit() can be used for other reasons, a
check for ValueError was added to that part of the test.
Patch to make _codecs a builtin module. This is necessary since
Python 2.3 will support source code encodings which rely on the
builtin codecs being available to the parser.
Walter Dörwald [Thu, 12 Dec 2002 16:41:44 +0000 (16:41 +0000)]
Enhance issubclass() and PyObject_IsSubclass() so that a tuple is
supported as the second argument. This has the same meaning as
for isinstance(), i.e. issubclass(X, (A, B)) is equivalent
to issubclass(X, A) or issubclass(X, B). Compared to isinstance(),
this patch does not search the tuple recursively for classes, i.e.
any entry in the tuple that is not a class, will result in a
TypeError.
Jack Jansen [Thu, 12 Dec 2002 10:31:54 +0000 (10:31 +0000)]
Getting rid of pre-Carbon (MacOS8) support. All code depending on
TARGET_API_MAC_OS8 (or !TARGET_API_MAC_CARBON) is gone. Also some
TARGET_API_MAC_OSX conditional code is gone, because it is no longer
used on OSX-only Python (only in MacPython-OS9).
Jeremy Hylton [Wed, 11 Dec 2002 21:28:32 +0000 (21:28 +0000)]
Fix one bug and reformat lots of code.
The bug is a reference to co_first_lineno that should be
co_firstlineno. The only other substantial change is to speed up
localtrace_count() by avoiding *costly* calls to inspect module.
It's trivial to get the filename and lineno directly from the frame.
Otherwise, delete commented out debug code and reflow very long lines.
Greg Ward [Wed, 11 Dec 2002 14:43:13 +0000 (14:43 +0000)]
Finish expunging the 'linuxaudiodev' name:
* rename oss_t to lad_t, Ladtype to OSSType,
* rename lad_*() methods to oss_*()
* rename lad_methods list to oss_methods
Patch and impetus supplied by Nicholas FitzRoy-Dale <wzdd@lardcave.net>.
Tim Peters [Mon, 9 Dec 2002 22:56:13 +0000 (22:56 +0000)]
SF 548651: Fix the METH_CLASS implementation.
Most of these patches are from Thomas Heller, with long lines folded
by Tim. The change to test_descr.py is from Guido. See the bug report.
Not a bugfix candidate -- METH_CLASS is new in 2.3.
Greg Ward [Mon, 9 Dec 2002 16:27:15 +0000 (16:27 +0000)]
Added test_initial_whitespace() to ensure that SF bug #622849 is fixed.
Change LongWordTestCase.setUp() -- remove leading whitespace from
text string.
Comment fix.
Greg Ward [Mon, 9 Dec 2002 16:23:08 +0000 (16:23 +0000)]
Fix SF bug #622831 (I think): add unicode_whitespace_trans class
attribute, and modify _munge_whitespace() to recognize Unicode strings
and use unicode_whitespace_trans to munge them. Still need to add a
test to make sure I've really fixed the bug.
Skip Montanaro [Sun, 8 Dec 2002 18:36:24 +0000 (18:36 +0000)]
Add support for binary pickles to the shelve module. In some situations
this can result in significantly smaller files. All classes as well as the
open function now accept an optional binary parameter, which defaults to
False for backward compatibility. Added a small test suite, updated the
libref documentation (including documenting the exported classes and fixing
a few other nits) and added a note about the change to Misc/NEWS.
Tim Peters [Sat, 7 Dec 2002 21:39:16 +0000 (21:39 +0000)]
slot_nb_nonzero(): Another leak uncovered by the sandbox datetime
tests. I found the logic too confusing to follow here, so rewrote more
than was likely absolutely necessary.
Martin v. Löwis [Sat, 7 Dec 2002 14:41:17 +0000 (14:41 +0000)]
Correct db3 /opt/sfw library path. Link ndbm with libc only if ndbm.h
is present and libndbm is not. Add runtime libs to dbm if linked against
Berkeley DB.
Tim Peters [Fri, 6 Dec 2002 23:38:02 +0000 (23:38 +0000)]
slot_tp_hash(): In the normal path, this leaked a reference to the
integer hash object returned by __hash__(). This accounts for some of
the "mystery leaks" in the sandbox datetime tests, but probably not
all of them.
Kurt B. Kaiser [Fri, 6 Dec 2002 21:45:24 +0000 (21:45 +0000)]
M PyShell.py
1. Format and print exceptions raised in user code.
M rpc.py
1. Additional debug messages in rpc.py
2. Move debug message enable switch from SocketIO to Client and Server
to allow separate activation.
3. Add indication of origin (client or server) to debug message
4. Add sequence number to appropriate debug messages
5. Pass string exception arg as a string rather than a tuple.