]> granicus.if.org Git - python/log
python
25 years agoFurther clarfication of the system-dependence of the system() return
Fred Drake [Fri, 18 Jun 1999 19:11:25 +0000 (19:11 +0000)]
Further clarfication of the system-dependence of the system() return
value, based on comments from Tim Peters.

25 years agoRelocating file to Lib/lib-old.
Fred Drake [Fri, 18 Jun 1999 17:12:36 +0000 (17:12 +0000)]
Relocating file to Lib/lib-old.

25 years agoRe-categorize the dump module as obsolete.
Fred Drake [Fri, 18 Jun 1999 17:12:15 +0000 (17:12 +0000)]
Re-categorize the dump module as obsolete.

25 years agofpformat has been documented for at least a week now!
Fred Drake [Fri, 18 Jun 1999 15:21:25 +0000 (15:21 +0000)]
fpformat has been documented for at least a week now!

25 years agoCRITICAL PATCH!
Guido van Rossum [Fri, 18 Jun 1999 14:22:24 +0000 (14:22 +0000)]
CRITICAL PATCH!

We occasionally received reports from people getting "invalid tstate"
crashes (this is a fatal error in PyThreadState_Delete()).  Finally
several people were able to reproduce it reliably and Tim Peters
discovered that there is a race condition when multiple threads are
calling this function without holding the global interpreter lock (the
function may be called without holding that).

Solved the race condition by adding a lock around the mutating uses of
interp->tstate_head.  Tim and Jonathan Giddy have run tests that make
it likely that this fixes the crashes -- although Tim hasn't heard
from the person who reported the original problem.

25 years ago# Darn! Local variable l declared but not used in abstract_issubclass().
Guido van Rossum [Thu, 17 Jun 1999 19:12:39 +0000 (19:12 +0000)]
# Darn!  Local variable l declared but not used in abstract_issubclass().

25 years agoSmall markup & usage adjustments.
Fred Drake [Thu, 17 Jun 1999 18:58:02 +0000 (18:58 +0000)]
Small markup & usage adjustments.

25 years agoWhen looking for things that might be modules, include *module.c from
Fred Drake [Thu, 17 Jun 1999 18:49:18 +0000 (18:49 +0000)]
When looking for things that might be modules, include *module.c from
the Modules/ directory.  Most of the remaining undocumented modules
seem to be living there.

25 years agoPatch suggested (and partially provided) by Lars Damerow: instead of
Guido van Rossum [Thu, 17 Jun 1999 18:41:42 +0000 (18:41 +0000)]
Patch suggested (and partially provided) by Lars Damerow: instead of
always lowercasing the option name, call a method optionxform() which
can be overridden.  Also make the regexps SECTRE and OPTRE non-private
variables so they can also be overridden.

25 years agoCorrection: the parameters of new.instance() are type-checked.
Fred Drake [Thu, 17 Jun 1999 18:15:07 +0000 (18:15 +0000)]
Correction: the parameters of new.instance() are type-checked.

Edited several of the descriptions for English usage and more
consistent style.

25 years agoUpdated version from Moshe, with a re-written warning about the
Fred Drake [Thu, 17 Jun 1999 17:40:52 +0000 (17:40 +0000)]
Updated version from Moshe, with a re-written warning about the
side-effect of cmpcache.cmp() using statcache.stat() internally.

25 years agoMinor markup nits.
Fred Drake [Thu, 17 Jun 1999 17:09:23 +0000 (17:09 +0000)]
Minor markup nits.

25 years agoSmall English usage nits.
Fred Drake [Thu, 17 Jun 1999 16:38:18 +0000 (16:38 +0000)]
Small English usage nits.

25 years agoSmall markup and English usage nits.
Fred Drake [Thu, 17 Jun 1999 16:10:39 +0000 (16:10 +0000)]
Small markup and English usage nits.

25 years agoIn collect_children(), put a try-except around os.waitpid() because it
Guido van Rossum [Thu, 17 Jun 1999 15:41:33 +0000 (15:41 +0000)]
In collect_children(), put a try-except around os.waitpid() because it
may raise an exception (when there are no children).  Reported by
Andy Dustman.

