summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* SF patch #770521: make itertools type declarations staticRaymond Hettinger2003-07-141-24/+24
| | | | (Contributed by Andrew I MacIntyre.)
* The Unpickler forget about its find_class attribute.Jeremy Hylton2003-07-111-0/+3
|
* Fix [ 766669 ] Consistent GPF on exitMark Hammond2003-07-091-1/+1
| | | | | Use Py_AtExit instead of atexit so we are called during Py_Finalize() rather than during DLL teardown.
* bsddb 4.1.6:Gregory P. Smith2003-07-091-41/+110
| | | | | | | | | | | * Extended DB & DBEnv set_get_returns_none functionality to take a "level" instead of a boolean flag. The boolean 0 and 1 values still have the same effect. A value of 2 extends the "return None instead of raising an exception" behaviour to the DBCursor set methods. This will become the default behaviour in pybsddb 4.2. * Fixed a typo in DBCursor.join_item method that made it crash instead of returning a value. Obviously nobody uses it. Wrote a test case for join and join_item.
* typoSkip Montanaro2003-07-081-1/+1
|
* Fix a typo/cut-n-paste error in DBCursor.join_item so that it doesn'tGregory P. Smith2003-07-071-1/+1
| | | | | return a tuple. (this also implies that nobody uses this method; the bug has been here for a long time)
* Use appropriate macros not the deprecated DL_IMPORT/DL_EXPORT macrosNeal Norwitz2003-07-012-3/+3
|
* Make temporary change of using _strptime for time.strptime permanent.Brett Cannon2003-07-011-41/+1
| | | | Flesh out docs to better explain time.strptime (closes bug #697990).
* Fix SF #754870, SSL crash interpreter when remote side closes during connectNeal Norwitz2003-06-301-1/+2
| | | | Also fix a memory leak.
* Fix typo, refer to proper argument nameNeal Norwitz2003-06-301-1/+1
|
* Py_Main(): Add a check for the PYTHONINSPECT environment variableBarry Warsaw2003-06-291-0/+9
| | | | | | | | | | after running the script so that a program could do something like: os.environ['PYTHONINSPECT'] = 1 to programmatically enter a prompt at the end. (After a patch by Skip Montanaro w/ proposal by Troy Melhase
* SF patch #760257: add socket.timeout exceptionRaymond Hettinger2003-06-291-38/+113
| | | | | | | | | (Contributed by Bob Halley) Added a new exception, socket.timeout so that timeouts can be differentiated from other socket exceptions. Docs, more tests, and newsitem to follow.
* Patch #751916: Check for signals, fix some refcounting errors.Martin v. Löwis2003-06-281-2/+13
|
* Fix several bugs in handling of exceptions with trace function enabled.Jeremy Hylton2003-06-271-15/+48
| | | | | | | | | | | | | | | | | | | If the callback raised an exception but did not set curexc_traceback, the trace function was called with PyTrace_RETURN. That is, the trace function was called with an exception set. The main loop detected the exception when the trace function returned; it complained and disabled tracing. Fix the logic error so that PyTrace_RETURN only occurs if the callback returned normally. The trace function must be called for exceptions, too. So we had to add new functionality to call with PyTrace_EXCEPTION. (Leads to a rather ugly ifdef / else block that contains only a '}'.) Reverse the logic and name of NOFIX_TRACE to FIX_TRACE. Joint work with Fred.
* SF bug #761337: datetime.strftime fails on trivial format stringRaymond Hettinger2003-06-271-1/+1
| | | | | | | | | | | | | | The interning of short strings violates the refcnt==1 assumption for _PyString_Resize(). A simple fix is to boost the initial value of "totalnew" by 1. Combined with an NULL argument to PyString_FromStringAndSize(), this assures that resulting format string is not interned. This will remain true even if the implementation of PyString_FromStringAndSize() changes because only the uninitialized strings that can be interned are those of zero length. Added a test case.
* Fixing bug described in patch #756032, where SRE reads invalid dataGustavo Niemeyer2003-06-261-1/+1
| | | | due to a corrupted end pointer.
* Minor updates:Raymond Hettinger2003-06-181-3/+13
| | | | | | * Updated comment on design of imap() * Added untraversed object in izip() structure * Replaced the pairwise() example with a more general window() example
* Add missing DECREF.Raymond Hettinger2003-06-171-1/+3
|
* 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.