Neal Norwitz [Mon, 20 Mar 2006 06:30:08 +0000 (06:30 +0000)]
Patch #1309579: wait3 and wait4 were added to the posix module by Chad J. Schroeder.
This was a fair amount of rework of the patch. Refactored test_fork1 so it
could be reused by the new tests for wait3/4. Also made them into new style
unittests (derive from unittest.TestCase).
Anthony Baxter [Mon, 20 Mar 2006 05:21:58 +0000 (05:21 +0000)]
SF [ 1231053 ] audioop - alaw encoding/decoding added, code updated
This patch adds a-LAW encoding to audioop and replaces the old
u-LAW encoding/decoding code with the current code from sox.
Neal Norwitz [Mon, 20 Mar 2006 01:53:23 +0000 (01:53 +0000)]
Use macro versions instead of function versions when we already know the type.
This will hopefully get rid of some Coverity warnings, be a hint to
developers, and be marginally faster.
Some asserts were added when the type is currently known, but depends
on values from another function.
Georg Brandl [Sat, 18 Mar 2006 07:59:59 +0000 (07:59 +0000)]
Previously, Python code had no easy way to access the contents of a
cell object. Now, a ``cell_contents`` attribute has been added
(closes patch #1170323).
Thomas Heller [Fri, 17 Mar 2006 15:52:58 +0000 (15:52 +0000)]
Merge changes from the upstream version:
- cast is implemented as a foreign function now
- On Windows, it is now possible to access functions exported by ordinal only
Tim Peters [Fri, 17 Mar 2006 03:29:34 +0000 (03:29 +0000)]
Introduced symbol PY_FORMAT_SIZE_T. See the new comments
in pyport.h. Changed PyString_FromFormatV() to use it
instead of inlining its own maze of #if'ery.
Walter Dörwald [Thu, 16 Mar 2006 21:46:40 +0000 (21:46 +0000)]
Fix wrong argument format in PyCodec_IncrementalEncoder() and
PyCodec_IncrementalDecoder().
Factor out common code from PyCodec_Encoder()/PyCodec_Decoder(),
PyCodec_IncrementalEncoder()/PyCodec_IncrementalDecoder() and
PyCodec_StreamReader()/PyCodec_StreamWriter().
Trent Mick [Thu, 16 Mar 2006 17:34:41 +0000 (17:34 +0000)]
Update test_winsound to check for a configured sound card (using a VBScript
helper written by Roger Upole and Mark Hammond) and adjust the expected
PlaySoundTest case results accordingly.
Tim Peters [Thu, 16 Mar 2006 01:14:46 +0000 (01:14 +0000)]
Merge the tim-obmalloc branch to the trunk.
This is a heavily altered derivative of SF patch 1123430, Evan
Jones's heroic effort to make obmalloc return unused arenas to
the system free(), with some heuristic strategies to make it
more likley that arenas eventually _can_ be freed.
Walter Dörwald [Wed, 15 Mar 2006 11:35:15 +0000 (11:35 +0000)]
Patch #1436130: codecs.lookup() now returns a CodecInfo object (a subclass
of tuple) that provides incremental decoders and encoders (a way to use
stateful codecs without the stream API). Functions
codecs.getincrementaldecoder() and codecs.getincrementalencoder() have
been added.
Walter Dörwald [Wed, 15 Mar 2006 08:23:53 +0000 (08:23 +0000)]
SF patch #1359365: file and cStringIO raise a ValueError when next() is called
after calling close(). Change StringIO, so that it behaves the same way.
Guido van Rossum [Wed, 15 Mar 2006 04:33:54 +0000 (04:33 +0000)]
Use relative imports in a few places where I noticed the need.
(Ideally, all packages in Python 2.5 will use the relative import
syntax for all their relative import needs.)
Tim Peters [Tue, 14 Mar 2006 22:48:56 +0000 (22:48 +0000)]
Renamed test_hashlib_speed.py to time_hashlib.py.
Since it's never intended that this script be run by
regrtest.py, it shouldn't have been named with a "test_"
prefix to begin with. A consequence is that we shouldn't
see useless:
test_hashlib_speed skipped -- not a unit test (stand alone benchmark)
Thomas Heller [Tue, 14 Mar 2006 19:53:09 +0000 (19:53 +0000)]
Integrate patch from Neal Norwitz. He writes:
"""
The attached patch fixes all the ctypes tests so they pass on amd64.
It also fixes several warnings. I'm not sure what else to do with the
patch. Let me know how you want to handle these in the future.
I'm not sure the patch is 100% correct. You will need to decide what
can be 64 bits and what can't. I believe
sq_{item,slice,ass_item,ass_slice} all need to use Py_ssize_t. The
types in ctypes.h may not require all the changes I made. I don't
know how you want to support older version, so I unconditionally
changed the types to Py_ssize_t.
"""
The patch is also in the ctypes SVN repository now, after small
changes to add compatibility with older Python versions.
Neal Norwitz [Tue, 14 Mar 2006 06:02:16 +0000 (06:02 +0000)]
Fix and test (manually w/xx module) passing NULLs to PyObject_Str() and
PyObject_Unicode(). This problem was originally reported from Coverity
and addresses mail on python-dev "checkin r43015".
This inlines the conversion of the string to unicode and cleans
up/simplifies some code at the end of the PyObject_Unicode().
We really need a complete C API test module for all public APIs
and passing good and bad parameter values.