Commit Graph

5976 Commits

Author SHA1 Message Date
Michael W. Hudson 8bf46e4e7a This is patch
[ 555382 ] test_array v.s. --disable-unicode

+ MvL's suggestions.  Just the 32 failing tests in --disable-unicode builds
now...
2002-05-15 13:04:53 +00:00
Raymond Hettinger d1fa3db52d Added docstrings excerpted from Python Library Reference.
Closes patch 556161.
2002-05-15 02:56:03 +00:00
Chui Tey 55956c9361 Fixed bug: Split RPC message into two parts instead of three 2002-05-14 23:45:14 +00:00
Fred Drake 30d59baecd Simplify code to remove an unnecessary test. 2002-05-14 15:50:11 +00:00
Guido van Rossum 570764ddce Use spaces, not tabs for indents.
Raymond Hettinger, beware!  This caused the Unix install to fail!
2002-05-14 14:08:12 +00:00
Raymond Hettinger 2d2b51bf22 Added tests for new degree/radian conversions. 2002-05-14 08:51:33 +00:00
Raymond Hettinger b760efb08d Closes patch 529408 deprecating random.stdgamma(). 2002-05-14 06:40:34 +00:00
Barry Warsaw bdc8289e06 smtp_RCPT(): Removed a somewhat embarrassing debugging line, found by
Scot Stevenson.  Could be a bug fix candidate, but probably doesn't
matter much unless a certain blue-nosed cat suddenly becomes corporeal
and starts emailing some stmp.py (sic) fronted mailer.
2002-05-14 02:13:30 +00:00
Raymond Hettinger ca6cdc2c02 Closes SF bug 527139. Moved temp variables inside guard. 2002-05-13 23:40:14 +00:00
Guido van Rossum 4402241450 Jim Fulton reported a segfault in dir(). A heavily proxied object
returned a proxy for __class__ whose __bases__ was also a proxy.  The
merge_class_dict() helper for dir() assumed incorrectly that __bases__
would always be a tuple and used the in-line tuple API on the proxy.

I will backport this to 2.2 as well.
2002-05-13 18:29:46 +00:00
Guido van Rossum df4dabd5d2 SF 554663. Add OpenBSD3. Bugfix candidate if anyone cares. 2002-05-13 14:58:02 +00:00
Guido van Rossum 6a1bd39d8e SF 554073. Fix typo in error reporting of unrecognized character
following IAC.  Bugfix candidate if anyone cares.
2002-05-13 14:55:33 +00:00
Michael W. Hudson e1c67d1dc0 Make StringIO work in --disable-unicode builds... 2002-05-13 09:42:16 +00:00
Raymond Hettinger 64108afa60 Adds tests for degrees() and radians() functions added to mathmodule.
Closes patch 552452 and feature request 426539.
2002-05-13 03:55:01 +00:00
Tim Peters 39a86c2188 SF bug 555042: zip() may trigger MemoryError.
NOT a bugfix candidate:  this is a fix to an optimization introduced
in 2.3.
2002-05-12 07:19:38 +00:00
Raymond Hettinger e874fc304e Closes SF patch 553277. Per GvR, reverting to original patch -- the way to
test if 'callable' has not been supplied is to test for None instead of
False.  The previous correction to 'if callable()' was wrong because an unusable
callback would be ignored rather than raising an exception.
2002-05-12 05:53:51 +00:00
Jeremy Hylton e037665f99 Use isinstance() in preference to comparison of type by is. 2002-05-10 21:00:35 +00:00
Martin v. Löwis a8dd0941b8 Patch #553277: Accept callbacks that are callable, not callbacks that are true. 2002-05-08 08:56:33 +00:00
Andrew M. Kuchling 0b5c11252d Prevent convert_path from crashing if the path is an empty string. Bugfix candidate. 2002-05-06 13:57:19 +00:00
Tim Peters 46c04e140c random.gauss() uses a piece of hidden state used by nothing else,
and the .seed() and .whseed() methods failed to reset it.  In other
words, setting the seed didn't completely determine the sequence of
results produced by random.gauss().  It does now.  Programs repeatedly
mixing calls to a seed method with calls to gauss() may see different
results now.

Bugfix candidate (random.gauss() has always been broken in this way),
despite that it may change results.
2002-05-05 20:40:00 +00:00
Fred Drake e08fda912f Remove all tests that rely on deprecated-in-2.2 features of xrange objects.
"What's New in Python 2.2" documented that these would be removed in
Python 2.3.
2002-05-02 18:40:31 +00:00
Martin v. Löwis a066f46b9b Patch 550804: Make os.environ.copy() return a copy. 2002-05-02 17:39:19 +00:00
Fred Drake e0e890a4da Added regression tests for xrange object attributes.
See SF bug #551285.
2002-05-02 16:07:44 +00:00
Fred Drake 485f340d52 Buffer-object repitition and concatenation has worked all along; add a test
to make avoid regression.
2002-05-02 04:27:20 +00:00
Fred Drake 7f781c9aab Add Pickler.clear_memo() so the pickle and cPickle modules are more similar. 2002-05-01 20:33:53 +00:00
Andrew MacIntyre e41abab33b Fred's recent changes to support "-u all" resulted in subset resource
selections (eg "-u network") being ignored.
2002-04-30 12:11:04 +00:00
Tim Peters 67d687a114 builtin_zip(): Take a good guess at how big the result list will be,
and allocate it in one gulp.

