summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Now that internal dialect type is immutable, and the dialect registryAndrew McNamara2005-01-111-29/+40
| | | | | | | only contains instances of the dialect type, we can refer directly to the dialect instances rather than creating new ones. In other words, if the dialect comes from the registry, and we apply no further modifications, the reader/writer can use the dialect object directly.
* No longer attempt to instantiate python classes describing dialects. ThisAndrew McNamara2005-01-111-37/+6
| | | | | | was done because we were previously performing validation of the dialect from python, but this is now down within the C module. Also, the method we were using to detect classes did not work with new-style classes.
* Allow dialect-describing keywords to be supplied to register_dialect,Andrew McNamara2005-01-111-27/+11
| | | | | record objects of internal dialect type, rather than instances of python objects.
* Factor out the code for making a dialect instance.Andrew McNamara2005-01-111-18/+22
|
* Only set error string when dict lookup found no matching key (was settingAndrew McNamara2005-01-101-3/+6
| | | | it for all failures, potentially masking other exceptions).
* When parsing args that return a single character, treat null string theAndrew McNamara2005-01-101-1/+1
| | | | same as None.
* Where a string is desired, test for PyBaseString_Type derived type,Andrew McNamara2005-01-101-15/+6
| | | | rather than using PyString_Check/PyUnicode_Check.
* Add missing PyObject_GC_Track and PyObject_GC_UnTrack calls to csv reader andAndrew McNamara2005-01-101-0/+4
| | | | writer objects (other GC infrastructure already in place).
* Fix parsing of csv files with escapes (escape character previously would beAndrew McNamara2005-01-101-8/+0
| | | | left in stream).
* Fix to use PEP7 brace style.Andrew McNamara2005-01-071-2/+4
|
* Improved the implementation of the internal "dialect" type. The newAndrew McNamara2005-01-071-187/+239
| | | | | implementation features better error reporting, and better compliance with the PEP.
* Delete Reader_getiter and replace with PyObject_SelfIter.Andrew McNamara2005-01-061-8/+1
|
* [Bug #1083110] calling .flush() on decompress objects causes a segfault due ↵Andrew M. Kuchling2004-12-281-1/+5
| | | | to an uninitialized pointer: fixes the problem and adds a test case
* Bug #1087216: datetime module documentation missing critical detailRaymond Hettinger2004-12-191-3/+9
|
* fix unterminated commentAndrew MacIntyre2004-12-181-1/+1
|
* SF bug #1086555: refcount problem in syslogRaymond Hettinger2004-12-161-3/+4
|
* SF #1085304: Make array.array pickle-ableRaymond Hettinger2004-12-161-0/+25
|
* fixed compilation against BerkeleyDB 3.2.9 (sf bug # 1077040)Gregory P. Smith2004-12-161-0/+8
|
* * Adds support for building against BerkeleyDB 4.3.21Gregory P. Smith2004-12-131-21/+74
| | | | * bumped the module version number up to 4.3.0
* OS/2 specific fixes related to SF bug # 1003471.Andrew MacIntyre2004-12-121-68/+67
| | | | | Also revise a related function to minimise file handle/pipe leakage and improve reliability.
* Eliminate the deprecated option to return None instead of a tuple of ↵Raymond Hettinger2004-12-071-11/+6
| | | | arguments in __reduce__().
* Added optional None arguments to itertools.islice().Raymond Hettinger2004-12-051-14/+16
|
* Fixing bug #1072259 in SRE.Gustavo Niemeyer2004-12-021-7/+10
|
* Hear the #error: change the default value of the mutable_arg argumentMichael W. Hudson2004-11-301-11/+1
| | | | to ioctl() and remove the warning when it is not supplied.
* Rename a static variable "history_length" to "_history_length".Hye-Shik Chang2004-11-251-6/+6
| | | | | GNU readline exports a global variable that has such a name already and the collision makes gcc4 doesn't compile the source.
* Correct the handling of 0-termination of PyUnicode_AsWideChar()Marc-André Lemburg2004-11-221-1/+3
| | | | | | | | and its usage in PyLocale_strcoll(). Clarify the documentation on this. Thanks to Andreas Degert for pointing this out.
* Patch #1050475: Fix various x86_64 build issuesMartin v. Löwis2004-11-131-2/+2
| | | | | | regrtest.py: skip rgbimg and imageop as they are not built on 64-bit systems. _tkinter.c: replace %.8x with %p for printing pointers. setup.py: add lib64 into the library directories.
* SF patch 1062495: Modules/zipimport.c does not compile on solarisRaymond Hettinger2004-11-101-5/+5
| | | | | | (Contributed by Niki W. Waibel.) Simple renaming to avoid a conflict that prevented compilation on Solaris.
* SF patch #1062279: deque pickling problemsRaymond Hettinger2004-11-091-10/+12
| | | | | | | (Contributed by Dima Dorfman.) * Support pickling of dictionaries in instances of deque subclasses. * Support pickling of recursive deques.
* Fix apparently trivial buffer overflow (SF bug 1060396).Jeremy Hylton2004-11-071-1/+1
| | | | memset() wrote one past the end of the buffer, which was likely to be unused padding or a yet-to-be-initialized local variable. This routine is already tested by test_socket.
* Bump-up block size.Raymond Hettinger2004-11-021-1/+1
|
* Add error checks for the bz2, cStringIO and operator modules.Walter Dörwald2004-11-011-4/+4
| | | | Add function names to various PyArg_ParseTuple calls in bz2module.c.
* gc_list_move(): Make this truly equivalent to remove+append. WhileTim Peters2004-11-011-3/+5
| | | | | | nothing in gc currently cares, the original coding could screw up if, e.g., you tried to move a node to the list it's already in, and the node was already the last in its list.
* gc list function cleanup.Tim Peters2004-11-011-15/+31
| | | | | | | | | | | Introduced gc_list_move(), which captures the common gc_list_remove() + gc_list_append() sequence. In fact, no uses of gc_list_append() remained (they were all in a gc_list_move() sequence), so commented that one out. gc_list_merge(): assert that `from` != `to`; that was an implicit precondition, now verified in a debug build. Others: added comments about their purpose.
* handle_weakrefs(): Simplification -- there's no need to make a secondTim Peters2004-10-311-58/+28
| | | | pass over the unreachable weakrefs-with-callbacks to unreachable objects.
* SF 1055820: weakref callback vs gc vs threadsTim Peters2004-10-302-107/+296
| | | | | | | | In cyclic gc, clear weakrefs to unreachable objects before allowing any Python code (weakref callbacks or __del__ methods) to run. This is a critical bugfix, affecting all versions of Python since weakrefs were introduced. I'll backport to 2.3.
* some platforms still need offsetof() from structmember.hFred Drake2004-10-171-0/+1
|
* Fix and test weak referencing of itertools.tee objects.Raymond Hettinger2004-10-171-1/+6
|
* Just remove the #include of signal.h. That it was C++-commented outMichael W. Hudson2004-10-141-1/+0
| | | | was a mistake of mine in updating patch #975056 (I think).
* Use C89 style comment for old compilersNeal Norwitz2004-10-141-1/+1
|
* Synchronize with PyXML 1.79:Martin v. Löwis2004-10-131-1/+10
| | | | | | 73: Restore support for Python 2.1. 74: Factor the previous change differently 79: Conditionalize usage of PyTuple_Pack.
* Patch 977343, Solaris likes sys/loadavg.h. Added support for sys/loadavg.hAnthony Baxter2004-10-131-0/+4
| | | | detection to configure &c.
* Patch #975056 - fixes for restartable signals on *BSD. In addition,Anthony Baxter2004-10-133-11/+5
| | | | a few remaining calls to signal() were converted to PyOS_setsig().
* Simplify delitem() code by calling rotate() directly instead of usingRaymond Hettinger2004-10-091-35/+23
| | | | arguments passed through tuples.
* This is Michiel de Hoon's patch, as attached to the bug report:Michael W. Hudson2004-10-071-7/+13
| | | | | | [ 1030629 ] PyOS_InputHook broken with a couple of utterly inconsequential changes by me.
* SF patch #1035498: -m option to run a module as a scriptRaymond Hettinger2004-10-071-7/+73
| | | | (Contributed by Nick Coghlan.)
* Armin's patch to prevent overflows.Raymond Hettinger2004-10-061-7/+22
|
* Upon insertion, if memory runs out, the deque was left in a corrupted state.Armin Rigo2004-10-021-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | deque_item(): a performance bug: the linked list of blocks was followed from the left in most cases, because the test (i < (deque->len >> 1)) was after "i %= BLOCKLEN". deque_clear(): replaced a call to deque_len() with deque->len; not sure what this call was here for, nor if all compilers under the sun would inline it. deque_traverse(): I belive that it could be called by the GC when the deque has leftblock==rightblock==NULL, because it is tracked before the first block is allocated (though closely before). Still, a C extension module subclassing deque could provide its own tp_alloc that could trigger a GC collection after the PyObject_GC_Track()... deque_richcompare(): rewrote to cleanly check for end-of-iterations instead of relying on deque.__iter__().next() to succeed exactly len(deque) times -- an assumption which can break if deques are subclassed. Added a test. I wonder if the length should be explicitely bounded to INT_MAX, with OverflowErrors, as in listobject.c. On 64-bit machines, adding more than INT_MAX in the deque will result in trouble. (Note to anyone/me fixing this: carefully check for overflows if len is close to INT_MAX in the following functions: deque_rotate(), deque_item(), deque_ass_item())
* Replace structure member before decreffing.Raymond Hettinger2004-10-021-1/+3
|
* * Bulletproof the method for detecting mutations during iteration.Raymond Hettinger2004-10-021-18/+32
| | | | | | | | | The previous approach was too easily fooled (a rotate() sufficed). * Use it->counter to determine when iteration is complete. The previous approach was too complex. * Strengthen an assertion and add a comment here or there.