summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* update_refs(): assert that incoming refcounts aren't 0. The commentTim Peters2003-11-141-0/+19
| | | | | | | | for this function has always claimed that was true, but it wasn't verified before. For the latest batch of "double deallocation" bugs (stemming from weakref callbacks invoked by way of subtype_dealloc), this assert would have triggered (instead of waiting for _Py_ForgetReference to die with a segfault later).
* Patch #804543: strdup saved locales. Backported to 2.3.Martin v. Löwis2003-11-131-1/+2
|
* Improve the implementation of itertools.tee().Raymond Hettinger2003-11-121-181/+199
| | | | | | | | | | | Formerly, underlying queue was implemented in terms of two lists. The new queue is a series of singly-linked fixed length lists. The new implementation runs much faster, supports multi-way tees, and allows tees of tees without additional memory costs. The root ideas for this structure were contributed by Andrew Koenig and Guido van Rossum.
* Patch #839038: Add getsid(2).Martin v. Löwis2003-11-101-0/+22
|
* Convert heapq.py to a C implementation.Raymond Hettinger2003-11-081-0/+357
|
* Overallocate target buffer for normalization more early. Fixes #834676.Martin v. Löwis2003-11-061-5/+7
| | | | Backported to 2.3.
* * SF patch 835100 - C++ // comments are not allowed. Use /* */Gregory P. Smith2003-11-031-8/+8
|
* * Use weakref's of DBCursor objects for the iterator cursors to avoid aGregory P. Smith2003-11-031-2/+38
| | | | | | | | | | memory leak that would've occurred for all iterators that were destroyed before having iterated until they raised StopIteration. * Simplify some code. * Add new test cases to check for the memleak and ensure that mixing iteration with modification of the values for existing keys works.
* * Fix the singlethreaded deadlocks occurring in the simple bsddb interface.Gregory P. Smith2003-11-021-1/+1
| | | | | * Add support for multiple iterator/generator objects at once on the simple bsddb _DBWithCursor interface.
* Fix a tuple memory leak when raising DB, DBEnv and DBCursor "objectGregory P. Smith2003-11-021-17/+15
| | | | | | | | | has been closed" exceptions. Adds a DBCursorClosedError exception in the closed cursor case for future use in fixing the legacy bsddb interface deadlock problems due to its use of cursors with DB_INIT_LOCK | DB_THREAD support enabled.
* Patch #787189: Explicitly define CTRL on SGI.Martin v. Löwis2003-10-311-0/+6
|
* Patch #788404: ignore "b" and "t" mode modifiers in posix_popen.Martin v. Löwis2003-10-311-0/+5
| | | | Fixes #703198. Backported to 2.3.
* Fix nits in error messages.Raymond Hettinger2003-10-281-4/+4
|
* Patch #803998: Correctly check for error in SSL_write.Martin v. Löwis2003-10-271-2/+3
|
* Minor improvements to itertools.tee():Raymond Hettinger2003-10-261-9/+9
| | | | | | * tee object is no longer subclassable * independent iterators renamed to "itertools.tee_iterator" * fixed doc string typo and added entry in the module doc string
* Improvements to coding for itertools.tee():Raymond Hettinger2003-10-251-3/+26
| | | | | | | | | | | | * Add error checking code to PyList_Append() call. * Replace PyObject_CallMethod(to->outbasket, "pop", NULL) with equivalent in-line code. Inlining is important here because the search for the pop method will occur for every element returned by the iterator. * Make tee's dealloc() a little smarter. If the trailing iterator is being deallocated, then the queue data is no longer needed and can be freed.
* Added itertools.tee()Raymond Hettinger2003-10-241-0/+259
| | | | | | It works like the pure python verion except: * it stops storing data after of the iterators gets deallocated * the data queue is implemented with two stacks instead of one dictionary.
* - The pwd module incorrectly advertised its struct type asGuido van Rossum2003-10-231-0/+2
| | | | | struct_pwent; this has been renamed to struct_passwd. (The old name is still supported for backwards compatibility.)
* Update to Expat 1.95.7; there are no changes to the Expat sources.Fred Drake2003-10-2113-1045/+604
|
* Fix a bunch of typos in documentation, docstrings and comments.Walter Dörwald2003-10-207-8/+8
| | | | (From SF patch #810751)
* Removing dead code.Gustavo Niemeyer2003-10-181-11/+0
|
* Implemented non-recursive SRE matching.Gustavo Niemeyer2003-10-173-462/+767
|
* Simplify and speedup uses of Py_BuildValue():Raymond Hettinger2003-10-1215-32/+29
| | | | | | * Py_BuildValue("(OOO)",a,b,c) --> PyTuple_Pack(3,a,b,c) * Py_BuildValue("()",a) --> PyTuple_New(0) * Py_BuildValue("O", a) --> Py_INCREF(a)
* SF bug #812202: randint is always evenRaymond Hettinger2003-10-051-0/+44
| | | | | | | * Added C coded getrandbits(k) method that runs in linear time. * Call the new method from randrange() for ranges >= 2**53. * Adds a warning for generators not defining getrandbits() whenever they have a call to randrange() with too large of a population.
* made the SGI INET_ADDRSTRLEN define apply for any compiler on Irix. Both theAnthony Baxter2003-10-041-4/+7
| | | | SGI compiler and GCC seem to need this.
* Check for TclError when reading variables. Fixes #807314.Martin v. Löwis2003-10-031-5/+9
| | | | Backported to 2.3.
* Patch #813445: Add missing socket.IPPROTO_IPV6. Backported to 2.3.Martin v. Löwis2003-10-031-0/+3
|
* bsddb3 4.2.2, adds DBCursor.get_current_size() method to return the lengthGregory P. Smith2003-10-011-1/+35
| | | | of the current value without reading the value itself.
* raise pybsddb version number to 4.2.1 to differentiate between it and theGregory P. Smith2003-09-211-1/+1
| | | | version in the python 2.3.1 tree.
* Adds basic support for BerkeleyDB 4.2.x. Compiles and passes tests; newGregory P. Smith2003-09-211-5/+44
| | | | | | | | | | features in BerkeleyDB not exposed. notably: the DB_MPOOLFILE interface has not yet been wrapped in an object. Adds support for building and installing bsddb3 in python2.3 that has an older version of this module installed as bsddb without conflicts. The pybsddb.sf.net build/packaged version of the module uses a dynamicly loadable module called _pybsddb rather than _bsddb.
* Patch #800697: Add readline.clear_history.Martin v. Löwis2003-09-201-0/+21
|
* Patch #730597: Disable POPEN for RTEMS.Martin v. Löwis2003-09-201-0/+2
|
* Patch #790000: Allow os.access to handle Unicode file name.Martin v. Löwis2003-09-121-0/+16
|
* select.select() now accepts a sequence (as defined by PySequence_Fast()) forBrett Cannon2003-09-101-18/+18
| | | | | | its first three arguments. Closes RFE #798046 .
* Patch #801349: 64-bit fix for AMD64 from Gwenole Beauchesne.Just van Rossum2003-09-071-1/+1
| | | | | Classical problem with int vs. long mismatch in varargs. 2.3 backport candidate.
* Patch #798145: Return correct information from nl_langinfo(RADIXCHAR).Martin v. Löwis2003-09-041-0/+12
| | | | Will backport to 2.3.
* Bug #794140: cygwin builds do not embedJason Tishler2003-09-041-1/+1
| | | | | | The embed2.diff patch solves the user's problem by exporting the missing symbols from the Python core so Python can be embedded in another Cygwin application (well, at lest vim).
* Use de_DE in example, change message for unknown locale. Fixes #797447.Martin v. Löwis2003-09-031-2/+2
| | | | Will backport to 2.3.
* SF patch #798534: Windows os.popen needlessly gets a reference to tuple ()Raymond Hettinger2003-09-011-3/+1
| | | | | | (Contributed by Andrew Gaul.) Fixes a minor leak.
* For safety, replace a tuple entry before decreffing it.Raymond Hettinger2003-08-301-1/+3
|
* SF bug #793826: using itertools.izip to mutate tuplesRaymond Hettinger2003-08-291-2/+4
| | | | Avoid Armin Rigo's dastardly exercise in re-entrancy.
* Support DBEnv.set_shm_key() to allow multi-threaded multi-processGregory P. Smith2003-08-281-0/+16
| | | | database environments to use shared memory on systems supporting it.
* SF #784031: Byte-order bug in socket-module getaddrinfo.cRaymond Hettinger2003-08-171-0/+1
|
* Fix silly leak in test used in test_exceptions.Michael W. Hudson2003-08-151-0/+1
|
* [Patch #739124] Add use_default_colors() to curses moduleAndrew M. Kuchling2003-08-131-1/+24
|
* reverting to 2.41 version (distinct tp_names) - will add verbiage to theSkip Montanaro2003-08-111-2/+2
| | | | docs
* shit - just change the visible name, not the comments - strictly speaking,Skip Montanaro2003-08-111-3/+3
| | | | | the tp_name is not correct, but what's exposed to users is known visibly as "StringIO", not "StringI" or "StringO".
* typosSkip Montanaro2003-08-111-3/+3
|
* SF bug #770485: cStringIO does not set closed attrRaymond Hettinger2003-08-081-2/+22
|
* Modified itertools.izip() to match the behavior of __builtin__.zip()Raymond Hettinger2003-08-081-6/+2
| | | | which can now take zero arguments.