This isn't a bugfix, it's just a minor optimization that may or may not
pay off.
2002-04-29 21:27:32 +00:00
Tim Peters 81b9251d59 Mostly in SequenceMatcher.{__chain_b, find_longest_match}:
This now does a dynamic analysis of which elements are so frequently
repeated as to constitute noise.  The primary benefit is an enormous
speedup in find_longest_match, as the innermost loop can have factors
of 100s less potential matches to worry about, in cases where the
sequences have many duplicate elements.  In effect, this zooms in on
sequences of non-ubiquitous elements now.

While I like what I've seen of the effects so far, I still consider
this experimental.  Please give it a try!
2002-04-29 01:37:32 +00:00
Guido van Rossum 7dab2426ca - New builtin function enumerate(x), from PEP 279. Example:
enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c").
  The argument can be an arbitrary iterable object.
2002-04-26 19:40:56 +00:00
Fred Drake d451ec1cdb Clean up uses of some deprecated features.
Reported by Neal Norwitz on python-dev.
2002-04-26 02:29:55 +00:00
Thomas Heller 69d31b749d Pass the full pathname to MSVC when compiling a debug version. This
allows the debugger to find the source without asking the user to
browse for it.
2002-04-25 17:29:45 +00:00
Thomas Heller 378498dad6 Append the PC specific include 'PC' and library 'PCBuild' directories
under NT - this allows distutils to work with the CVS version or the
source distribution.

Wrap a long line.
2002-04-25 17:26:37 +00:00
Thomas Heller e65008038e Fix trivial typo. 2002-04-25 17:03:30 +00:00
Neil Schemenauer 3b04d635a2 Add more tests for abstract isinstance() and issubclass(). 2002-04-24 03:33:02 +00:00
Tim Peters 1e33ffa5c7 test_resource has no chance of running on Windows. 2002-04-23 23:09:02 +00:00
Tim Peters e12cda9840 test_mmap started breaking on Windows, only when run after test_bsddb.
On Win2K it thought 'foo' started at byte offset 0 instead of at the
pagesize, and on Win98 it thought 'foo' didn't exist at all.  Somehow
or other this is related to the new "in memory file" gimmicks in
bsddb, but the old bsddb we use on Windows sucks so bad anyway I don't
want to bother digging deeper.  Flushing the file in test_mmap after
writing to it makes the problem go away, so good enough.
2002-04-23 23:07:28 +00:00
Barry Warsaw 906569de24 Unit tests for the changes in abstract.c version 2.101. The debug
build's "undetected error" problems were originally detected with
extension types, but we can whitebox test the same situations with
new-style classes.
2002-04-23 22:48:42 +00:00
Barry Warsaw 5ca537473b Rewrote the PyUnit description so that it now recommends to use
run_suite() instead of run_unittest().  Best practice is to plan for
multiple test classes.
2002-04-23 21:39:00 +00:00
Jeremy Hylton 74ce77f0e6 Add tests for the recent resource module change.
Also add a test that Python doesn't die with SIGXFSZ if it exceeds the
file rlimit.  (Assuming this will also test the behavior when the 2GB
limit is exceed on a platform that doesn't have large file support.)
2002-04-23 20:21:22 +00:00
Barry Warsaw 8570013357 Whitespace normalization. Unka Timmy would be proud. 2002-04-23 18:18:43 +00:00
Guido van Rossum 256705bca7 SF patch 546244 by John Williams: add Text.dump() method. 2002-04-23 13:29:43 +00:00
Jack Jansen 1476c2753b There was a non-ascii character in the source. Replaced by a hex escape. 2002-04-23 10:52:44 +00:00
Anthony Baxter ae7639dbfb whitespace fixup. test__all__ and test_sundry were failing
for me on linux because of the inconsistent whitespace.
2002-04-23 02:38:39 +00:00
Anthony Baxter 4ce6b351cc don't fail if the audio device is busy, just skip.
SF patch 545486
2002-04-23 02:20:46 +00:00
Anthony Baxter 8388895fe4 SF patch [ 545523 ] patch for 514433 bsddb.dbopen (NULL)
closes SF #514433

can now pass 'None' as the filename for the bsddb.*open functions,
and you'll get an in-memory temporary store.

docs are ripped out of the bsddb dbopen man page. Fred may want to
clean them up.

Considering this for 2.2, but not 2.1.
2002-04-23 02:11:05 +00:00
Walter Dörwald de02bcb265 Apply patch diff.txt from SF feature request
http://www.python.org/sf/444708

This adds the optional argument for str.strip
to unicode.strip too and makes it possible
to call str.strip with a unicode argument
and unicode.strip with a str argument.
2002-04-22 17:42:37 +00:00
Jack Jansen 992d58b770 Fixes based on ideas from Christopher Smith:
- islink() now returns true for alias files
- walk() no longer follows aliases while traversing
- realpath() implemented, returning an alias-free pathname.

As this could conceivably break existing code I think it isn't a bugfix candidate.
2002-04-22 13:55:43 +00:00
Steven M. Gava a2bc259dd7 tracking python idle changes:
Provisional fix for writefile() [SF bug # 541730]
2002-04-22 00:42:42 +00:00
Steven M. Gava 931625dc77 tracking python idle changes:
Patch #540583: Open MS Help Docs if available.
2002-04-22 00:38:26 +00:00
Tim Peters 639295f0a5 Enable universal newlines on Windows. Note that NEWS needs more words! 2002-04-21 07:30:30 +00:00