Commit Graph

8496 Commits

Author SHA1 Message Date
Jeremy Hylton bd9f520907 Reflow long line. 2003-07-17 16:31:00 +00:00
Just van Rossum 2d4e988c35 back out the darwin supports_unicode_filenames patch; it causes deep problems with the tests 2003-07-17 15:11:49 +00:00
Jeremy Hylton e9a92aa03a Patch from John Anderson to enable VC 7.1 support.
I tested against VC 7.0 and it caused no problems there.
2003-07-17 14:41:07 +00:00
Raymond Hettinger 71adf7e9d8 Doctest now examines all docstrings by default. Previously, it would
skip over functions with private names (as indicated by the underscore
naming convention).  The old default created too much of a risk that
user tests were being skipped inadvertently.  Note, this change could
break code in the unlikely case that someone had intentionally put
failing tests in the docstrings of private functions.  The breakage
is easily fixable by specifying the old behavior when calling testmod()
or Tester().  The more likely case is that the silent failure was
unintended and that the user needed to be informed so the test could be
fixed.
2003-07-16 19:25:22 +00:00
Raymond Hettinger 43d790c087 Exercise Jim Fulton's new doctest extension for running doctests in a
unittest environment.  Since his extension finds docstrings in private
functions, it exposed a bug in the difflib doctests.
2003-07-16 04:34:56 +00:00
Raymond Hettinger 83325e9087 Fix faulty doctests. There is no results attribute.
Note, these tests were not getting exercised because
doctest skips over private functions.
2003-07-16 04:32:32 +00:00
Raymond Hettinger f3590623e9 Extend last change to cover TestSuites as well as TestCases. 2003-07-16 04:29:42 +00:00
Mark Hammond bb4a47c818 Prevent failure on the mac, where "mbcs" is not the file system
encoding.  Use sys.getfilesystemencoding().
2003-07-16 03:46:38 +00:00
Kurt B. Kaiser cca912279a Update to reflect the current status of the configuration system.
Extensions must still be configured manually and there is currently one
set of extension key bindings for all platforms.

Bring NEWS.txt up to date.

Update CREDITS.txt and idlever.py for release.

M NEWS.txt
M config-extensions.def
M extend.txt
M help.txt
M idlever.py
2003-07-16 03:10:43 +00:00
Raymond Hettinger 21d9987cb5 run_unittest() to support TestCase instances as well as classes. Helps with doctests. 2003-07-16 02:59:32 +00:00
Raymond Hettinger 19db13bcc7 Fixed test and converted to unittest format.
Checking // would call floor division but did not test that
true division had become the default with 'from __future__ import division'.
2003-07-15 21:03:13 +00:00
Raymond Hettinger 158af581ae Fixed test and converted to unittest format.
Checking // would call floor division but did not test that
true division had become the default with 'from __future__ import division'.
2003-07-15 20:57:35 +00:00
Jeremy Hylton 42d90161e2 SF patch 763201: handling of SyntaxErrors in symbol table build
Bug fix candidate.
2003-07-15 20:24:27 +00:00
Walter Dörwald f393fc6e51 Add various test cases from SF patch 543867. 2003-07-15 18:47:27 +00:00
Walter Dörwald c171172614 Make the prefix 7 spaces long, so the lines are properly aligned. 2003-07-15 10:34:02 +00:00
Fred Drake f425b1ec42 stylistic nits:
- wrap some long lines
- shorten others
- fix indentation
2003-07-14 21:37:17 +00:00
Skip Montanaro 6d06815b56 Give dumbdbm a sync() method which Shelve can call. Should solve some
database corruption problems with Spambayes.
2003-07-14 12:15:15 +00:00
Raymond Hettinger 92f200b569 SF bug #770601: CGIHTTPServer and environment variables (bug + solution)
(contributed by Vincent Delft.)

The script updated os.environ but failed to pass the whole environment
to the child process (the CGI script).
2003-07-14 06:56:32 +00:00
Tim Peters 7a6c733c3b Make close() identical to __del__() for a dumbdbm database. Make
closing idempotent (it used to raise a nuisance exception on the 2nd
close attempt).

Bugfix candidate?  Probably, but arguable.
2003-07-13 17:21:10 +00:00
Raymond Hettinger 4a4296ec29 SF patch #765238: fix fnmatch.__all__
(Contributed by George Yoshida.)
2003-07-13 16:06:26 +00:00
Skip Montanaro ae5c37b7b3 delete unused local variable (pychecker caught) 2003-07-13 15:18:12 +00:00
Raymond Hettinger 61bfb736b4 SF bug #769142: CallTip trimming may loop forever.
Needs to be backported to both IDLE and IDLEFORK.
2003-07-13 10:25:14 +00:00
Raymond Hettinger d6f6e50c9b Reworked test_warnings.py:
* It ran fine under "python regrtest.py test_warnings" but failed under
  "python regrtest.py" presumably because other tests would add to
  filtered warnings and not reset them at the end of the test.

* Converted to a unittest format for better control.  Renamed
  monkey() and unmonkey() to setUp() and tearDown().

* Increased coverage by testing all warnings in __builtin__.

* Increased coverage by testing regex matching of specific messages.
2003-07-13 08:37:40 +00:00
Raymond Hettinger dc9dcf135e This test failed on WindowsME because the full file path did not get
reported consistently with the *nix world.  'Lib/test/test_warnings.py'
came out as 'lib\test\test_warnings.py'.  The basename is all we care
about so I used that.
2003-07-13 06:15:11 +00:00
Tim Peters 0320464583 Repaired typos in comments. 2003-07-13 02:37:05 +00:00
Tim Peters d7472ec13a Fixed critical shutdown race in _Database._commit.
Related to SF patch 723231 (which pointed out the problem, but didn't
fix it, just shut up the warning msg -- which was pointing out a dead-
serious bug!).

