Commit Graph

27305 Commits

Author SHA1 Message Date
Greg Ward 9e082f4eae Add DedentTestCase to test dedent() function. 2003-05-08 01:58:26 +00:00
Greg Ward 478cd48dee 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.
2003-05-08 01:58:05 +00:00
Greg Ward 4656ed44ca Update to Optik 1.4.1+: adds __all__ (Optik SF bug #728563). 2003-05-08 01:38:52 +00:00
Brett Cannon 066f3928b2 Library documentation for the 'test' package. Still needs to be checked by Fred. 2003-05-07 22:02:17 +00:00
Jim Fulton aed0a4a138 Rewrote the basic section of the chapter on defining new types.
Changed the example to show how to create types the new way:

- Use a class new method rather than a new function.

- Use self->ob_type->tp_free in deallocators

- Use attribute descriptors rather than set/getattr methods.

- Make the type usable as a base type.

I split the example into 3 parts:

1. The minimal new type

2. Adding attributes and methods.

3. Finer control over attributes.

It's much simpler to define builtin types. These updates hopefully
show this.

I also made minor wording changes in two other places.

I still need to update xxobject.c
2003-05-07 19:48:13 +00:00
Raymond Hettinger a02469f969 More message updates and minor fixes. 2003-05-07 17:49:36 +00:00
Raymond Hettinger a2f84ceda5 Update traceback message 2003-05-07 17:11:15 +00:00
Andrew M. Kuchling fcf6b3ecde Add list.insert() change for negative positions
Add ~ to MvL's last name
Fix use of all-caps for a name
Bump version number
2003-05-07 17:00:35 +00:00
Skip Montanaro 45a9c93236 add missing parens - verified w/ interpreter - sorry to dismiss your comment
Fred
2003-05-07 16:01:43 +00:00
Skip Montanaro 50727728b9 set platform properly for OSF/1 2003-05-07 15:38:47 +00:00
Skip Montanaro b4f12424a5 replace most uses of `...` by repr(...), noting that `...` is discouraged,
but convenient in interactive sessions.
2003-05-07 15:29:12 +00:00
Jack Jansen e9709e7e34 Merged 2.3b1 welcome message to the trunk. 2003-05-07 09:41:56 +00:00
Jack Jansen a6872b86a1 Merged 1.2.2.1 fixes:
- Don't generate README, but ask the user to provide it.
- Create destination dir, if needed.
- Updated for 2.3b1.
2003-05-07 08:58:11 +00:00
Raymond Hettinger 686b14d7ad 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.
2003-05-07 01:28:47 +00:00
Greg Ward a409f7c491 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.
2003-05-07 01:20:58 +00:00
Greg Ward cc55cb9539 SF #596434: add test_funky_parens() to probe some more of the tricky
edge cases that David Goodger reported long ago (July 2002?).
2003-05-07 01:19:22 +00:00
Greg Ward 21820cd925 SF #726446: raise ValueError if width <= 0. 2003-05-07 00:55:35 +00:00
Greg Ward 49128575e8 SF #726446: ensure wrap() raises ValueError when width <= 0. 2003-05-07 00:54:42 +00:00
Raymond Hettinger c8d2290c8c SF patch #729395: Dictionary tuning
Adjust resize argument for dict.update() and dict.copy().
Extends the previous change to dict.__setitem__().
2003-05-07 00:49:40 +00:00
Skip Montanaro 9f5178abb7 p.strip(os.sep) can't have possibly worked. It would have stripped both
leading and trailing '/' characters on Unix systems.
2003-05-06 20:59:57 +00:00
Skip Montanaro 22e00c42c0 build bsddb185 module in certain restricted circumstances 2003-05-06 20:43:34 +00:00
Skip Montanaro 8c044d8ca4 add note about bsddb185 module 2003-05-06 20:42:37 +00:00
Skip Montanaro 02cd36580f detect old version 2 hash files and return "bsddb185" as the appropriate
module to load them
2003-05-06 20:42:10 +00:00
Skip Montanaro 6d9f45bc3f add a note about the undocumented bsddb185 module 2003-05-06 20:40:17 +00:00
Skip Montanaro c797ceb545 add open function to bsddb185 module so the file format sniffing can be
restricted to the whichdb module
2003-05-06 20:38:52 +00:00
Skip Montanaro 6967f2c2e9 don't need to worry about file endianness 2003-05-06 20:37:56 +00:00
Skip Montanaro f0776d2992 Data file for bsddb185 test 2003-05-06 20:37:25 +00:00
Skip Montanaro 46f4e79aaf test case for bsddb185 module 2003-05-06 20:36:57 +00:00
Skip Montanaro 823ba28b0d the new bsddb185 module is an expected skip on most platforms (this may not
be needed - just being anal)
2003-05-06 20:36:24 +00:00
Skip Montanaro c9803ab855 add Guido's reasoning behind running all tests twice 2003-05-06 16:17:27 +00:00
Skip Montanaro 1a56665e39 add not-yet-supported Unicode test just so it doesn't get lost. 2003-05-06 15:56:05 +00:00
Skip Montanaro 446ad71569 add testall target - just adds -uall to the regrtest runs 2003-05-06 15:30:20 +00:00
Jack Jansen 9a79182316 Fix for #731643: allow "lookup in documentation" to also work if the
interactive window is frontmost.
2003-05-06 14:28:31 +00:00
Jack Jansen c7c78ae531 Allow for Version, Flavor and Download-URL not being set. 2003-05-06 13:07:32 +00:00
Jack Jansen 705553acab When doing a forced install of a package depending on a pseudo-package
you got a strange error message. Fixed.
2003-05-06 12:44:00 +00:00
Raymond Hettinger 8657845e02 SF bug #692959: new.function ignores keyword arguments 2003-05-06 09:01:41 +00:00
Walter Dörwald 411e5a2c29 Port test_uu.py to PyUnit. From SF patch #662807. 2003-05-06 08:57:41 +00:00
Raymond Hettinger 3539f6b895 SF patch #729395: Dictionary tuning
* 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.
2003-05-05 22:22:10 +00:00
Martin v. Löwis f2e488db23 Patch #732479: Fix typos. 2003-05-05 22:00:11 +00:00
Raymond Hettinger 4887a12133 Add notes from python-dev about readonly dictionaries. 2003-05-05 21:31:51 +00:00
Tim Peters c7bc0b98e7 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.
2003-05-05 20:39:43 +00:00
Walter Dörwald ce6829ade0 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.

This should fix SF bug #732783.
2003-05-05 20:37:33 +00:00
Jeremy Hylton 6cb52ddc3c Refer reader to platform library docs for specific semantics.
Resolves SF bugs 697989, 697988, 697986.
2003-05-05 16:46:26 +00:00
Jeremy Hylton c1b2cb9d8f SF bug 622042: Don't expect response body from HEAD request.
Bug fix candidate.
2003-05-05 16:13:58 +00:00
Skip Montanaro 581c36773a typo 2003-05-05 14:16:41 +00:00
Martin v. Löwis 53e73c36ee Patch #732284: Disable _XOPEN_SOURCE on UnixWare 7. 2003-05-05 05:13:18 +00:00
Martin v. Löwis 5f433f0ef4 Patch #732234: Check for -Kthread. 2003-05-05 05:05:30 +00:00
Jeremy Hylton 0389295dcd Better fix for newurl as suggested by Jim Jewett in SF bug #730963. 2003-05-05 04:09:13 +00:00
Jeremy Hylton f6b444ede4 Add comment explaining try/except for endheaders(). 2003-05-05 01:47:13 +00:00
Jeremy Hylton 828023b6b5 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.
2003-05-04 23:44:49 +00:00