25 years agoAdd reminder that wave.open() documentation should be updated for the
Fred Drake [Thu, 17 Jun 1999 15:20:44 +0000 (15:20 +0000)]
Add reminder that wave.open() documentation should be updated for the
next Python release.

25 years agoopen(): Make the mode parameter optional; if omitted or None, use the
Fred Drake [Thu, 17 Jun 1999 15:18:47 +0000 (15:18 +0000)]
open():  Make the mode parameter optional; if omitted or None, use the
 mode attribute of the file object (if it has one), otherwise
 use 'rb'.

 The documentation should still show this as required until
 there's a new release.

25 years agoAdd entries due to additional sections from Moshe.
Fred Drake [Thu, 17 Jun 1999 15:12:50 +0000 (15:12 +0000)]
Add entries due to additional sections from Moshe.

25 years agoAdd/remove entries due to additional sections from Moshe.
Fred Drake [Thu, 17 Jun 1999 15:12:16 +0000 (15:12 +0000)]
Add/remove entries due to additional sections from Moshe.

25 years agoNew module documentation sections from Moshe Zadka <moshez@math.huji.ac.il>!
Fred Drake [Thu, 17 Jun 1999 15:11:35 +0000 (15:11 +0000)]
New module documentation sections from Moshe Zadka <moshez@math.huji.ac.il>!

25 years agoPatch by Jim Fulton (code style tweaked a bit) to support
Guido van Rossum [Wed, 16 Jun 1999 17:28:37 +0000 (17:28 +0000)]
Patch by Jim Fulton (code style tweaked a bit) to support
ExtensionClasses in isinstance() and issubclass().

  - abstract instance and class protocols are used *only* in those
    cases that would generate errors before the patch.  That is, there's
    no penalty for the normal case.

  - instance protocol: an object smells like an instance if it
    has a __class__ attribute that smells like a class.

  - class protocol: an object smells like a class if it has a
    __bases__ attribute that is a tuple with elements that
    smell like classes (although not all elements may actually get
    sniffed ;).

25 years agoSuppress warning print statements about modules not found, they are
Guido van Rossum [Wed, 16 Jun 1999 12:28:12 +0000 (12:28 +0000)]
Suppress warning print statements about modules not found, they are
confusing to end users of IDEs.

25 years agoSjoerd Mullender:
Guido van Rossum [Wed, 16 Jun 1999 12:25:34 +0000 (12:25 +0000)]
Sjoerd Mullender:

Added support for unseekable files.

(I use unqualified excepts since we don't know why the seek/tell might
fail.  In my case it was because of an AttributeError.)

25 years agoLaurence Tratt notes that the accept() call in get_request() can fail,
Guido van Rossum [Tue, 15 Jun 1999 22:25:32 +0000 (22:25 +0000)]
Laurence Tratt notes that the accept() call in get_request() can fail,
and suggests putting a try/except around the get_request() call in
handle_request().  (All in class TCPServer.)

25 years agoAdded note to __not__() description that this operation is defined
Fred Drake [Tue, 15 Jun 1999 20:56:40 +0000 (20:56 +0000)]
Added note to __not__() description that this operation is defined
only by the interpreter core and is not overridable by objects.

Based on comment from David Ascher on the list.

25 years agoAdd the test case provided by Barry Scott for his patch.
Guido van Rossum [Tue, 15 Jun 1999 18:56:46 +0000 (18:56 +0000)]
Add the test case provided by Barry Scott for his patch.

25 years agoBarry Scott writes:
Guido van Rossum [Tue, 15 Jun 1999 18:06:20 +0000 (18:06 +0000)]
Barry Scott writes:

Problem: rfc822.py in 1.5.2 final loses the quotes around
quoted local-part names.

The fix is to preserve the quotes around a local-part
name in an address.

Test:

