| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
SF bug [ 751276 ] cPickle doesn't raise error, pickle does (recursiondepth)
Most of the calls to PyErr_Clear() were intended to catch & clear an
attribute error and try something different. Guard all those cases
with a PyErr_ExceptionMatches() and fail if some other error
occurred. The other error is likely a bug in the user code.
This is basically the C equivalent of changing "except:" to
"except AttributeError:"
|
| |
|
|
|
|
| |
follow-up to #621891.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stack usage on FreeBSD, requiring the recursion limit to be lowered
further. Building with gcc 2.95 (the standard compiler on FreeBSD 4.x)
is now also affected.
The underlying issue is that FreeBSD's pthreads implementation has a
hard-coded 1MB stack size for the initial (or "primary") thread, which
can not be changed without rebuilding libc_r. Exhausting this stack
results in a bus error.
Building without pthreads (configure --without-threads), or linking
with the port of the Linux pthreads library (aka Linuxthreads) instead
of libc_r, avoids this limitation.
On OS/2, only gcc 3.2 is affected and the stack size is controllable,
so the special handling has been removed.
|
| |
|
| |
|
|
|
|
|
|
|
| |
build (assert(gc->gc.gc_refs != 0) in visit_decref()).
Because OSSAudioError is a global, we must compensate (twice!) for
PyModule_AddObject()'s "helpful" decref of the object it adds.
|
| |
|
|
|
|
| |
8 bits is 1 byte, and that isn't about to change any time soon. (I hope!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* it no longer takes ssize, which served no purpose apart from
scolding you if you got it wrong
* changed the order of the three remaining required arguments
to (format, channels, rate) to match the order in which they
must be set
* replaced the optional argument 'emulate' with 'strict': if strict
true, and the audio device does not accept the requested sampling
parameters, raise OSSAudioError
* return a tuple (format, channels, rate) reflecting the sampling
parameters that were actually set
Change the canonical name of ossaudiodev.error to
ossaudiodev.OSSAudioError (keep an alias for backwards compatibility).
Remove 'audio_types' list and 'n_audio_types' (no longer needed now that
setparameters() no longer has an 'ssize' argument to police).
|
|
|
|
|
|
|
| |
Also fix a memory leak in Tkapp_Split.
This needs to be backported. I'll leave it up to Barry whether this
is for 2.2.3 or 2.2.4.
|
|
|
|
|
| |
that way it applies to *only* the ioctl() call, and also happens for the
other blocking ioctls (POST, RESET).
|
|
|
|
|
|
|
| |
* sync(), because it waits for hardware buffers to flush, which
can take several seconds depending on cirumstances (according
to the OSS docs)
* close(), because it does an implicit sync()
|
| |
|
|
|
|
|
| |
TIOCGPGRP and many other definitions come from bsdtty.h, so it needs
to be included at least on HPUX.
|
|
|
|
|
| |
over the size of the array, or the callers check the index bounds themselves,
so the index check never failed => Replace it with an assert().
|
| |
|
|
|
|
| |
Bug spotted by Joerg Lehmann <joerg@luga.de>.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tp_free is NULL or PyObject_Del at the end. Because it's a base type
it must call tp_free in its dealloc function, and because it's gc'able
it must not call PyObject_Del.
inherit_slots(): Don't inherit tp_free unless the type and its base
agree about whether they're gc'able. If the type is gc'able and the
base is not, and the base uses the default PyObject_Del for its
tp_free, give the type PyObject_GC_Del for its tp_free (the appropriate
default for a gc'able type).
cPickle.c: The Pickler and Unpickler types claim to be base classes
and gc'able, but their dealloc functions didn't call tp_free.
Repaired that. Also call PyType_Ready() on these typeobjects, so
that the correct (PyObject_GC_Del) default memory-freeing function
gets plugged into these types' tp_free slots.
|
| |
|
|
|
|
|
| |
being relative to the end of the array, just like list.insert() does.
This closes SF bug #739313.
|
|
|
|
| |
perpetrated by the time and datetime classes.
|
|
|
|
|
|
|
|
| |
one good use: a subclass adding a method to express the duration as
a number of hours (or minutes, or whatever else you want to add). The
native breakdown into days+seconds+us is often clumsy. Incidentally
moved a large chunk of object-initialization code closer to the top of
the file, to avoid worse forward-reference trickery.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
(sourceforge pybsddb bug #737970).
Also: don't allow other threads to run during calls that invalidate the
DB handle.
|
|
|
|
| |
riscospath.extsep, and use os.extsep throughout.
|
|
|
|
| |
[ 733781 ] fcntl fails to build on old RH Linux
|
| |
|
|
|
|
| |
is enabled.
|
|
|
|
| |
emulation (ie. when HAVE_GETADDRINFO isn't defined).
|
|
|
|
|
| |
access with lock on those platforms that getaddrinfo() isn't (known to be)
thread-safe. Thanks to MvL for mentoring this patch.
|
|
|
|
| |
restricted to the whichdb module
|
|
|
|
| |
be taken, and define NI_MAX{HOST|SERV} if necessary.
|
| |
|
| |
|
|
|
|
|
|
|
| |
the itertoolsmodule.
* Taught itertools.repeat(obj, n) to treat negative repeat counts as
zero. This behavior matches that for sequences and prevents
infinite loops.
|
|
|
|
| |
It is better to be explicit and just allow stop to be None.
|
|
|
|
|
| |
* itertools.islice() stop argument did not perform as documented.
* beefed-up test suite
|
|
|
|
| |
s/isofomat/isoformat/, by Steven Taschuk.
|
|
|
|
|
| |
to that of Python2.1. Such nnn.nnn.nnn.nnn addresses are just used directly,
not passed to the resolver for a pointless lookup.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
that was used to start the thread. This is useful to track down the
source of the problem when there is no traceback, as can happen when a
daemon thread gets to run after Python is finialized (a new kind of
event, somehow this is now possible due to changes in Py_Finalize()).
|