Bugfix candidate.
2003-07-13 02:22:03 +00:00
Tim Peters 1d8d729af8 More comments about why not closing a dumddbm properly can be a disaster. 2003-07-13 02:05:47 +00:00
Raymond Hettinger 4a6302b6fe SF 748201: time.strptime() should display format and date on error
Usability fix.  Makes the error message more helpful.
2003-07-13 01:31:38 +00:00
Tim Peters 3898a70bcf _commit(): Modernization. 2003-07-12 20:23:09 +00:00
Tim Peters 7dfd5701b2 There's a persistent rumor on the spambayes mailing list that dumbdbm
databases are associated with corruption problems, so I studied this code
carefully and ran some brutal stress tests.  I didn't find any bugs,
although it's unclear whether this code *intends* that __setitem__ can
leave the directory file out of synch with the data file (so
if a dumbdbm isn't properly closed, and the value of an existing key
was ever replaced, corruption is almost certain, where "corruption"
means the directory file is out of synch with the data file).

Added many comments and generally modernized the code.  Examples of the
latter:  we have better ways of reading a whole file line-by-line now;
eval() now tolerates a trailing newline; the %r format code can be used
to avoid explicit repr/backtick calls; and the code often broke tuples
into their components when it was clearer and faster to just leave them
as tuples.
2003-07-12 20:11:25 +00:00
Martin v. Löwis 541342f82c Patch #764470: Fix marshalling of faults. Will backport to 2.2. 2003-07-12 07:53:04 +00:00
Martin v. Löwis 162f081fb3 Patch 549151, rev4: redirect posts for 301 also. Will backport to 2.2. 2003-07-12 07:33:32 +00:00
Raymond Hettinger cc39a13d6d Expose the 'master' instance mentioned in the docs. 2003-07-11 22:36:52 +00:00
Jeremy Hylton b6d2f3e07d Don't include slash in search string; it's OS-specific. 2003-07-11 20:22:55 +00:00
Jeremy Hylton 8501466c7f Change warnings to avoid importing re module during startup.
Add API function simplefilter() that does not create or install
regular expressions to match message or module.  Extend the filters
data structure to store None as an alternative to re.compile("").

Move the _test() function to test_warnings and add some code to try
and avoid disturbing the global state of the warnings module.
2003-07-11 15:37:59 +00:00
Andrew MacIntyre a1e93e8dfc patch #766650 - whichdb not identifying dbm DBs when dbm linked with gdbm
At this point, the problem appears particular to the OS/2 EMX port of
gdbm (which is at v1.7.3) - this combination produces a .pag file but
no .dir file.

A more sophisticated patch which checks magic numbers when dbm.library
indicates that dbm is linked to gdbm, and there is no .dir file, is
still attached to the above patch entry for reconsideration after 2.3
is released.

This checkin applies a workaround specific to the known failure case.
2003-07-11 12:16:48 +00:00
Just van Rossum c4bf893952 [ 767645 ] correctly set the os.path.supports_unicode_filenames flag for OSX 2003-07-11 07:36:49 +00:00
Tim Peters ef6573e529 __setitem__: Use integer division for computing # of blocks. 2003-07-11 04:09:55 +00:00
Tim Peters 663d1b61cb Added a new randomized test. 2003-07-11 04:09:09 +00:00
Just van Rossum ed8bfce002 Fixed a bug that's been there from the beginning but wasn't noticed
until now: the inheritance of default values was the wrong way around.
This caused app bundles to get a type of "BNDL" instead of "APPL".
Apparently this is not a problem until you try to drag your app to
the dock.
----------------------------------------------------------------------
2003-07-10 14:53:27 +00:00
Just van Rossum 87316ec962 don't optimize empty strings 2003-07-10 14:26:06 +00:00
Jeremy Hylton aefae5570d Fix wrong header name. The framework looks for auth_header. 2003-07-10 13:30:12 +00:00
Andrew MacIntyre 71d74e87cb Extend the pwd & grp emulations to support accessing the pwd/grp
record tuple by name as well as index, to match the behaviour of
the pwd/grp extension modules for Unix.  These emulation modules
now pass test_pwd & test_grp.
2003-07-10 12:52:54 +00:00
Raymond Hettinger 931237e2e6 SF patch #768187: replace apply(f, args, kwds) with f(*args, **kwds) 2003-07-09 18:48:24 +00:00
Gregory P. Smith ad30fa03a4 fix to work on python <= 2.1 2003-07-09 05:33:14 +00:00
Gregory P. Smith df35beed40 bugfix: proper import bsddb exists below 2003-07-09 05:29:24 +00:00
Gregory P. Smith 455d46f0d9 bsddb 4.1.6:
* Extended DB & DBEnv set_get_returns_none functionality to take a
   "level" instead of a boolean flag.  The boolean 0 and 1 values still
   have the same effect.  A value of 2 extends the "return None instead
   of raising an exception" behaviour to the DBCursor set methods.
   This will become the default behaviour in pybsddb 4.2.
 * Fixed a typo in DBCursor.join_item method that made it crash instead
   of returning a value.  Obviously nobody uses it.  Wrote a test case
   for join and join_item.
2003-07-09 04:45:59 +00:00
Kurt B. Kaiser bea57c6c35 SF Bug 767794
"Break or continue outside loop causes crash"
2003-07-09 04:27:24 +00:00
Jeremy Hylton 121d34af19 Fix SF bug 764095: Don't use network in test_httplib. 2003-07-08 12:36:58 +00:00
Fred Drake b5aa407196 Use Boolean values for the capturestderr flag. 2003-07-07 21:36:19 +00:00