summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Mark Hammond writes: Here is another change that allows it to work forGuido van Rossum1999-06-101-14/+37
| | | | | class creation - tries to locate an __init__ function. Also updated the test code to reflect your new "***" change.
* Mark Hammond writes: Tim's suggestion of copying the font for theGuido van Rossum1999-06-101-1/+2
| | | | | CallTipWindow from the text control makes sense, and actually makes the control look better IMO.
* Patch by Jim Fulton to document the new parse_qls().Guido van Rossum1999-06-101-2/+36
|
* Append "..." if the appropriate flag (for varargs) in co_flags is set.Guido van Rossum1999-06-091-1/+3
| | | | Ditto "***" for kwargs.
* Fix bug discovered by Klaus-Juergen Wolf -- it runs into infinite recursion!Guido van Rossum1999-06-091-1/+1
|
* Fix by Sjoerd for a package related bug: If you have a non-empyGuido van Rossum1999-06-091-6/+6
| | | | | | | | | | | | | | __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.)
* Set the max recursion limit to 5000 -- rather conservative (this usesGuido van Rossum1999-06-091-0/+7
| | | | 0.5 MB of the 1 MB available by default for stack on Win32 platforms).
* Jim Fulton writes:Guido van Rossum1999-06-091-10/+56
| | | | | | | | | | | | | | | | | | 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.]
* When deallocating a list, DECREF the items from the end back to the start.Guido van Rossum1999-06-091-1/+6
|
* Set PATCHLEVEL and PY_VERSION (string version only) to 1.5.2+ toGuido van Rossum1999-06-091-2/+2
| | | | | | 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.
* Updated lagging version#. Also added some comments about how quote()Guido van Rossum1999-06-091-1/+3
| | | | and quote_plus() can be optimized tenfold.
* Patch by Per Cederqvist:Guido van Rossum1999-06-091-3/+6
| | | | | | | 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.
* Add doc for timegm().Guido van Rossum1999-06-091-0/+8
|
* Add unrelated but handy function: timegm(), to calculate UnixGuido van Rossum1999-06-091-0/+17
| | | | timestamp from GMT tuple.
* Don't just die if gethostbyaddr() fails -- as it can when DNS isGuido van Rossum1999-06-091-6/+10
| | | | unreachable -- but fall back to using whatever hostname we have.
* Oops, Sjoerd was in a hurry. This patch from him fixes some lengthGuido van Rossum1999-06-091-0/+1
| | | | math in the Chunk class.
* Patch/new code by Sjoerd Mullender:Guido van Rossum1999-06-092-74/+155
| | | | Separate the Chunk class out of the aifc module into a new "chunk" module.
* Fix (sanctioned by Sjoerd) for a problem reported by Andreas Faerber:Guido van Rossum1999-06-081-1/+1
| | | | | | all processing instruction target names containing 'xml' were rejected, instead (as the standard rejects) only the name 'xml' itself (or case variants thereof).
* On David Ascher's recommendation: reversed order of 'utime()' andGreg Ward1999-06-081-2/+5
| | | | 'chmod()' in 'copy_file()'.
* Sam's latest versionsGuido van Rossum1999-06-082-87/+109
|
* Skip Montanaro:Guido van Rossum1999-06-081-2/+13
| | | | | | | | | 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.
* Hmm... Tim didn't turn "replace all" into a single undo block.Guido van Rossum1999-06-081-0/+2
| | | | I think I like it better if it os, so here.
* Tim Peters: made replacement atomic for undo/redo.Guido van Rossum1999-06-081-0/+2
|
* Tim Peters:Guido van Rossum1999-06-081-3/+2
| | | | | | | | | | | | | | | + 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).
* Tim Peters: Taught it more "real Python" rules without slowing itGuido van Rossum1999-06-081-47/+53
| | | | | | | | | | 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.
* Hacked 'set_final_options()' to set (hopefully) appropriate values forGreg Ward1999-06-081-7/+56
| | | | | | | '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.
* Added the 'have_run' dictionary to Distribution, and changedGreg Ward1999-06-081-3/+33
| | | | | | | '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.
* Now handles NT, through '_init_nt()' function (courtesy ofGreg Ward1999-06-081-0/+11
| | | | Amos Latteier <amos@aracnet.com>).
* Remove unnecessary reference to pyclbr from test() code.Guido van Rossum1999-06-072-5/+0
|
* Experimental speedup patch by Tim Peters (please test!):Guido van Rossum1999-06-071-82/+149
| | | | | | | | | 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!
* Fix bug discovered by John W. Shipman -- when the width of a formatGuido van Rossum1999-06-071-2/+4
| | | | | | | | 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.
* Tim Peters:Guido van Rossum1999-06-071-19/+75
| | | | | | | | | | | | | | 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).
* Might as well enable CallTips by default.Guido van Rossum1999-06-041-0/+1
| | | | If there are too many complaints I'll remove it again or fix it.
* Patch by Jim Fulton: new function parse_qsl(), which is likeGuido van Rossum1999-06-041-13/+44
| | | | | parse_qs() but returns a list of (name, value) pairs -- which is actually more correct. Use this where it makes sense.
* Added an "optional" directive, that will include a module if it is availableJack Jansen1999-06-042-3/+6
| | | | but not complain if it isn't (giving an ImportError when the frozen code is run).
* (py-statement-closes-block-p): py-goto-initial-line could leave us inBarry Warsaw1999-06-031-2/+2
| | | | the line's whitespace. back-to-indentation should /follow/ this call.
* New offerings by Tim Peters; he writes:Guido van Rossum1999-06-033-26/+66
| | | | | | | | | | 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.
* Enclose pattern in quotes in status message.Guido van Rossum1999-06-031-1/+1
|
* Mark Hammond fixed some comments and improved the way the tip text isGuido van Rossum1999-06-031-11/+12
| | | | constructed.
* At Jim Fulton's request (actually, as a compromise :-), default theGuido van Rossum1999-06-021-2/+2
| | | | | | content-type to application/x-www-form-urlencoded only when the method is POST. Ditto for when the content-type is unrecognized -- only fall back to urlencoded with POST.
* My fix to Mark's code: restore the universal check on <KeyRelease>.Guido van Rossum1999-06-021-14/+2
| | | | Always cancel on <Key-Escape> or <ButtonPress>.
* A version that Mark Hammond posted to the newsgroup. Has some newerGuido van Rossum1999-06-021-27/+38
| | | | | | stuff for getting the tip. Had to fix the Key-( and Key-) events for Unix. Will have to re-apply my patch for catching KeyRelease and ButtonRelease events.
* Call tips by Mark Hammond (plus tiny fix by me.)Guido van Rossum1999-06-022-0/+232
|
* Changes by Mark Hammond: (1) support optional output_sep argument toGuido van Rossum1999-06-021-6/+22
| | | | | the constructor so he can eliminate the sys.ps2 that PythonWin leaves in the source; (2) remove duplicate history items.
* Changes by Mark Hammond to allow using IDLE extensions in PythonWin asGuido van Rossum1999-06-021-9/+10
| | | | well: make three dialog routines instance variables.
* Change by Mark Hammond to allow using IDLE extensions in PythonWin asGuido van Rossum1999-06-021-0/+5
| | | | well: make three dialog routines instance variables.
* Hah! A fix of my own to Tim's code!Guido van Rossum1999-06-011-0/+2
| | | | | | | 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).
* Tim Peters again:Guido van Rossum1999-06-013-107/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Tim Peters again:Guido van Rossum1999-06-011-166/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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.
* New file by Tim Peters:Guido van Rossum1999-06-011-0/+470
| | | | | | One new file in the attached, PyParse.py. The LineStudier (whatever it was called <wink>) class was removed from AutoIndent; PyParse subsumes its functionality.