1. 09 Haz, 1999 3 kayıt (commit)
  2. 08 Haz, 1999 11 kayıt (commit)
    • Guido van Rossum's avatar
      Fix (sanctioned by Sjoerd) for a problem reported by Andreas Faerber: · 1f2e09bc
      Guido van Rossum yazdı
      all processing instruction target names containing 'xml' were
      rejected, instead (as the standard rejects) only the name 'xml' itself
      (or case variants thereof).
      1f2e09bc
    • Greg Ward's avatar
      On David Ascher's recommendation: reversed order of 'utime()' and · 5116f90e
      Greg Ward yazdı
      'chmod()' in 'copy_file()'.
      5116f90e
    • Guido van Rossum's avatar
      Sam's latest versions · a8d0f4fd
      Guido van Rossum yazdı
      a8d0f4fd
    • Guido van Rossum's avatar
      Skip Montanaro: · cf09a392
      Guido van Rossum yazdı
      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.
      cf09a392
    • Guido van Rossum's avatar
      Hmm... Tim didn't turn "replace all" into a single undo block. · ab6a08a4
      Guido van Rossum yazdı
      I think I like it better if it os, so here.
      ab6a08a4
    • Guido van Rossum's avatar
      9745f5a7
    • Guido van Rossum's avatar
      Tim Peters: · 0fcd635d
      Guido van Rossum yazdı
      + 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).
      0fcd635d
    • Guido van Rossum's avatar
      Tim Peters: Taught it more "real Python" rules without slowing it · df9f7a3e
      Guido van Rossum yazdı
      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.
      df9f7a3e
    • Greg Ward's avatar
      Hacked 'set_final_options()' to set (hopefully) appropriate values for · 9a33707b
      Greg Ward yazdı
      '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.
      9a33707b
    • Greg Ward's avatar
      Added the 'have_run' dictionary to Distribution, and changed · c9973349
      Greg Ward yazdı
        '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.
      c9973349
    • Greg Ward's avatar
      Now handles NT, through '_init_nt()' function (courtesy of · 4d74d73b
      Greg Ward yazdı
      Amos Latteier <amos@aracnet.com>).
      4d74d73b
  3. 07 Haz, 1999 4 kayıt (commit)
    • Guido van Rossum's avatar
    • Guido van Rossum's avatar
      Experimental speedup patch by Tim Peters (please test!): · ad380551
      Guido van Rossum yazdı
      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!
      ad380551
    • Guido van Rossum's avatar
      Fix bug discovered by John W. Shipman -- when the width of a format · 98c9eba9
      Guido van Rossum yazdı
      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.
      98c9eba9
    • Guido van Rossum's avatar
      Tim Peters: · 729afc1d
      Guido van Rossum yazdı
      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).
      729afc1d
  4. 04 Haz, 1999 3 kayıt (commit)
  5. 03 Haz, 1999 4 kayıt (commit)
  6. 02 Haz, 1999 7 kayıt (commit)
  7. 01 Haz, 1999 8 kayıt (commit)
    • Guido van Rossum's avatar
      Hah! A fix of my own to Tim's code! · a954ba1d
      Guido van Rossum yazdı
      Unix bindings for <<toggle-tabs>> and <<change-indentwidth>> were
      missing, and somehow that meant the events were never generated,
      even though they were in the menu.  The new Unix bindings are now
      the same as the Windows bindings (M-t and M-u).
      a954ba1d
    • Guido van Rossum's avatar
      Tim Peters again: · bbaba854
      Guido van Rossum yazdı
      The new version (attached) is fast enough all the time in every real module
      I have <whew!>.  You can make it slow by, e.g., creating an open list with
      5,000 90-character identifiers (+ trailing comma) each on its own line, then
      adding an item to the end -- but that still consumes less than a second on
      my P5-166.  Response time in real code appears instantaneous.
      
      Fixed some bugs.
      
      New feature:  when hitting ENTER and the cursor is beyond the line's leading
      indentation, whitespace is removed on both sides of the cursor; before
      whitespace was removed only on the left; e.g., assuming the cursor is
      between the comma and the space:
      
      def something(arg1, arg2):
                         ^ cursor to the left of here, and hit ENTER
                     arg2):   # new line used to end up here
                    arg2):    # but now lines up the way you expect
      
      New hack:  AutoIndent has grown a context_use_ps1 Boolean config option,
      defaulting to 0 (false) and set to 1 (only) by PyShell.  Reason:  handling
      the fancy stuff requires looking backward for a parsing synch point; ps1
      lines are the only sensible thing to look for in a shell window, but are a
      bad thing to look for in a file window (ps1 lines show up in my module
      docstrings often).  PythonWin's shell should set this true too.
      
      Persistent problem:  strings containing def/class can still screw things up
      completely.  No improvement.  Simplest workaround is on the user's head, and
      consists of inserting e.g.
      
      def _(): pass
      
      (or any other def/class) after the end of the multiline string that's
      screwing them up.  This is especially irksome because IDLE's syntax coloring
      is *not* confused, so when this happens the colors don't match the
      indentation behavior they see.
      bbaba854
    • Guido van Rossum's avatar
      Tim Peters again: · a6be3870
      Guido van Rossum yazdı
      [Tim, after adding some bracket smarts to AutoIndent.py]
      > ...
      > What it can't possibly do without reparsing large gobs of text is
      > suggest a reasonable indent level after you've *closed* a bracket
      > left open on some previous line.
      > ...
      
      The attached can, and actually fast enough to use -- most of the time.  The
      code is tricky beyond belief to achieve that, but it works so far; e.g.,
      
              return len(string.expandtabs(str[self.stmt_start :
                                               ^ indents to caret
                                               i],
                                           ^ indents to caret
                                           self.tabwidth)) + 1
          ^ indents to caret
      
      It's about as smart as pymode now, wrt both bracket and backslash
      continuation rules.  It does require reparsing large gobs of text, and if it
      happens to find something that looks like a "def" or "class" or sys.ps1
      buried in a multiline string, but didn't suck up enough preceding text to
      see the start of the string, it's completely hosed.  I can't repair that --
      it's just too slow to reparse from the start of the file all the time.
      
      AutoIndent has grown a new num_context_lines tuple attribute that controls
      how far to look back, and-- like other params --this could/should be made
      user-overridable at startup and per-file on the fly.
      a6be3870
    • Guido van Rossum's avatar
      New file by Tim Peters: · 8113cdc3
      Guido van Rossum yazdı
      One new file in the attached, PyParse.py.  The LineStudier (whatever it was
      called <wink>) class was removed from AutoIndent; PyParse subsumes its
      functionality.
      8113cdc3
    • Guido van Rossum's avatar
      Tim Peters keeps revising this module (more to come): · d93f7395
      Guido van Rossum yazdı
      Removed "New tabwidth" menu binding.
      
      Added "a tab means how many spaces?" dialog to block tabify and untabify.  I
      think prompting for this is good now:  they're usually at-most-once-per-file
      commands, and IDLE can't let them change tabwidth from the Tk default
      anymore, so IDLE can no longer presume to have any idea what a tab means.
      
      Irony:  for the purpose of keeping comments aligned via tabs, Tk's
      non-default approach is much nicer than the Emacs/Notepad/Codewright/vi/etc
      approach.
      d93f7395
    • Guido van Rossum's avatar
      Andy Dustman notes that I patched the close() call in the wrong place. · 198e7cac
      Guido van Rossum yazdı
      Here's the correct patch!
      198e7cac
    • Guido van Rossum's avatar
      In class TemporaryFileWrapper, don't cache attributes of tpye int -- · 6b708d56
      Guido van Rossum yazdı
      these happen to be 'closed' and 'softspace', which may change!
      
      Noted by Dave Ascher (with slightly different solution).
      6b708d56
    • Guido van Rossum's avatar
      1. Catch NameError on import (could be raised by case mismatch on Windows). · 74311b2c
      Guido van Rossum yazdı
      2. No longer need to reset pyclbr cache and show watch cursor when calling
         ClassBrowser -- the ClassBrowser takes care of pyclbr and the TreeWidget
         takes care of the watch cursor.
      3. Reset the focus to the current window after error message about class
         browser on buffer without filename.
      74311b2c