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.
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.