summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Remove many blanket try/except clauses.Jeremy Hylton2003-06-161-11/+40
| | | | | | | | | | | | 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:"
* Correct function name.Kurt B. Kaiser2003-06-161-3/+3
|
* Properly deal with tuples in Open._fixresult. Fixes bug reported inMartin v. Löwis2003-06-141-2/+4
| | | | follow-up to #621891.
* Patch #752671: NetBSD needs to link libintl to _locale.so.Martin v. Löwis2003-06-141-1/+2
|
* Add interrupt_main() to thread module.Kurt B. Kaiser2003-06-131-0/+17
|
* Clarify docstring for symlink.Brett Cannon2003-06-111-1/+1
|
* Changes to sre.c after the application of patch #726869 have increasedAndrew MacIntyre2003-06-091-5/+11
| | | | | | | | | | | | | | | | | | 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.
* Fix potential leaks identified by Neal Norwitz.Andrew McNamara2003-06-091-0/+8
|
* Whitespace normalization; break a long line.Guido van Rossum2003-06-021-39/+40
|
* Fix a subtle decref bug that caused a GC assertion to fail in a debugGuido van Rossum2003-06-021-0/+3
| | | | | | | 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.
* Comment fix.Greg Ward2003-05-291-1/+1
|
* Change _ssize() so it doesn't rely on sizeof(char) or sizeof(short):Greg Ward2003-05-291-2/+2
| | | | 8 bits is 1 byte, and that isn't about to change any time soon. (I hope!)
* Completely change the interface to setparameters():Greg Ward2003-05-291-79/+48
| | | | | | | | | | | | | | | | | | | * 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).
* Fix SF #745055, Memory leak in _tkinter.c/Tkapp_SplitList()Neal Norwitz2003-05-291-3/+10
| | | | | | | 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.
* Oops, move the GIL release/reacquire from oss_sync() to _do_ioctl_0():Greg Ward2003-05-271-7/+11
| | | | | that way it applies to *only* the ioctl() call, and also happens for the other blocking ioctls (POST, RESET).
* Release the GIL in two more methods:Greg Ward2003-05-261-1/+8
| | | | | | | * 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()
* Fixed minor typo in Setup.dist.Gustavo Niemeyer2003-05-261-1/+1
|
* Get test_ioctl to pass on HPUX 11.Neal Norwitz2003-05-231-0/+4
| | | | | TIOCGPGRP and many other definitions come from bsdtty.h, so it needs to be included at least on HPUX.
* All calls to getarrayitem() (which is static) are done either in loopsWalter Dörwald2003-05-231-4/+1
| | | | | 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().
* PyType_GenericAlloc is inherited from object.Raymond Hettinger2003-05-232-13/+13
|
* Release the GIL around read(), write(), and select() calls.Greg Ward2003-05-231-2/+16
| | | | Bug spotted by Joerg Lehmann <joerg@luga.de>.
* Fixed dotted name assertion.Raymond Hettinger2003-05-221-2/+2
|
* PyType_Ready(): Complain if the type is a base type, and gc'able, andTim Peters2003-05-211-2/+7
| | | | | | | | | | | | | | | | | | 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.
* Only return objects if wantobjects is set in GetVar.Martin v. Löwis2003-05-191-1/+6
|
* Fix array.array.insert(), so that it treats negative indices asWalter Dörwald2003-05-181-2/+5
| | | | | being relative to the end of the array, just like list.insert() does. This closes SF bug #739313.
* Added more words about the abuse of the tp_alloc nitems argumentTim Peters2003-05-181-1/+12
| | | | perpetrated by the time and datetime classes.
* datetime.timedelta is now subclassable in Python. The new test showsTim Peters2003-05-171-165/+170
| | | | | | | | 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.
* datetime.datetime and datetime.time can now be subclassed in Python. Brr.Tim Peters2003-05-171-30/+46
|
* Turns out there wasn't a need to define tp_free for any of the types here.Tim Peters2003-05-161-4/+4
|
* Stopped using the old macro form of _PyObject_Del.Tim Peters2003-05-161-4/+4
|
* DB.remove() needs to set the internal DB handle to NULL after being called.Gregory P. Smith2003-05-151-4/+1
| | | | | | | (sourceforge pybsddb bug #737970). Also: don't allow other threads to run during calls that invalidate the DB handle.
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-103-9/+51
| | | | riscospath.extsep, and use os.extsep throughout.
* Simple fix forMichael W. Hudson2003-05-091-0/+5
| | | | [ 733781 ] fcntl fails to build on old RH Linux
* Patch #734118: Add {get|set}busywaitinterval.Martin v. Löwis2003-05-091-2/+44
|
* Yet another addition to [731644]: only use the lock if thread-supportJust van Rossum2003-05-091-2/+2
| | | | is enabled.
* Addition to [731644]: also use the lock when using the getaddrinfoJust van Rossum2003-05-091-2/+2
| | | | emulation (ie. when HAVE_GETADDRINFO isn't defined).
* [ 731644] & [ 604210 ] Release the GIL around getaddrinfo(), yet protectJust van Rossum2003-05-091-10/+45
| | | | | access with lock on those platforms that getaddrinfo() isn't (known to be) thread-safe. Thanks to MvL for mentoring this patch.
* add open function to bsddb185 module so the file format sniffing can beSkip Montanaro2003-05-061-0/+2
| | | | restricted to the whichdb module
* Patch #724588: Check whether the address of hstrerror and inet_pton canMartin v. Löwis2003-05-031-0/+10
| | | | be taken, and define NI_MAX{HOST|SERV} if necessary.
* Implement tcl object __cmp__.Martin v. Löwis2003-05-031-1/+12
|
* Patch #708495: Port more stuff to OpenVMS.Martin v. Löwis2003-05-038-84/+35
|
* * Added a substantial number of edge case and argument tests forRaymond Hettinger2003-05-031-0/+3
| | | | | | | the itertoolsmodule. * Taught itertools.repeat(obj, n) to treat negative repeat counts as zero. This behavior matches that for sequences and prevents infinite loops.
* The previous made the stop argument optional.Raymond Hettinger2003-05-021-2/+2
| | | | It is better to be explicit and just allow stop to be None.
* SF bug #730685: itertools.islice stop argument is not optionalRaymond Hettinger2003-05-021-13/+33
| | | | | * itertools.islice() stop argument did not perform as documented. * beefed-up test suite
* SF patch 731504: Typo in datetimemodule.c comment.Tim Peters2003-05-021-1/+1
| | | | s/isofomat/isoformat/, by Steven Taschuk.
* Patch 731209: Restore socketmodule's behaviour with dotted quad addressesAnthony Baxter2003-05-021-0/+16
| | | | | to that of Python2.1. Such nnn.nnn.nnn.nnn addresses are just used directly, not passed to the resolver for a pointless lookup.
* Convert tcl objects to strings in getvar/setvar. Fixes #730506.Martin v. Löwis2003-05-011-2/+26
|
* Patch #725942: Always rename emulation functions.Martin v. Löwis2003-05-011-2/+5
|
* Allow _sre.c to compile with Python 2.2Andrew M. Kuchling2003-04-301-0/+4
|
* When an unhandled exception happens, report the repr() of the functionGuido van Rossum2003-04-291-5/+13
| | | | | | | 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()).