Commit Graph

9453 Commits

Author SHA1 Message Date
Martin v. Löwis c234a52458 Flush bz2 data even if nothing had been written so far. Fixes #1013882.
Will backport to 2.3.
2004-08-22 21:28:33 +00:00
Martin v. Löwis 70aa1f2095 Fix repr for negative imaginary part. Fixes #1013908. 2004-08-22 21:09:15 +00:00
Tim Peters f82a9ded39 Start deferring to the LaTeX docs for details. I'd like to move the
docstrings toward being a lot shorter, and telling the whole truth in
the manual instead.  This change is an example:  the manual has detailed
explanations of the option names now, so it's Bad to repeat them in
the docstring (two detailed descriptions are certain to get out of synch).
Just listing the names has memory-jogging benefits, though, so that's
still helpful in the docstring.
2004-08-22 20:51:53 +00:00
Tim Peters c6cbab0db4 Added NDIFF_DIFF option. 2004-08-22 19:43:28 +00:00
Tim Peters 75dc5e14ea Type in docstring. 2004-08-22 17:50:45 +00:00
Tim Peters c50491591d _parse_example(): Simplified new code to preserve trailing spaces before
final newline.  Anything to get rid of "l" as a variable name <0.5 wink>.
2004-08-22 17:34:58 +00:00
Martin v. Löwis e09bd93685 Patch #997284: Allow pydoc to work with XP Themes (.manifest file)
Will backport to 2.3.
2004-08-22 16:13:26 +00:00
Martin v. Löwis ac37f3d001 Patch #1009389: Make __credits__ a Unicode object. 2004-08-22 16:08:04 +00:00
Martin v. Löwis 12237b3a19 Replace yield with sequence class. Fixes #1009803. 2004-08-22 16:04:50 +00:00
Jim Fulton 07a349c4ee Bugs fixed:
- Test filenames sometimes had trailing .pyc or .pyo sufixes
    (when module __file__ did).

  - Trailing spaces spaces in expected output were dropped.

New default failure format:

  - Separation of examples from file info makes examples easier to see

  - More vertical separation, improving readability

  - Emacs-recognized file info (also closer to Python exception format)
2004-08-22 14:10:00 +00:00
Kurt B. Kaiser 183403a271 1. If user passes a non-existant filename on the commandline, just open
a new file, don't raise a dialog.  IDLEfork 954928.
2. Refactor EditorWindow.wakeup() to WindowList.ListedToplevel.wakeup() and
   clarify that the Toplevel of an EditorWindow is a WindowList.ListedToplevel.
3. Make a number of improvements to keyboard focus binding.  Improve window
   raising, especially in the debugger.  IDLEfork Bug 763524 (GvR list).
4. Bump idlever to 1.1a3