import rfc822
a = rfc822.AddrlistClass('(Comment stuff) "Quoted
name"@somewhere.com')
a.getaddrlist()

The correct result is:

[('Comment stuff', '"Quoted name"@somewhere.com')]

25 years agoSeveral new index entries to make find this easier.
Fred Drake [Tue, 15 Jun 1999 17:30:59 +0000 (17:30 +0000)]
Several new index entries to make find this easier.

Noted that name=value is allowed in addition to name: value.

25 years agoAdded a couple of endswith test cases for bugs reported by Timbot.
Barry Warsaw [Tue, 15 Jun 1999 16:49:11 +0000 (16:49 +0000)]
Added a couple of endswith test cases for bugs reported by Timbot.

Also added a short circuit for the regression test suite since CVS
insisted on putting this file in the main branch. :(

25 years agoNew version from Jim:
Guido van Rossum [Tue, 15 Jun 1999 14:36:59 +0000 (14:36 +0000)]
New version from Jim:

- Don't call Py_FatalError() when initialization fails.

- Fix bogus use of return value from PyRun_String().

- Fix misc. compiler errors on some platforms.

25 years agoNew version from Jim: don't call Py_FatalError() when initialization fails.
Guido van Rossum [Tue, 15 Jun 1999 14:35:48 +0000 (14:35 +0000)]
New version from Jim: don't call Py_FatalError() when initialization fails.

25 years agoAdded entries for new sections from Moshe.
Fred Drake [Mon, 14 Jun 1999 19:52:10 +0000 (19:52 +0000)]
Added entries for new sections from Moshe.

25 years agoMisc. changes related to the new sections.
Fred Drake [Mon, 14 Jun 1999 19:49:50 +0000 (19:49 +0000)]
Misc. changes related to the new sections.

25 years agoNew sections from Moshe Zadka <moshez@math.huji.ac.il>.
Fred Drake [Mon, 14 Jun 1999 19:47:47 +0000 (19:47 +0000)]
New sections from Moshe Zadka <moshez@math.huji.ac.il>.
These document CGIHTTPServer, SimpleHTTPServer, and linecache.

25 years agoAdded more tests of join
Barry Warsaw [Mon, 14 Jun 1999 18:38:42 +0000 (18:38 +0000)]
Added more tests of join

25 years agoMessage.getheaders(): If there are no matching headers, return an
Fred Drake [Mon, 14 Jun 1999 15:40:23 +0000 (15:40 +0000)]
Message.getheaders():  If there are no matching headers, return an
       empty list instead of None.  (Guido's request.)

25 years agoAdd entry for the fpformat module.
Fred Drake [Fri, 11 Jun 1999 18:36:42 +0000 (18:36 +0000)]
Add entry for the fpformat module.

25 years agoDocumentation for the fpformat module by Moshe Zadka
Fred Drake [Fri, 11 Jun 1999 18:31:00 +0000 (18:31 +0000)]
Documentation for the fpformat module by Moshe Zadka
<mzadka@geocities.com>.

25 years agoAdded 'ce' to the list of "registered" values for os.name.
Fred Drake [Fri, 11 Jun 1999 18:28:37 +0000 (18:28 +0000)]
Added 'ce' to the list of "registered" values for os.name.

Make references to the posix module hyperlinks.

25 years agoAfter more discussion with Jim, change the behavior so that only a
Guido van Rossum [Fri, 11 Jun 1999 18:26:09 +0000 (18:26 +0000)]
After more discussion with Jim, change the behavior so that only a
*missing* content-type at the outer level of a POST defaults to
urlencoded.  In all other circumstances, the default is read_singe().

25 years agoTwo extra startswith tests
Barry Warsaw [Fri, 11 Jun 1999 17:51:13 +0000 (17:51 +0000)]
Two extra startswith tests

25 years agoHarness can now test object methods directly, if they aren't available
Barry Warsaw [Fri, 11 Jun 1999 17:48:07 +0000 (17:48 +0000)]
Harness can now test object methods directly, if they aren't available
in the string module.

Add a bunch of new tests for extended startswith/endswith arguments.

25 years agoTim Peters smart.patch:
Guido van Rossum [Fri, 11 Jun 1999 15:03:00 +0000 (15:03 +0000)]
Tim Peters smart.patch:

EditorWindow.py:

+ Added get_tabwidth & set_tabwidth "virtual text" methods, that get/set the
widget's view of what a tab means.

+ Moved TK_TABWIDTH_DEFAULT here from AutoIndent.

+ Renamed Mark's get_selection_index to get_selection_indices (sorry, Mark,
but the name was plain wrong <wink>).

FormatParagraph.py:  renamed use of get_selection_index.

AutoIndent.py:

+ Moved TK_TABWIDTH_DEFAULT to EditorWindow.

+ Rewrote set_indentation_params to use new VTW get/set_tabwidth methods.

+ Changed smart_backspace_event to delete whitespace back to closest
preceding virtual tab stop or real character (note that this may require
inserting characters if backspacing over a tab!).

+ Nuked almost references to the selection tag, in favor of using
get_selection_indices.  The sole exception is in set_region, for which no
"set_selection" abstraction has yet been agreed upon.

+ Had too much fun using the spiffy new features of the format-paragraph
cmd.

25 years agoLast night's scribbles:
Fred Drake [Fri, 11 Jun 1999 14:25:45 +0000 (14:25 +0000)]
Last night's scribbles:

- Revise abstract based on Guido's comments from way back.
- Point out that LaTeX is a structured system & we're using it that
  way.
- Add a small section on marking up code examples.

25 years agoMark Hammond: patch for Windows/CE.
Guido van Rossum [Fri, 11 Jun 1999 01:37:27 +0000 (01:37 +0000)]
Mark Hammond: patch for Windows/CE.

25 years agoOutput for the regression test of the new string methods.
Barry Warsaw [Thu, 10 Jun 1999 22:53:23 +0000 (22:53 +0000)]
Output for the regression test of the new string methods.

25 years agoRegression test for the new string methods.
Barry Warsaw [Thu, 10 Jun 1999 22:53:10 +0000 (22:53 +0000)]
Regression test for the new string methods.

25 years agoSome clarifications on operations for mapping types, based on comments
Fred Drake [Thu, 10 Jun 1999 22:37:34 +0000 (22:37 +0000)]
Some clarifications on operations for mapping types, based on comments
from Gerry Weiner <gerry@ucar.edu>.

25 years agoAdjust indexing for __import__(); based on comments by Stefan Franke
Fred Drake [Thu, 10 Jun 1999 22:09:20 +0000 (22:09 +0000)]
Adjust indexing for __import__(); based on comments by Stefan Franke
<sfranke@cdc-group.com>.

25 years agoImprove index entry for "import"; responding to comments by Stefan
Fred Drake [Thu, 10 Jun 1999 22:08:16 +0000 (22:08 +0000)]
Improve index entry for "import"; responding to comments by Stefan
Franke <sfranke@cdc-group.com>.

25 years agoWork around latex2html problem; reported by Gerrit Holl
Fred Drake [Thu, 10 Jun 1999 21:23:31 +0000 (21:23 +0000)]
Work around latex2html problem; reported by Gerrit Holl
<gerrit.holl@pobox.com>.

25 years agoRelocating file to Lib/lib-old.
Fred Drake [Thu, 10 Jun 1999 21:18:02 +0000 (21:18 +0000)]
Relocating file to Lib/lib-old.

25 years agoDeclare the "util" module obsolete.
Fred Drake [Thu, 10 Jun 1999 21:17:11 +0000 (21:17 +0000)]
Declare the "util" module obsolete.

25 years agoAdded a few more bugs to the doc string; reformatted existing bugs.
Guido van Rossum [Thu, 10 Jun 1999 19:05:54 +0000 (19:05 +0000)]
Added a few more bugs to the doc string; reformatted existing bugs.

25 years agoCode by Mark Hammond to format paragraphs embedded in comments.
Guido van Rossum [Thu, 10 Jun 1999 17:48:02 +0000 (17:48 +0000)]
Code by Mark Hammond to format paragraphs embedded in comments.
Read the comments (which I reformatted using the new feature :-)
for some limitations.

25 years agoAdded abstraction get_selection_index() (Mark Hammond). Also
Guido van Rossum [Thu, 10 Jun 1999 17:43:17 +0000 (17:43 +0000)]
Added abstraction get_selection_index() (Mark Hammond).  Also
reformatted some comment blocks to show off a cool feature I'm about
to check in next.

25 years agoFixed typo reported by Bennett Benson
Fred Drake [Thu, 10 Jun 1999 15:30:21 +0000 (15:30 +0000)]
Fixed typo reported by Bennett Benson
<BennettBenson@mn.mediaone.net>.

25 years agoAdapt to the new pyclbr's support of listing top-level functions. If
Guido van Rossum [Thu, 10 Jun 1999 15:19:14 +0000 (15:19 +0000)]
Adapt to the new pyclbr's support of listing top-level functions.  If
this functionality is not present (e.g. when used with a vintage
Python 1.5.2 installation) top-level functions are not listed.

(Hmm...  Any distribution of IDLE 0.5 should probably include a copy
of the new pyclbr.py!)

25 years agoAt David Ascher's request, clarify that os.system() always returns 0
Fred Drake [Thu, 10 Jun 1999 15:07:05 +0000 (15:07 +0000)]
At David Ascher's request, clarify that os.system() always returns 0
on Win95 & Win98.

25 years agoFix typo reported by Robert Kern <kernr@ncifcrf.gov>.
Fred Drake [Thu, 10 Jun 1999 15:03:07 +0000 (15:03 +0000)]
Fix typo reported by Robert Kern <kernr@ncifcrf.gov>.

25 years agoFix off-by-one error in Tim's recent change to comment_region(): the
Guido van Rossum [Thu, 10 Jun 1999 14:44:48 +0000 (14:44 +0000)]
Fix off-by-one error in Tim's recent change to comment_region(): the
list of lines returned by get_region() contains an empty line at the
end representing the start of the next line, and this shouldn't be
commented out!

25 years agoCo-production with Tim Peters, implementing a suggestion by Mark
Guido van Rossum [Thu, 10 Jun 1999 14:39:39 +0000 (14:39 +0000)]
Co-production with Tim Peters, implementing a suggestion by Mark
Hammond: record top-level functions (as Function instances, a simple
subclass of Class).  You must use the new interface readmodule_ex() to
get these, though.

25 years agoMark Hammond writes: Here is another change that allows it to work for
Guido van Rossum [Thu, 10 Jun 1999 14:20:26 +0000 (14:20 +0000)]
Mark Hammond writes: Here is another change that allows it to work for
class creation - tries to locate an __init__ function.  Also updated
the test code to reflect your new "***" change.

25 years agoMark Hammond writes: Tim's suggestion of copying the font for the
Guido van Rossum [Thu, 10 Jun 1999 14:19:46 +0000 (14:19 +0000)]
Mark Hammond writes: Tim's suggestion of copying the font for the
CallTipWindow from the text control makes sense, and actually makes
the control look better IMO.

25 years agoPatch by Jim Fulton to document the new parse_qls().
Guido van Rossum [Thu, 10 Jun 1999 03:11:41 +0000 (03:11 +0000)]
Patch by Jim Fulton to document the new parse_qls().

25 years agoAppend "..." if the appropriate flag (for varargs) in co_flags is set.
Guido van Rossum [Wed, 9 Jun 1999 20:34:57 +0000 (20:34 +0000)]
Append "..." if the appropriate flag (for varargs) in co_flags is set.
Ditto "***" for kwargs.

25 years agoFix bug discovered by Klaus-Juergen Wolf -- it runs into infinite recursion!
Guido van Rossum [Wed, 9 Jun 1999 19:07:22 +0000 (19:07 +0000)]
Fix bug discovered by Klaus-Juergen Wolf -- it runs into infinite recursion!

25 years agoFix by Sjoerd for a package related bug: If you have a non-empy
Guido van Rossum [Wed, 9 Jun 1999 15:49:09 +0000 (15:49 +0000)]
Fix by Sjoerd for a package related bug: If you have a non-empy
__init__.py it isn't read.  (Sjoerd just came up with this, so it's
not heavily tested.)

Other (yet unsolved) package problems noted by Sjoerd:

- If you have a package and a module inside that or another package
  with the same name, module caching doesn't work properly since the
  key is the base name of the module/package.
- The only entry that is returned when you readmodule a package is a
  __path__ whose value is a list which confuses certain class browsers
  that I wrote.  (Hm, this could be construed as a feature.)

25 years agoSet the max recursion limit to 5000 -- rather conservative (this uses
Guido van Rossum [Wed, 9 Jun 1999 15:36:37 +0000 (15:36 +0000)]
Set the max recursion limit to 5000 -- rather conservative (this uses
0.5 MB of the 1 MB available by default for stack on Win32 platforms).

25 years agoJim Fulton writes:
Guido van Rossum [Wed, 9 Jun 1999 15:23:31 +0000 (15:23 +0000)]
Jim Fulton writes:

I've updated cPickle.c to use class exceptions:

Changed pickle error types to classes:

  PickleError
     PicklingError
        UnpickleableError
     UnpicklingError

And change the handling of unpickleable objects so that an UnpickleableError
is raised with the unpickleable object as the argument.  UnpickleableError
has a reasonable string representation and provides access to the problem
object, which is useful during debugging.

[I'm still waiting for patches to do the same to pickle.py.]

25 years agoWhen deallocating a list, DECREF the items from the end back to the start.
Guido van Rossum [Wed, 9 Jun 1999 15:19:34 +0000 (15:19 +0000)]
When deallocating a list, DECREF the items from the end back to the start.

25 years agoSet PATCHLEVEL and PY_VERSION (string version only) to 1.5.2+ to
Guido van Rossum [Wed, 9 Jun 1999 15:16:18 +0000 (15:16 +0000)]
Set PATCHLEVEL and PY_VERSION (string version only) to 1.5.2+ to
indicate to those that are using the CVS access that they are using a
newer-than-1.2.5 version, without committing to a particular version
number or patch level.

25 years agoUpdated lagging version#. Also added some comments about how quote()
Guido van Rossum [Wed, 9 Jun 1999 15:14:50 +0000 (15:14 +0000)]
Updated lagging version#.  Also added some comments about how quote()
and quote_plus() can be optimized tenfold.

25 years agoPatch by Per Cederqvist:
Guido van Rossum [Wed, 9 Jun 1999 15:13:10 +0000 (15:13 +0000)]
Patch by Per Cederqvist:

I've found two places where smtplib.py sends an extra trailing space
on command lines to the SMTP server.  I don't know if this ever causes
any problems, but I'd prefer to be on the safe side.  The enclosed
patch removes the extra space.

25 years agoAdd doc for timegm().
Guido van Rossum [Wed, 9 Jun 1999 15:11:58 +0000 (15:11 +0000)]
Add doc for timegm().

25 years agoAdd unrelated but handy function: timegm(), to calculate Unix
Guido van Rossum [Wed, 9 Jun 1999 15:07:38 +0000 (15:07 +0000)]
Add unrelated but handy function: timegm(), to calculate Unix
timestamp from GMT tuple.

25 years agoDon't just die if gethostbyaddr() fails -- as it can when DNS is
Guido van Rossum [Wed, 9 Jun 1999 15:05:47 +0000 (15:05 +0000)]
Don't just die if gethostbyaddr() fails -- as it can when DNS is
unreachable -- but fall back to using whatever hostname we have.

25 years agoOops, Sjoerd was in a hurry. This patch from him fixes some length
Guido van Rossum [Wed, 9 Jun 1999 13:41:18 +0000 (13:41 +0000)]
Oops, Sjoerd was in a hurry.  This patch from him fixes some length
math in the Chunk class.

25 years agoPatch/new code by Sjoerd Mullender:
Guido van Rossum [Wed, 9 Jun 1999 13:32:28 +0000 (13:32 +0000)]
Patch/new code by Sjoerd Mullender:
Separate the Chunk class out of the aifc module into a new "chunk" module.

25 years agoFix (sanctioned by Sjoerd) for a problem reported by Andreas Faerber:
Guido van Rossum [Tue, 8 Jun 1999 21:23:26 +0000 (21:23 +0000)]
Fix (sanctioned by Sjoerd) for a problem reported by Andreas Faerber:
all processing instruction target names containing 'xml' were
rejected, instead (as the standard rejects) only the name 'xml' itself
(or case variants thereof).

25 years agoOn David Ascher's recommendation: reversed order of 'utime()' and
Greg Ward [Tue, 8 Jun 1999 17:05:21 +0000 (17:05 +0000)]
On David Ascher's recommendation: reversed order of 'utime()' and
'chmod()' in 'copy_file()'.

25 years agoSam's latest versions
Guido van Rossum [Tue, 8 Jun 1999 13:20:05 +0000 (13:20 +0000)]
Sam's latest versions

25 years agoSkip Montanaro:
Guido van Rossum [Tue, 8 Jun 1999 13:13:16 +0000 (13:13 +0000)]
Skip Montanaro:

I guess in 1.5.2 a new module, whichdb, was added that attempts to
divine the nature of a database file.  This module doesn't know anything
about Berkeley DB v2 files.  In v2, Sleepycat added a 12-byte null pad
in front of the old magic numbers (at least for hash and btree files).
I've been using v2 for awhile and upgrading to 1.5.2 broke all my
anydbm.open calls. I believe the following patch corrects the problem.

25 years agoHmm... Tim didn't turn "replace all" into a single undo block.
Guido van Rossum [Tue, 8 Jun 1999 13:06:07 +0000 (13:06 +0000)]
Hmm...  Tim didn't turn "replace all" into a single undo block.
I think I like it better if it os, so here.

25 years agoTim Peters: made replacement atomic for undo/redo.
Guido van Rossum [Tue, 8 Jun 1999 12:54:56 +0000 (12:54 +0000)]
Tim Peters: made replacement atomic for undo/redo.

25 years agoTim Peters:
Guido van Rossum [Tue, 8 Jun 1999 12:54:23 +0000 (12:54 +0000)]
Tim Peters:

+ Set usetabs=1.  Editing pyclbr.py was driving me nuts <0.6 wink>.
usetabs=1 is the Emacs pymode default too, and thanks to indentwidth !=
tabwidth magical usetabs disabling, new files are still created with tabs
turned off.  The only implication is that if you open a file whose first
indent is a single tab, IDLE will now magically use tabs for that file (and
set indentwidth to 8).  Note that the whole scheme doesn't work right for
PythonWin, though, since Windows users typically set tabwidth to 4; Mark
probably has to hide the IDLE algorithm from them (which he already knows).

+ Changed comment_region_event to stick "##" in front of every line.  The
"holes" previously left on blank lines were visually confusing (made it
needlessly hard to figure out what to uncomment later).

25 years agoTim Peters: Taught it more "real Python" rules without slowing it
Guido van Rossum [Tue, 8 Jun 1999 12:53:21 +0000 (12:53 +0000)]
Tim Peters: Taught it more "real Python" rules without slowing it
appreciably.  Triple-quoted strings no longer confuse it, nor nested
classes or defs, nor comments starting in column 1.  Chews thru
Tkinter.py in < 3 seconds for me; doctest.py no longer confuses it; no
longer missing methods in PyShell.py; etc.  Also captures defs
starting in column 1 now, but ignores them; an interface should be
added so that IDLE's class browser can show the top-level functions
too.

25 years agoHacked 'set_final_options()' to set (hopefully) appropriate values for
Greg Ward [Tue, 8 Jun 1999 02:04:36 +0000 (02:04 +0000)]
Hacked 'set_final_options()' to set (hopefully) appropriate values for
'install_site_lib' and install_site_platlib' on non-POSIX platforms.
Should at least work for NT, as this is adopted from Amos Latteier's NT
patches.  Also added extensive comments bitching about the inadequacy of
the current model, both under POSIX and NT (and probably other) systems.

25 years agoAdded the 'have_run' dictionary to Distribution, and changed
Greg Ward [Tue, 8 Jun 1999 02:02:00 +0000 (02:02 +0000)]
Added the 'have_run' dictionary to Distribution, and changed
  'run_command()' to refer to it before attempting to run a command --
  that way, command classes can freely invoke other commands without fear
  of duplicate execution.
Beefed up some comments and docstrings.

25 years agoNow handles NT, through '_init_nt()' function (courtesy of
Greg Ward [Tue, 8 Jun 1999 01:58:36 +0000 (01:58 +0000)]
Now handles NT, through '_init_nt()' function (courtesy of
Amos Latteier <amos@aracnet.com>).

25 years agoRemove unnecessary reference to pyclbr from test() code.
Guido van Rossum [Mon, 7 Jun 1999 15:38:40 +0000 (15:38 +0000)]
Remove unnecessary reference to pyclbr from test() code.

25 years agoExperimental speedup patch by Tim Peters (please test!):
Guido van Rossum [Mon, 7 Jun 1999 15:25:18 +0000 (15:25 +0000)]
Experimental speedup patch by Tim Peters (please test!):

It wasn't hard to speed pyclbr by a factor of 3, and I'll attach an
experimental patch for that (experimental because barely tested).  Uncomment
the new "String" stuff and it will deal with strings correctly (pyclbr
currently ignores the possibility), but that slows it down a lot.  Still
faster in the end than current pyclbr, but-- frankly --I'd rather have the
dramatic speedup!

25 years agoFix bug discovered by John W. Shipman -- when the width of a format
Guido van Rossum [Mon, 7 Jun 1999 15:12:32 +0000 (15:12 +0000)]
Fix bug discovered by John W. Shipman -- when the width of a format
specifier came from an int expression instead of a constant in the
format, a negative width was truncated to zero instead of taken to
mean the same as that negative constant plugged into the format.  E.g.
"(%*s)" % (-5, "foo") yielded "(foo)" while "(%-5s)" yields "(foo  )".
Now both yield the latter -- like sprintf() in C.

25 years agoTim Peters:
Guido van Rossum [Mon, 7 Jun 1999 14:28:14 +0000 (14:28 +0000)]
Tim Peters:

Smarter logic for finding a parse synch point.

Does a half to a fifth the work in normal cases; don't notice the speedup,
but makes  more breathing room for other extensions.

Speeds terrible cases by at least a factor of 10. "Terrible" == e.g. you put
""" at the start of Tkinter.py, undo it, zoom to the bottom, and start
typing in code.  Used to take about 8 seconds for ENTER to respond, now some
large fraction of a second.  The new code gets indented correctly, despite
that it all remains "string colored" until the colorizer catches up (after
which, ENTER appears instantaneous again).

25 years agoMight as well enable CallTips by default.
Guido van Rossum [Fri, 4 Jun 1999 19:21:19 +0000 (19:21 +0000)]
Might as well enable CallTips by default.
If there are too many complaints I'll remove it again or fix it.

25 years agoPatch by Jim Fulton: new function parse_qsl(), which is like
Guido van Rossum [Fri, 4 Jun 1999 17:54:39 +0000 (17:54 +0000)]
Patch by Jim Fulton: new function parse_qsl(), which is like
parse_qs() but returns a list of (name, value) pairs -- which is
actually more correct.  Use this where it makes sense.

25 years agoAdded an "optional" directive, that will include a module if it is available
Jack Jansen [Fri, 4 Jun 1999 15:56:33 +0000 (15:56 +0000)]
Added an "optional" directive, that will include a module if it is available
but not complain if it isn't (giving an ImportError when the frozen code is run).

25 years ago(py-statement-closes-block-p): py-goto-initial-line could leave us in
Barry Warsaw [Thu, 3 Jun 1999 22:18:59 +0000 (22:18 +0000)]
(py-statement-closes-block-p): py-goto-initial-line could leave us in
the line's whitespace.  back-to-indentation should /follow/ this call.

25 years agoNew offerings by Tim Peters; he writes:
Guido van Rossum [Thu, 3 Jun 1999 14:32:16 +0000 (14:32 +0000)]
New offerings by Tim Peters; he writes:

IDLE is now the first Python editor in the Universe not confused by my
doctest.py <wink>.

As threatened, this defines IDLE's is_char_in_string function as a
method of EditorWindow.  You just need to define one similarly in
whatever it is you pass as editwin to AutoIndent; looking at the
EditorWindow.py part of the patch should make this clear.

25 years agoEnclose pattern in quotes in status message.
Guido van Rossum [Thu, 3 Jun 1999 14:25:49 +0000 (14:25 +0000)]
Enclose pattern in quotes in status message.