Tim Peters [Sun, 22 Aug 2004 20:51:53 +0000 (20:51 +0000)]
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.
Kurt B. Kaiser [Sun, 22 Aug 2004 05:14:32 +0000 (05:14 +0000)]
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
Tim Peters [Sun, 22 Aug 2004 01:47:51 +0000 (01:47 +0000)]
_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.
Neal Norwitz [Sat, 21 Aug 2004 15:13:52 +0000 (15:13 +0000)]
sf #1009373, #1005936. fix underscores in index entries in PDF files.
I couldn't test this, but it didn't break anything and the patch
reported fixed the problem.
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.
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'.
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.
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.
Edward Loper [Thu, 19 Aug 2004 19:26:06 +0000 (19:26 +0000)]
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.
Edward Loper [Thu, 19 Aug 2004 19:19:03 +0000 (19:19 +0000)]
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).
Hye-Shik Chang [Thu, 19 Aug 2004 17:52:37 +0000 (17:52 +0000)]
Bug #1005737, #1007249: Fix several build problems and warnings
found on old/legacy C compilers of HP-UX, IRIX and Tru64. (Reported
by roadkill, Richard Townsend, Maik Hertha and Minsik Kim)
Hye-Shik Chang [Thu, 19 Aug 2004 17:49:56 +0000 (17:49 +0000)]
Bug #1005737, #1007249: Fix several build problems and warnings
found on legacy C compilers of HP-UX, IRIX and Tru64. (Reported
by roadkill, Richard Townsend, Maik Hertha and Minsik Kim)
Tim Peters [Thu, 19 Aug 2004 06:49:33 +0000 (06:49 +0000)]
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.
Brett Cannon [Thu, 19 Aug 2004 03:48:24 +0000 (03:48 +0000)]
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.
Fred Drake [Thu, 19 Aug 2004 01:37:48 +0000 (01:37 +0000)]
fix SF bug #1008690: Incorrect <link rel="index"> href in Tutorial
The make_head_and_body() function used a hardcoded value for the
<link> element for the index; this patch causes the proper output
filename to be captured during the transformation phase so it can be
used during the page assembly phase.
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!
Move the bytecode optimizer upstream so that its results are saved in pyc
files and not re-optimized upon import. Saves a bit of startup time while
still remaining decoupled from the rest of the compiler.
As a side benefit, handcoded bytecode is not run through the optimizer
when new code objects are created. Hopefully, a handcoder has already
created exactly what they want to have run.
(Idea suggested by Armin Rigo and Michael Hudson. Initially avoided
because of worries about compiler coupling; however, only the nexus
point needed to be moved so there won't be a conflict when the AST
branch is loaded.)
Deprecate sys.exitfunc in favor of the atexit module.
Per Guido, sys.exitfunc will be kept around for backwards compatability
but atexit will become the one preferred way to do it.
Edward Loper [Tue, 17 Aug 2004 16:37:12 +0000 (16:37 +0000)]
Fixed bug in line-number finding for examples (DocTestParser wasn't
updating line numbers correctly for bare prompts & examples containing
only comments).
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.)
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).
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.
* 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.
SF bug #805304: super instances don't support item assignment
Document a nuance of super(). It is designed to work well with dotted
attribute lookup but not with equivalent implicit lookups using operators
or statements.
Matthias Klose [Mon, 16 Aug 2004 11:35:51 +0000 (11:35 +0000)]
The attached patch fixes FTBFS on GNU/k*BSD. The problem happens on GNU/k*BSD
because GNU/k*BSD uses gnu pth to provide pthreads, but will also happen on any
system that does the same.
python fails to build because it doesn't detect gnu pth in pthread
emulation. See C comments in patch for details.
* Mention the use case of I/O running concurrent with a computational
thread.
* Be a tad more forceful about recommending Queue over other approaches
to synchonization.
* Eliminate discussion around having a single interpreter. This is a
more advanced discussion that belongs in the library reference and
in a section on extending and embedding.
* Discuss representation error versus loss of significance.
* Document special values including qNaN, sNaN, +0, -0.
* Show the suprising display of non-normalized zero values.
Skip Montanaro [Sun, 15 Aug 2004 14:32:06 +0000 (14:32 +0000)]
Add get_history_item and replace_history_item functions to the readline
module. Closes patch #675551. My apologies to Michal Vitecek for taking so
long to process this.
bug #989672: pdb.doc and the help messages for the help_d and help_u methods
of the pdb.Pdb class gives have been corrected. d(own) goes to a newer frame,
u(p) to an older frame, not the other way around.
bug #990669: os.path.realpath() will resolve symlinks before normalizing the
path, as normalizing the path may alter the meaning of the path if it contains
symlinks.
Also add tests for infinite symlink loops and parent symlinks that need to be
resolved.
bug 990669: os.path.normpath may alter the meaning of a path if it contains
symbolic links. This has been documented in a comment since 1992, but is now in
the library reference as well.