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().
Just van Rossum [Thu, 28 Nov 2002 11:30:56 +0000 (11:30 +0000)]
- Rewrote bootstapping code in sh so we're really independent of an
installed Python. So we don't use os.execve any longer, which means
we need an actual executable in <myapp>.app/Contents/MacOS. For applets
we make a symlink to the Python executable used to build the applet,
for standalone apps we simply copy it.
- Added support for the new any_missing_maybe() feature of modulefinder.py,
which is pending as patch #643711. Its use is optional so it still works
with the existing version of modulefinder.py
Greg Ward [Wed, 27 Nov 2002 22:19:15 +0000 (22:19 +0000)]
Allow the device name to be passed to linuxaudiodev.open(), for
consistency with the built-in open() (and every other sane open()
function, for that matter). The two valid ways to call this open() are
now open(mode) and open(device, mode).
For backwards compatibility, retain the old open(mode) calling syntax --
this makes the error message when you call open(device) a bit confusing,
but oh well.
[Patch #641685] setup.py contained code for finding libraries, instead
of using the CCompiler.find_library_file() provided by the Distutils.
This patch fixes it to use the Distutils method at the cost of some
additional glue.
(The duplication resulted in the SSL module not being automatically
built on Macs; the Distutils knew that shared libraries on OS X have a
.dylib extension, but the setup.py code didn't.)
Constructor accepts optional keyword arguments after a optional items list.
Add fromkeys() as an alternate constructor from an iterable over keys.
Expand related unittests.
Fix for bug #410541: bdist builds bogus .zips
This adds a --relative option to the bdist_dumb command that defaults
to false; if true, the .tar.gz or .zip will be assembled using relative
paths.
Thomas Heller [Tue, 26 Nov 2002 08:05:09 +0000 (08:05 +0000)]
Don't look for modules in the registry any longer.
Mark writes in private email:
"Modules listed in the registry was a dumb idea. This whole scheme
can die. AFAIK, no one in the world uses it (including win32all
since the last build)."
Just van Rossum [Tue, 26 Nov 2002 00:34:52 +0000 (00:34 +0000)]
added support for building standalone applications
- requires modulefinder.py to be on sys.path
- does *not* work for Python.framework (yet), only for static builds
Guido van Rossum [Mon, 25 Nov 2002 21:38:52 +0000 (21:38 +0000)]
A tweaked version of Jeremy's patch #642489, to produce better error
messages about MRO conflicts. (Tweaks here: don't print the message,
but compare it with an expected string.)
Guido van Rossum [Mon, 25 Nov 2002 21:36:54 +0000 (21:36 +0000)]
A tweaked version of Jeremy's patch #642489, to produce better error
messages about MRO conflicts. (The tweaks include correcting spelling
errors, some refactoring to get the name of classic classes, and a
style nit or two.)
SF 643115: Set._update() had a special case for dictionaries which allowed
non-true values to leak in. This threw-off equality testing which depends
on the underlying dictionaries having both the same keys and values.
Gustavo Niemeyer [Mon, 25 Nov 2002 17:25:04 +0000 (17:25 +0000)]
Fixed bug
[#495695] webbrowser.py: selection of browser
* Lib/webbrowser.py
Only include graphic browsers in _tryorder if DISPLAY is set. Also,
included skipstone support, as suggested by Fred in the mentioned bug.
Jack Jansen [Mon, 25 Nov 2002 16:36:49 +0000 (16:36 +0000)]
Added a class PEP252Mixin. By adding this to your ObjectDefinition you
get PEP-252 style objects in stead of old-fashioned objects.
In stead of defining a GetattrHook you declare a class variable getsetlist,
which contains tuples (name, getcode, setcode, docstring).
Only lightly tested: the code still works if you don't inherit PEP252Mixin
and the code works if you inherit it but don't define any getters
or setters. Also, this will not work together with the "poor mans inheritance"
offered by method chains, so the CF module will remain with old-style
objects until PEP253 is supported too.
Jack Jansen [Mon, 25 Nov 2002 13:11:06 +0000 (13:11 +0000)]
Lots of restructuring, mostly suggested by Bill Bumgarner. Main
externally visible difference is that the factory defaults are
now in a plist file in the bundle, in stead of being hard-coded in
the application.
Just van Rossum [Sun, 24 Nov 2002 23:15:57 +0000 (23:15 +0000)]
Don't disable building Mac-specific modules for a non-framework build:
whether they crash or not is not a matter of using a framework or not,
but whether the code is run from an app bundle or not. And that it
_can_ crash (instead of tracing back) is Apple's bug anyway, not ours.
Tim Peters [Sun, 24 Nov 2002 20:23:04 +0000 (20:23 +0000)]
Repaired inaccuracies in the % docs. In particular, we don't (and can't)
guarantee abs(x%y) < abs(y) in all cases when a float is involved.
math.fmod() should, though, so noted that too.
Bugfix candidate. Someone should check the LaTeX here first, though.
Tim Peters [Sun, 24 Nov 2002 02:40:40 +0000 (02:40 +0000)]
Skip test_normalization on Windows until it's at least clear why the
data it needs doesn't exist in the project. If it's a huge file,
maybe the test should be changed to be one of the -u thingies.