* 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
Steve Purcell [Sun, 26 Oct 2003 10:41:03 +0000 (10:41 +0000)]
Incorporated patch 819077, from George Yoshida:
* Fixed typo in docstring for 'failUnlessAlmostEqual()'
* Removed unnecessary use of 'float()' for time values.
* Removed apparently unnecessary import of unittest. At some point in
the distant past I believe it was necessary otherwise the 'TestCase'
that a module saw was not the same as the 'TestCase' seen within
'unittest', and the user's TestCase subclasses were not recognised as
subclasses of the TestCase seen within unittest. Seems not to be
necessary now.
* 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.
[Bug #822668] tarfile raises an exception if the tarfile is gzipped and is too large; the gzip filesize should be written out mod 2**32. (Reported by Johan Fredrik Ohman)
Walter Dörwald [Fri, 24 Oct 2003 14:25:28 +0000 (14:25 +0000)]
Fix a bug in the memory reallocation code of PyUnicode_TranslateCharmap().
charmaptranslate_makespace() allocated more memory than required for the
next replacement but didn't remember that fact, so memory size was growing
exponentially every time a replacement string is longer that one character.
This fixes SF bug #828737.
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.
Guido van Rossum [Thu, 23 Oct 2003 23:54:57 +0000 (23:54 +0000)]
- The pwd module incorrectly advertised its struct type as
struct_pwent; this has been renamed to struct_passwd. (The old name
is still supported for backwards compatibility.)
Fred Drake [Thu, 23 Oct 2003 14:33:46 +0000 (14:33 +0000)]
- add "Why is Python installed on my computer?" as a documentation FAQ
since this gets asked at the docs at python.org address a lot
- fix some minor style violations and inconsistencies
[Bug #758241] When you use asyncore with a non-default map, methods
of the dispatcher object break. e.g. if you close() the object, it
tries to remove itself from the default map, not from the map the
dispatcher was created with.
The patch, from Stephane Ninin, records the map as an attribute of
the dispatcher instance.
Jeremy Hylton [Tue, 21 Oct 2003 18:07:07 +0000 (18:07 +0000)]
Apply patch 823328 -- support for rfc 2617 digestion authentication.
The patch was tweaked slightly. It's get a different mechanism for
generating the cnonce which uses /dev/urandom when possible to
generate less-easily-guessed random input.
Also rearrange the imports so that they are alphabetical and
duplicates are eliminated.
Add a few XXX comments about things left undone and things that could
be improved.
Fred Drake [Tue, 21 Oct 2003 17:58:55 +0000 (17:58 +0000)]
- make this section format
- start cleaning up the markup for consistency
- comment out the reference to a MS KnowledgeBase article that doesn't
seem to be present at msdn.microsoft.com; hopefully someone can
point out an alternate source for the relevant information
Fred Drake [Tue, 21 Oct 2003 15:41:15 +0000 (15:41 +0000)]
Provide a bit more information to the compiler when building Expat.
This avoids having to modify the Expat sources in any way starting
with Expat 1.95.7.
Brett Cannon [Sun, 19 Oct 2003 21:31:43 +0000 (21:31 +0000)]
Modified the Py_RETURN_* macros by having the statements surrounded by {} in
order to prevent any unexpected surprises from someone using them in a
conditional without using curly braces (e.g., ``if (foo) Py_RETURN_TRUE``.
Brett Cannon [Sun, 19 Oct 2003 21:19:40 +0000 (21:19 +0000)]
Defined macros Py_RETURN_(TRUE|FALSE|NONE) as helper functions for returning
the specified value. All three Py_INCREF the singleton and then return it.
Martin v. Löwis [Sun, 19 Oct 2003 18:34:52 +0000 (18:34 +0000)]
Patch #823259: Update spec file:
- skip building HTML documentation if it is not available.
- Removal of patches, which can't be referenced from a build
directly from the tar-file.
- Using the RPM tmp directory macro for the buildroot location.
- Ensuring that the clean directive doesn't accidentally
delete the users root directory or another directory.
- --enable-unicode=ucs4 in configure line.
Backported to 2.3.
* list.sort() now supports three keyword arguments: cmp, key, and reverse.
key provides C support for the decorate-sort-undecorate pattern.
reverse provide a stable sort of the list with the comparisions reversed.
Jeremy Hylton [Tue, 14 Oct 2003 20:12:06 +0000 (20:12 +0000)]
Open results files, which contain binary pickles, in binary mode.
Remove fallback code that tries to read marshal data from a results
file, since this module never writes marshal data.
Extended tuple's C API to include a new function, PyTuple_Pack() that is
useful for rapidly building argument tuples without having to invoke the
more sophisticated machinery of Py_BuildValue().