Greg Ward [Thu, 8 May 2003 01:58:05 +0000 (01:58 +0000)]
SF patch #598163 (Ville Vainio, vvainio@users.sourceforge.net):
add dedent() function, to remove indentation from multiline strings
(eg. triple-quoted strings). Differs from inspect.getdoc() by not
special-casing the first line (often a sensible approach for
non-docstring multiline strings). This should make this function more
general (symmetric 'indent' also possible), and more fitting for the
textwrap module.
SF bug #730296: Unexpected Changes in list Iterator
Reverted a Py2.3b1 change to iterator in subclasses of list and tuple.
They had been changed to use __getitem__ whenever it had been overriden
in the subclass.
This caused some usabilty and performance problems. Also, it was
inconsistent with the rest of python where many container methods
access the underlying object directly without first checking for
an overridden getter. Users needing a change in iterator behavior
should override it directly.
Greg Ward [Wed, 7 May 2003 01:20:58 +0000 (01:20 +0000)]
SF #596434: tweak wordsep_re so the definition of an em-dash is
stricter: specifically, "--" must be preceded by a limited set of
characters, not by any non-whitespace character.
* Increase dictionary growth rate resulting in more sparse dictionaries,
fewer lookup collisions, increased memory use, and better cache
performance. For dicts with over 50k entries, keep the current
growth rate in case an application is suffering from tight memory
constraints.
* Set the most common case (no resize) to fall-through the test.
Tim Peters [Mon, 5 May 2003 20:39:43 +0000 (20:39 +0000)]
SF patch 730594: assert from longobject.c, line 1215.
Some version of gcc in the "RTEMS port running on the Coldfire (m5200)
processor" generates bad code for a loop in long_from_binary_base(),
comparing the wrong half of an int to a short. The patch changes the
decl of the short temp to be an int temp instead. This "simplifies"
the code enough that gcc no longer blows it.
Walter Dörwald [Mon, 5 May 2003 20:37:33 +0000 (20:37 +0000)]
On Mac OS X pwd.getpwall() might return the tuples
('pgsql', '*', 252, []) and ('postgres', '*', 252, ['skip']),
but pwd.getgrgid(252) might return ('pgsql', '', 252, ['skip']).
Drop the test that tried to find a tuple similar to the one
returned from pwd.getgrgid() among those for the same gid returned
by pwd.getgrall(), as the only working definition of 'similar' seems
to be 'has the same gid'. This check can be done more directly.
Jeremy Hylton [Sun, 4 May 2003 23:44:49 +0000 (23:44 +0000)]
Repair redirect handling and raise URLError on host-not-found.
The latest changes to the redirect handler couldn't possibly have been
tested, because they did not compute a newurl and failed with a
NameError. The __name__ == "__main__": block has a test for
redirects.
Also, fix SF bug 723831. A urlopen() that failed because the host was
not found raised a socket.gaierror unlike earlier versions of
urllib2. The problem is that httplib actually establishes the
connection at a different point starting with Python 2.2. Move the
try/except to endheaders(), which is where the connection gets
established.
Greg Ward [Sat, 3 May 2003 20:13:08 +0000 (20:13 +0000)]
Use True/False instead of 1/0 when talking about store_true/store_false.
Particularly important since they now store True and False rather than 1
and 0!
Greg Ward [Sat, 3 May 2003 19:45:47 +0000 (19:45 +0000)]
Add a big comment about cross-platform issues (especially OpenBSD).
This should be turned into a footnote by someone who actually
understands OSS and its relationship to Linux, FreeBSD, OpenBSD, NetBSD,
etc.
* Added a substantial number of edge case and argument tests for
the itertoolsmodule.
* Taught itertools.repeat(obj, n) to treat negative repeat counts as
zero. This behavior matches that for sequences and prevents
infinite loops.
Fred Drake [Sat, 3 May 2003 02:07:22 +0000 (02:07 +0000)]
- add title attributes to the navigation icons on the navigation bars;
this causes some browsers to offer descriptive tooltips when the
mouse hovers over the linked icon
- clean up the code in this area
Just van Rossum [Sat, 3 May 2003 00:31:35 +0000 (00:31 +0000)]
Install automatic GIL switcher upon IDE startup.
(Jack: maybe this could/should be done in Framework.py instead, that way
apps don't have to think about it. PackMan springs to mind...)
Just van Rossum [Sat, 3 May 2003 00:18:55 +0000 (00:18 +0000)]
Short and sweet module doing something very useful: for event loop
based threads, release the GIL when the event loop goes to sleep,
and acquire it again when the event loop wakes up again. OSX-only.
Jack Jansen [Fri, 2 May 2003 20:27:40 +0000 (20:27 +0000)]
CWI moved websites around without me knowing it, and together with
a bug in urllib2 this caused pimp to stop working. Fixed the URL to
make it work again.
Fred Drake [Fri, 2 May 2003 20:18:01 +0000 (20:18 +0000)]
- add link relationships to some of the links in the navigation panels
- implement custom_REL_hook() so LaTeX2HTML uses currently recommended
link types; those work fine with tools like the Mozilla Site
Navigation Bar
Anthony Baxter [Fri, 2 May 2003 15:40:46 +0000 (15:40 +0000)]
Patch 731209: Restore socketmodule's behaviour with dotted quad addresses
to that of Python2.1. Such nnn.nnn.nnn.nnn addresses are just used directly,
not passed to the resolver for a pointless lookup.