| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
timetz.
|
|
|
|
| |
scope and looking at types.
|
| |
|
|
|
|
|
|
| |
be trusted with years before 1900, so now we raise ValueError if a date or
datetime or datetimetz .strftime() method is called with a year before
1900.
|
|
|
|
|
|
|
|
|
|
| |
such that the datetime tests failed if the envar PYTHON2K was set.
This is an utter mess, and the datetime module's strftime functions
inherit it. I suspect that, regardless of the PYTHON2K setting, and
regardless of platform limitations, the datetime strftime wrappers
will end up delivering nonsense results (or bogus exceptions) for
any year before 1900. I should probably just refuse to accept years
earlier than that -- else we'll have to implement strftime() by hand.
|
|
|
|
|
| |
Also changed logic so that instances of user-defined subclasses of date,
time, and datetime are called OFFSET_NAIVE instead of OFFSET_UNKNOWN.
|
|
|
|
|
|
|
|
|
|
|
|
| |
{timetz,datetimetz}.{utcoffset,dst}() now return a timedelta (or None)
instead of an int (or None).
tzinfo.{utcoffset,dst)() can now return a timedelta (or an int, or None).
Curiously, this was much easier to do in the C implementation than in the
Python implementation (which lives in the Zope3 code tree) -- the C code
already had lots of hair to extract C ints from offset objects, and used
C ints internally.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
used that.
wrap_strftime(): Removed the most irritating uses of buf.
TestDate.test_ordinal_conversions(): The C implementation is fast enough
that we can afford to check the endpoints of every year. Also added
tm_yday tests at the endpoints.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
routine to py_time_second.
|
| |
|
|
|
|
|
| |
to others to argue about how to build it on other platforms (on Windows
it's in its own DLL).
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
Probably a 2.2 backport candidate.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Python 2.3 will support source code encodings which rely on the
builtin codecs being available to the parser.
Remove struct dependency from codecs.py
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* add oss_mixer_t and OSSMixerType
* add newossmixerobject(), oss_mixer_dealloc(), ossopenmixer()
* add _do_ioctl_1_internal() to support mixer ioctls
* add mixer methods: oss_mixer_{close,fileno,channels,stereo_channels,
rec_channels,getvol,setvol,getrecsrc,setrecsrc}()
* add oss_mixer_methods list
* add oss_mixer_getattr() (why?!)
* export SOUND_MIXER_* constants from soundcard.h
|
|
|
|
|
| |
_do_ioctl_1() so they take a file descriptor rather than an oss_t
pointer.
|
|
|
|
|
|
|
| |
* 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>.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
running the sandbox datetime tests.
Bugfix candidate.
|
| |
|
| |
|
|
|
|
| |
This patch enables the bz2 module to build cleanly under Cygwin.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
it impossible to access blocking mode!
* Rename write() to writeall(), and add a write() method that just
does one write().
* Rearrange/simplify writeall(): in particular, don't supply a timeout
to select(). Let it block forever if it has to.
* Add a bunch of simple ioctl() wrappers: nonblock(), setfmt(),
getfmts(), channels(), speed(), sync(), reset(), post(). These
wrap, respectively, SNDCTL_DSP_NONBLOCK, SNDCTL_DSP_SETFMT,
SNDCTL_DSP_GETFMTS, etc.
* Reduce flush() (which was a wrapper for the SNDCTL_DSP_SYNC ioctl) to
an alias for sync().
* Rearrange the lad_methods list to reflect the order in which the
methods are defined, and add some grouping comments.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
This is the first half of SF patch #644977.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|