Commit graph

28474 commits

Author SHA1 Message Date
Tim Peters b8b60ea0c9 PlaySoundTest.test_alias_nofallback(): Simplified the coding by using
assertRaises.

NOT a bugfix candidate.
2003-09-22 18:41:53 +00:00
Tim Peters 086e56205c PlaySoundTest.test_alias_fallback(): Disabled this test, and explained
why in a new comment.  My home Win98SE box is one of the "real systems"
alluded to (my system "default sound" appears to have vanished sometime
in the last month, that's certainly not a Python bug, and the MS
PlaySound docs are correct in their explanation of what happens then).

Bugfix candidate.  If someone can still sneak it into 2.3.1, that would
be good.
2003-09-22 18:38:53 +00:00
Raymond Hettinger 92016dcc91 SF 810242. Fix doubled word errors. 2003-09-22 15:27:11 +00:00
Guido van Rossum 0e5a51d962 New for unittest.py. 2003-09-22 15:03:11 +00:00
Raymond Hettinger 7e43110f34 SF 810242. Fix doubled word errors. 2003-09-22 15:00:55 +00:00
Walter Dörwald e46d14cd2c Avoid list as a variable name. 2003-09-22 12:43:16 +00:00
Marc-André Lemburg d7160f8845 Added test whether wchar_t is signed or not. A signed wchar_t is not usable as internal unicode type base for Py_UNICODE since the unicode implementation assumes an unsigned type. 2003-09-22 11:14:40 +00:00
Steve Purcell 7e74384af5 - Fixed loading of tests by name when name refers to unbound
method (PyUnit issue 563882, thanks to Alexandre Fayolle)
- Ignore non-callable attributes of classes when searching for test
  method names (PyUnit issue 769338, thanks to Seth Falcon)
- New assertTrue and assertFalse aliases for comfort of JUnit users
- Automatically discover 'runTest()' test methods (PyUnit issue 469444,
  thanks to Roeland Rengelink)
- Dropped Python 1.5.2 compatibility, merged appropriate shortcuts from
  Python CVS; should work with Python >= 2.1.
- Removed all references to string module by using string methods instead
2003-09-22 11:08:12 +00:00
Raymond Hettinger 1e80359733 Clean-up example code: remove string module and backticks. 2003-09-22 06:25:10 +00:00
Jeremy Hylton 9832613beb Fix SF bug [ 808594 ] leak on lambda with duplicate arguments error.
Refactor code so that one helper routine sets error location and
increments st_errors.

Bug fix candidate.
2003-09-22 04:26:44 +00:00
Gregory P. Smith 125188cabf Add BerkeleyDB 4.2 to the library search for the bsddb module. 2003-09-22 01:16:48 +00:00
Gregory P. Smith e94040a1ed minor correction. python 2.3 was released with the bsddb module 4.1.6 not 4.1.1 2003-09-21 23:41:02 +00:00
Gregory P. Smith 7000225fbc raise pybsddb version number to 4.2.1 to differentiate between it and the
version in the python 2.3.1 tree.
2003-09-21 23:29:41 +00:00
Raymond Hettinger 175a6ac114 Improve and expand identity tests. 2003-09-21 08:14:11 +00:00
Gregory P. Smith 41631e8f66 Adds basic support for BerkeleyDB 4.2.x. Compiles and passes tests; new
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.
2003-09-21 00:08:14 +00:00
Gregory P. Smith cec1b3f6a7 Maintain backwards compatibility with python < 2.3 by dynamically
adding the iterator interface for python >= 2.3.
2003-09-20 23:51:34 +00:00
Tim Peters 0aab002057 SF patch 809915: Fix bogus address to hopefully always break.
test_bad_address():  Recover from that VeriSign thought it would boost
its corporate coffers to start resolving http://www.sadflkjsasadf.com/.