M Debugger.py
M EditorWindow.py
M FileList.py
M NEWS.txt
M PyShell.py
M WindowList.py
M idlever.py
2004-08-22 05:14:32 +00:00
Tim Peters e594bee535 _ellipsis_match(): Removed special-casing of "...\n". The semantics
are non-obvious either way because the newline character "is invisible",
but it's still there all the same, and it's easier to explain/predict
if that reality is left alone.
2004-08-22 01:47:51 +00:00
Johannes Gijsbers 6abc685a03 Patch #880621: the last message of a Babyl mailbox ends in '\037' instead of
'\037\014\n' (see http://quimby.gnus.org/notes/BABYL) so look for that as well,
so that applications won't get '\037' as the last line of the last message.
2004-08-21 12:30:26 +00:00
Johannes Gijsbers 6d63a8dd09 Patch #1011123: Use urllib.quote() instead of cgi.escape() for encoding the
href attribute in list_directory(). This fixes the links for legal Unix
filenames such as 'a"b'.
2004-08-21 10:43:29 +00:00
Tim Peters 037b3ee44e Patch 1012740: cStringIO's truncate doesn't
truncate() left the stream position unchanged, which meant the
"truncated" data didn't go away:

>>> io.write('abc')
>>> io.truncate(0)
>>> io.write('xyz')
>>> io.getvalue()
'abcxyz'

Patch by Dima Dorfman.
2004-08-21 06:55:43 +00:00
Martin v. Löwis 37af986ebf Bump minimum Python version to 2.1. Fixes #1009803. 2004-08-20 07:31:37 +00:00
Martin v. Löwis 61d77e0d97 Replace tricky and/or with straight-forward if:else: 2004-08-20 06:35:46 +00:00
Martin v. Löwis cd4d297a23 Remove debug print. 2004-08-20 06:19:23 +00:00
Tim Peters a45cacfc1c Whitespace normalization. 2004-08-20 03:47:14 +00:00
Tim Peters 8d7626c23f Stab at SF 1010777: test_queue fails occasionally
test_queue has failed occasionally for years, and there's more than one
cause.

The primary cause in the SF report appears to be that the test driver
really needs entirely different code for thread tests that expect to
raise exceptions than for thread tests that are testing non-exceptional
blocking semantics.  So gave them entirely different code, and added a
ton of explanation.

Another cause is that the blocking thread tests relied in several places
on the difference between sleep(.1) and sleep(.2) being long enough for
the trigger thread to do its stuff sot that the blocking thread could make
progress.  That's just not reliable on a loaded machine.  Boosted the 0.2's
to 10.0's instead, which should be long enough under any non-catastrophic
system conditions.  That doesn't make the test take longer to run, the 10.0
is just how long the blocking thread is *willing* to wait for the trigger
thread to do something.  But if the Queue module is plain broken, such
tests will indeed take 10 seconds to fail now.

For similar (heavy load) reasons, changed threaded-test termination to
be willing to wait 10 seconds for the signal thread to end too.
2004-08-20 03:27:12 +00:00
Tim Peters afe5297b8a Semantic-neutral format and comment changes. 2004-08-20 02:37:25 +00:00
Tim Peters b0a04e1592 Gave _ellipsis_match() an attractive new leading underscore. 2004-08-20 02:08:04 +00:00
Raymond Hettinger 27dbcf2162 Establish policies with respect to 2.3 compatibilty and treated spec
updates as bugfixes.
2004-08-19 22:39:55 +00:00
Raymond Hettinger 6114679099 SF bug #1012315: weakref.WeakValueDictionary should override .has_key()
* Check the found object for a None value during a contains/has_key
  lookup.  Perhaps it will help the OP who is likely suffering from an
  occassional GC or threading object deletion after self.data is checked.

* Complete the previous patch by removing the unnecessary indirection
  for weak dict iterators.  Makes the code cleaner and more readable.
2004-08-19 21:32:06 +00:00
Edward Loper 3a3817f506 Got rid of nooutput() (was used by DocTestCase.debug())
It's redundant, since no output is written anyway: DebugRunner doesn't
generate any output for failures and unexpected exceptions, and since
verbose=False, it won't generate any output for non-failures either.
2004-08-19 19:26:06 +00:00
Edward Loper b7503ff631 Updated __all__ to include every non-underscored class, function, and
constant defined by the module (except the test*() functions, which
should be integrated into test/test_doctest.py, anyway).
2004-08-19 19:19:03 +00:00
Tim Peters 026f8dc103 Now that they've settled down, document doctest directives. 2004-08-19 16:38:58 +00:00
Johannes Gijsbers 3caf9c1edd Port test_zipfile to unittest (patch #736962). 2004-08-19 15:11:50 +00:00
Tim Peters dc5de3bab2 ellipsis_match(): Changed treatment of start- and end-of-string exact
matches to be symmetric.  This makes the algorithm easier to understand.
2004-08-19 14:06:20 +00:00
Tim Peters 26b3ebb515 Replaced the ELLIPSIS implementation with a worst-case linear-time one. 2004-08-19 08:10:08 +00:00
Tim Peters 1cf3aa6e66 ELLIPSIS implementation: an ellipsis couldn't match nothing if it
appeared at the end of a line.  Repaired that.  Also noted that it's
too easy to provoke this implementation into requiring exponential
time, and especially when a test fails.  I'll replace the implementation
with an always-efficient one later.
2004-08-19 06:49:33 +00:00
Brett Cannon caa9798410 Rewrite test_order so as to be more "proper". Originally relied on an
error based on decorating with staticmethod too soon for the code to execute.
This meant that if the test didn't pass it just errored out.  Now if the test
doesn't pass it leads to a failure instead.
2004-08-19 03:48:24 +00:00
Martin v. Löwis babc5ec630 Expand tabs. 2004-08-18 17:47:40 +00:00
Hye-Shik Chang f64700a512 Add support for FreeBSD 6. 2004-08-18 15:13:41 +00:00
Martin v. Löwis 75b9da4aaf Patch #995126: Correct directory size, and generate GNU tarfiles by default. 2004-08-18 13:57:44 +00:00
Martin v. Löwis deacce2c87 Patch #800236: add HTTPResponse.getheaders(). 2004-08-18 12:46:26 +00:00
Johannes Gijsbers c473c99d16 Patch #1006219: let inspect.getsource show '@' decorators and add tests for
this (which are rather ugly, but it'll have to do until test_inspect gets a
major overhaul and a conversion to unittest). Thanks Simon Percivall!
2004-08-18 12:40:31 +00:00
Martin v. Löwis 318a12eb01 Patch #791776: Replace SMTPHandler.date_time with email.Utils.formatdate. 2004-08-18 12:27:40 +00:00
Martin v. Löwis fe84d17a6a Patch #764217: Add nametofont function, exists parameter. 2004-08-18 11:06:45 +00:00
Michael W. Hudson 0ccff074cd This is Mark Russell's patch:
[ 1009560 ] Fix @decorator evaluation order

From the description:

Changes in this patch:

- Change Grammar/Grammar to require
newlines between adjacent decorators.

- Fix order of evaluation of decorators
in the C (compile.c) and python
(Lib/compiler/pycodegen.py) compilers

- Add better order of evaluation check
to test_decorators.py (test_eval_order)

- Update the decorator documentation in
the reference manual (improve description
of evaluation order and update syntax
description)

and the comment:

Used Brett's evaluation order (see
http://mail.python.org/pipermail/python-dev/2004-August/047835.html)

(I'm checking this in for Anthony who was having problems getting SF to
talk to him)
2004-08-17 17:29:16 +00:00
Edward Loper b51b23405b Fixed bug in line-number finding for examples (DocTestParser wasn't
updating line numbers correctly for bare prompts & examples containing
only comments).
2004-08-17 16:37:12 +00:00
Raymond Hettinger f04d8a8898 There are no longer any special case test skips. 2004-08-17 16:34:51 +00:00
Raymond Hettinger 673cb28b2a Remove test of obsolete trim() operation which was supplanted by
normalize() in Draft 1.06 (9 October 2002):

  The normalize operation has been added; it reduces a number to a
  canonical form.  (This replaces the trim operator, which only
  removed trailing fractional zeros.)
2004-08-17 16:27:04 +00:00
Johannes Gijsbers e7691d36b7 Use readline/raw_input() in pydoc.Helper.interact if available and self.input
is sys.stdin. Based on a patch (#726204) by Dmitry Vasiliev and a comment from
Guido in an older patch (#549901).
2004-08-17 13:21:53 +00:00
Thomas Heller 30d0008577 The get_installer_filename() method forgot to return the name it
calculates.  Spotted by Cort Danger Stratton.
2004-08-17 10:15:07 +00:00
Raymond Hettinger 1f65b472c3 SF bug #833957: Ctrl+key combos stop working in IDLE
Make key combinations work with upper and lowercase as is the MS standard.
2004-08-17 08:01:19 +00:00
Raymond Hettinger ba4e47db57 This file is no longer used in version 2.39.
Was supplanted by tointegral.decTest.
2004-08-17 06:56:25 +00:00
Raymond Hettinger 3ee3ed2e80 Add two new files and update remaining tests from the latest update of the
test suite in version 2.39 of dectest.zip.
2004-08-17 06:42:13 +00:00
Raymond Hettinger d6c700a320 Revise max() and min() to comply with the 8/2/2004 update to the specification
(version 1.45):

The max and min operations follow the rules in the current IEEE 754 revision draft:
if one operand is a quiet NaN and the other is number, then the number is always returned
if both operands are finite and equal in numerical value then an ordering is applied:
    if the signs differ then max returns the operand with the positive sign and
    min returns the operand with the negative sign; if the signs are the same then
    the exponent is used to select the result.
2004-08-17 06:39:37 +00:00
Raymond Hettinger f63ba43733 * Dynamically build a list of files to be tested (necessary because
version 2.39 of dectest.zip adds some new test files and because
  some existing test files were getting skipped).
* Remove two docstrings which cluttered unittest's output.
* Simplify a for-loop with a list comprehension.
2004-08-17 05:42:09 +00:00