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.
Jason Tishler [Thu, 5 Dec 2002 20:18:39 +0000 (20:18 +0000)]
Patch #648998: test_commands ACL patch
Although motived by Cygwin, this patch will prevent
test_commands from failing on Unixes that support
ACLs. For example, the following is an excerpt from
the Solaris ls manpage:
...
-rwxrwxrwx+ 1 smith dev 10876 May 16 9:42 part2
The plus sign indicates that there is an ACL associated
with the file.
...
Jason Tishler [Thu, 5 Dec 2002 15:18:15 +0000 (15:18 +0000)]
Patch #551977: Regression exceptions for cygwin
This patch updates regrtest.py to understand which
tests are normally skipped under Cygwin. The list of
tests was verified with the Cygwin Python maintainer.
Replace BadInternalCall with TypeError. Add a test case. Fix whitespace.
Just van Rossum showed a weird, but clever way for pure python code to
trigger the BadInternalCall. The C code had assumed that calling a class
constructor would return an instance of that class; however, classes that
abuse __new__ can invalidate that assumption.
Jack Jansen [Tue, 3 Dec 2002 23:40:22 +0000 (23:40 +0000)]
Added PEP253 support to most Carbon modules. This isn't complete yet:
some of the more compilcated cases (CF, Res) haven't been done yet. Also,
various types should inherit from each other (anything with an as_Resource
method should be a Resource subtype, the CF types should become one family).
Add more sophistication to the comparison between pyclbr output and
real module, by filtering out aliased methods. This, combined with
the recent fixes to pyclbr, make it possible to enable more tests with
fewer exceptions.
Another big update, fixing all known bugs related to nesting functions
and classes. Also add a mini main program that dumps the results for
a given file or module.
Moderately heavy reorganization of pyclbr to fix package-related bugs.
- The _modules cache now uses the full module name.
- The meaning of the (internal!!!) inpackage argument is changed: it
now is the parent package name, or None. readmodule() doesn't
support this argument any more.
- The meaning of the path argument is changed: when inpackage is set,
the module *must* be found in this path (as is the case for the real
package search).
- Miscellaneous cleanup, e.g. fixed __all__, changed some comments and
doc strings, etc.
- Adapted the unit tests to the new semantics (nothing much changed,
really). Added some debugging code to the unit tests that print
helpful extra info to stderr when a test fails (interpreting the
test failures turned out to be hard without these).
Greg Ward [Sat, 30 Nov 2002 23:17:10 +0000 (23:17 +0000)]
Rename LinuxAudioError to OSSAudioError ('ossaudiodev.error').
Use OSSAudioError much less frequently -- all real I/O errors (ie. any
time open(), read(), write(), ioctl(), or select() return an error)
become IOError. OSSAudioError is only used now for bad open() mode.
Greg Ward [Sat, 30 Nov 2002 23:05:26 +0000 (23:05 +0000)]
Added mode 'rw' for full-duplex (play and record at the same time) mode.
Added _EXPORT_INT macro to export an integer constant to Python-space.
Use it for all the AFMT_* constants, and update the list of AFMT_*
constants to match what's in Linux 2.4: add AFMT_{QUERY,IMA_ADPCM,
MPEG,AC3}. This should probably be tested with older versions of OSS,
eg. with Linux 2.2 and 2.0.
Export all SNDCTL_* ioctl numbers (where "all" is the set found in
/usr/include/linux/soundcard.h on my Debian 3.0 system -- again
Linux 2.4). Again needs to be tested with older OSS versions.
Greg Ward [Sat, 30 Nov 2002 22:47:45 +0000 (22:47 +0000)]
ossaudiodev -- Python interface to the OSS (Open Sound System) API.
This module is a replacement for linuxaudiodev, which will eventually
be deprecated.
Initial revision is rev 2.20 of linuxaudiodev.c, with a rewritten
header comment.
Just van Rossum [Sat, 30 Nov 2002 19:56:14 +0000 (19:56 +0000)]
- found a case where sys.path[0] isn't set to Contents/Resources,
so search the entire path.
- only add modules if we're building a standalone application.
Ka-Ping Yee [Sat, 30 Nov 2002 03:53:15 +0000 (03:53 +0000)]
getdoc():
Remove leading whitespace from first line; remove leading and
trailing blank lines from docstrings. (Patch 645938 submitted
by David Goodger.)
Jack Jansen [Fri, 29 Nov 2002 23:40:48 +0000 (23:40 +0000)]
Converted the Carbon modules to use PEP252-style objects, with
descriptors in stead of manual getattr hooks to get at attributes
of the objects.
For Qd I have in stead gotten rid of most of the attribute access
in favor of the carbon-style accessor methods (with the exception
of visRgn, to be done later), and of the Carbon.Qd.qd global object,
for which accessor functions are also available.
For List I have fixed the fact that various methods were incorrectly
generated as functions.
CF is untouched: PEP252 doesn't allow "poor-mans-inheritance" with
basechain, so it will have to wait for PEP253 support.
Just van Rossum [Fri, 29 Nov 2002 20:47:40 +0000 (20:47 +0000)]
Slightly improved version of patch #642578: "Expose PyImport_FrozenModules
in imp". This adds two functions to the imp module: get_frozenmodules()
and set_frozenmodules().