Bugfix candidate -- although the bug is more VeriSign's than Python's!
2003-09-20 22:16:26 +00:00
Tim Peters c7c516aa51 test__locale (two underscores) can't pass on Windows: RADIXCHAR doesn't
exist, and neither do any of the specific 5-letter locale names the test
is looking for.
2003-09-20 22:06:13 +00:00
Martin v. Löwis e7a9796a0f Patch #800697: Add readline.clear_history. 2003-09-20 16:08:33 +00:00
Martin v. Löwis c6bb6c0f8c Patch #707167: Pass dircache exceptions to the caller. Fixes #682813.
Not backported because of behaviour change.
2003-09-20 15:52:21 +00:00
Martin v. Löwis a64988c001 Check for declarations of fchdir and fsync. Fixes #800710. Backported to 2.3. 2003-09-20 15:30:20 +00:00
Martin v. Löwis 212ede6cbf Patch #730597: Disable POPEN for RTEMS. 2003-09-20 11:20:30 +00:00
Martin v. Löwis 70849f84a0 Patch #805613: Fix usage of the PTH library. 2003-09-20 11:13:36 +00:00
Martin v. Löwis 7bdc484c97 Patch #808362: Fix typos. 2003-09-20 11:09:28 +00:00
Martin v. Löwis 8f81c93b8c Patch #713645: Fix typo. 2003-09-20 11:05:01 +00:00
Martin v. Löwis dc14ab13c4 Patch #793559: Reset __starttext_tag. Fixes #709491. Backported to 2.3. 2003-09-20 10:58:38 +00:00
Martin v. Löwis cb3062e3c0 Patch #805976: Add DOTBOX and UNDERLINE. 2003-09-20 10:52:56 +00:00
Martin v. Löwis 2cc6c29e33 Patch #805678: Add .so symlink during make install. Backported to 2.3. 2003-09-20 10:50:48 +00:00
Martin v. Löwis 519adae1c1 Patch #805604: Do not check for sem_init, do not use -Kthread,
if configured --without-threads. Backported to 2.3.
2003-09-20 10:47:47 +00:00
Brett Cannon 1836781fae Improve detection of whether tzset is broken. 2003-09-19 00:59:16 +00:00
Thomas Heller a425dbc7ce Fix a typo found by Eric D. Moyer, closes SF 807813.
Will backport to 2.3.
2003-09-17 17:11:01 +00:00
Raymond Hettinger 7a70ea4135 SF patch #806246: use basestring where possible
(Contributed by George Yoshida.)
2003-09-17 05:50:59 +00:00
Raymond Hettinger d21fd7bd86 * Minor wording change
* Reference the doctest.DocTestSuite() conversion tool.
2003-09-16 22:04:31 +00:00
Raymond Hettinger 3404034a21 Minor fixups 2003-09-16 21:45:22 +00:00
Tim Peters ced69f8a20 On c.l.py, Martin v. Löwis said that Py_UNICODE could be of a signed type,
so fiddle Jeremy's fix to live with that.  Also added more comments.

Bugfix candidate (this bug is in all versions of Python, at least since
2.1).
2003-09-16 20:30:58 +00:00
Jeremy Hylton d808279be3 Double-fix of crash in Unicode freelist handling.
If a length-1 Unicode string was in the freelist and it was
uninitialized or pointed to a very large (magnitude) negative number,
the check

	 unicode_latin1[unicode->str[0]] == unicode

could cause a segmentation violation, e.g. unicode->str[0] is 0xcbcbcbcb.

Fix this in two ways:

1. Change guard befor unicode_latin1[] to test against 256U.  If I
   understand correctly, the unsigned long used to store UCS4 on my
   box was getting converted to a signed long to compare with the
   signed constant 256.

2. Change _PyUnicode_New() to make sure the first element of str is
   always initialized to zero.  There are several places in the code
   where the caller can exit with an error before initializing any
   of str, which would leave junk in str[0].

Also, silence a compiler warning on pointer vs. int arithmetic.

Bug fix candidate.
2003-09-16 19:41:39 +00:00
Raymond Hettinger a9e14b7015 Fix leak in classobject.c. The leak surfaced on the error exit when
hashing a class that does not define __hash__ but does define a
comparison.
2003-09-16 07:11:46 +00:00
Raymond Hettinger 2d72b5d707 Test __all__ for unittest.py 2003-09-16 04:37:39 +00:00
Raymond Hettinger cc1798e0c0 Improve the leak fix so that PyTuple_New is only called when needed. 2003-09-16 04:27:52 +00:00
Jeremy Hylton deb2dc6658 Change checks of PyUnicode_Resize() return value for clarity.
The unicode_resize() family only returns -1 or 0 so simply checking
for != 0 is sufficient, but somewhat unclear.  Many Python API
functions return < 0 on error, reserving the right to return 0 or 1 on
success.  Change the call sites for consistency with these calls.
2003-09-16 03:41:45 +00:00
Jeremy Hylton 364f6becad Correct check of PyUnicode_Resize() return value. 2003-09-16 03:17:16 +00:00
Jeremy Hylton 1aad9c7dad Reflow long lines and reformat. 2003-09-16 03:10:59 +00:00
Raymond Hettinger 37a724d718 Fix leak discovered in test_new by Michael Hudson.
Will backport to 2.3.1
2003-09-15 21:43:16 +00:00
Raymond Hettinger 1e4cf67c32 SF bug #804113: Crypto terminology for crypto hash function
Noted that the SHA algorithm is really SHA-1.
(Contributed by Ronald Rivest.)
2003-09-15 18:20:52 +00:00
Andrew M. Kuchling 99f3ba1648 Remove possibly-misleading Expat version 2003-09-15 12:27:18 +00:00
Steve Purcell d75e7e4342 Explicitly define public symbols via __all__: see discussion with Raymond
Hettinger in comments for issue 804115
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=804115&group_id=5470
2003-09-15 11:01:21 +00:00
Raymond Hettinger d55111f791 * Converted test to unittest format.
* Expanded coverage.
2003-09-13 05:51:09 +00:00
Raymond Hettinger 2e9da6020e The previous change works much faster (one lookup per key) when
iteritems() is defined.
2003-09-13 03:18:34 +00:00
Raymond Hettinger 91dd19db6f SF bug #804115: bad argument handling(unittest.py) 2003-09-13 02:58:00 +00:00
Raymond Hettinger 42a61ed277 Simplify doctest of tee(). 2003-09-13 01:01:34 +00:00