Commit Graph

1426 Commits

Author SHA1 Message Date
Guido van Rossum 0001a11986 Fix bug in trace_vdelete(); should use master's delete command. 1998-02-19 21:20:30 +00:00
Guido van Rossum 2fc4d581ba Added debug statements to report data actually sent and received on
the socket.
1998-02-19 21:19:48 +00:00
Guido van Rossum b1908846af Fix for literal null bytes -- these must be replaced by the four
characters \, 0, 0, 0.
1998-02-19 21:18:56 +00:00
Guido van Rossum 72c2e1b56e Fixed a bug in the gauss() function. The bug was reported by Mike
Miller, who complained that its kurtosis was bad, and then fixed by
Lambert Meertens (author of the original algorithm) who discovered
that the mathematical analysis leading to his solution was wrong, and
provided a corrected version.  Mike then tested the fix and reported
that the kurtosis was now good.
1998-02-19 21:17:42 +00:00
Guido van Rossum 9824509d3e Add rmd() (remove directory command); fix comment in parse257.
In login(), force passwd and acct to '' when they are None (this can
happen in the test program!).
1998-02-19 21:15:44 +00:00
Guido van Rossum 0d530cedd7 Faster implementation of normcase (using string.lower(
string.replace(...)) instead of a for loop).

Don't call normcase() in normpath() -- the filesystem just might be
case preserving...
1998-02-19 21:08:36 +00:00
Guido van Rossum a73033fcc2 Feature added by Bill van Melle: when no timezone is present, assume
local time -- that's better than failure.
1998-02-19 00:28:58 +00:00
Guido van Rossum 16a0bc278e (1) Change normpath() to *not* also call normcase().
(2) Fix normcase() to use string.lower() and string.replace() -- it
turns out that the table constructed for translate() didn't work in
locales that have a different number of lowercase and uppercase
letters.
1998-02-18 13:48:31 +00:00
Guido van Rossum 00455b77a6 Fix sign reversal in mktime_tz discovered by Bill van Melle. 1998-02-18 05:06:30 +00:00
Guido van Rossum 358473c1a2 Andrew Kuchling writes:
First, the RNG in whrandom.py sucks if you let it seed itself from the time.
The problem is the line:
			t = int((t&0xffffff) | (t>>24))
Since it ORs the two parts together, the resulting value has mostly
ON bits.  Change | to ^, and you don't lose any randomness.
1998-02-16 14:52:42 +00:00
Guido van Rossum e60142f2c1 Adding output of test_xmllib.py 1998-02-13 16:35:21 +00:00
Fred Drake fe82acc3b1 Fixed typo in docstring: "__ version__" --> "__version__" 1998-02-13 03:24:48 +00:00
Guido van Rossum 8a666e7c56 Fix a horrible race condition -- various routines were storing the
most recently opened URL in self.openedurl of the URLopener instance.
This doesn't really work if multiple threads share the same opener
instance!

Fix: openedurl was actually simply the type prefix (e.g. "http:")
followed by the rest of the URL; since the rest of the URL is
available and the type is effectively determined by where you are in
the code, I can reconstruct the full URL easily, e.g. "http:" + url.
1998-02-13 01:39:16 +00:00
Guido van Rossum d76732918a Added rmtree(), to recursively remove a directory tree.
Code by David Ascher (docstring by me).
1998-02-06 21:38:09 +00:00
Guido van Rossum 03710d2a40 Two suggested features by Sjoerd:
- use the tempcache in the open() method, too.

- use the "unwrap"ped url as key for the tempcache.
1998-02-05 16:22:27 +00:00
Guido van Rossum c5d8fed261 (1) Use matchobj.groups(), not matchbj.group() to get all groups.
(2) Provisional hack to avoid dying when trying to turn echo on or off
on Macs, where os.system() doesn't exist.
1998-02-05 16:21:28 +00:00
Guido van Rossum c9aef03af4 Make this test work when imported from the interpreter instead of run
from regrtest.py (it still works there too, of course).
1998-01-29 21:53:17 +00:00
Guido van Rossum fc40a8316a Sez The Dragon:
Ok, I fixed the quotes, along with a bug or two.
	Also added another exception.
1998-01-29 17:26:45 +00:00
Guido van Rossum bbe323e52c SMTP client by The Dragon De Monsyne <dragondm@integral.org>. 1998-01-29 17:24:40 +00:00
Guido van Rossum 02505e4850 New version of xmllib from Sjoerd.
The main incompatibility is that the error reporting method is now
called as
 parser.syntax_error(msg)
instead of
 parser.syntax_error(lineno, msg)

This new version also has some code to deal with the <?xml?> and
<!DOCTYPE> tags at the start of an XML document.
The documentation has been updated, and a small test module has been
created.
1998-01-29 14:55:24 +00:00
Guido van Rossum b16a3b8450 (This fix is really by Jeremy)
Here's my suggested replacement for gzip.py for 1.5.1.  I've
re-implemeted methods readline and readlines, added an _unread, and
tweaked read and _read.

I tried a more complicated buffer scheme for unread (using a list of
strings and string.join), but it was more complicated and slower.
This version is a lot faster than the current version and is still
pretty simple.
1998-01-27 19:29:45 +00:00
Barry Warsaw abe2a457de Unpickler.load_inst(), Unpickler.load_obj(), Unpickler.load_build():
Fixed problems when unpickling in restricted execution environments.
These methods try to assign to an instance's __class__ attribute, or
access the instances __dict__, which are prohibited in REE.  For the
first two methods, I re-implemented the old behavior when assignment
to value.__class__ fails.

For the load_build() I also re-implemented the old behavior when
inst.__dict__.update() fails but this means that unpickling in REE is
semantically different than unpickling in unrestricted mode.
1998-01-26 22:47:35 +00:00
Barry Warsaw 5da0f504ba get(): Fixed a bug in the merge order of the dictionaries. This makes
a copy of the defaults dictionary and merges the section's dictionary
into it so that sections can override the defaults.
1998-01-26 22:42:48 +00:00
Guido van Rossum c567b8176a Revamped, to match py_compile.py:
- added docstrings
- support option to specify a different purported directory name
- reindented with 4 spaces
1998-01-19 23:07:55 +00:00
Guido van Rossum f7edadbc58 Add Gopher to list of protocols that support query strings. 1998-01-19 22:27:21 +00:00
Guido van Rossum e7579624ef Fix bad new bug in ftp code -- the test for existing file using NLST
would set the transfer to text mode instead of the specified mode.
1998-01-19 22:26:54 +00:00
Guido van Rossum ca99c2ce75 Fix to ismount(). Can't remember who told me this. 1998-01-19 22:25:59 +00:00
Guido van Rossum 29c4688659 Patch by Tim O'Malley for servers that send a response looking just like
HTTP/1.x 200
instead of
    HTTP/1.x 200 OK
1998-01-19 22:25:24 +00:00
Guido van Rossum d2dd9a8b7f Some patches by Lars Marius Garshol:
- fix type_to_name(); it never worked
- add path_to_selector()
add path_to_datatype_name()
1998-01-19 21:59:48 +00:00
Guido van Rossum 63566e2ef2 Added docstrings.
Added an optional third parameter giving the purported filename for
error messages from the module.

Append a newline to the code string if needed.
1998-01-19 04:01:26 +00:00
Guido van Rossum e2c6e203c6 Add trace methods to class Variable 1998-01-14 16:44:34 +00:00
Guido van Rossum f473cb007b Added tests for qualified sub and split 1998-01-14 16:42:17 +00:00
Guido van Rossum 8687164426 Seems I've found a way to fix this. 1998-01-14 15:40:30 +00:00
Guido van Rossum 0d8fcb233e Update the doc string to emphasize non-Unix behavior earlier;
sys.prefix is no longer empty on any platform that I know of.
1998-01-13 18:32:40 +00:00
Guido van Rossum 2b2b3f9bcb Fix two bugs:
(1) maxsplit was ignored in split().

(2) groups() would return a string instead of a singleton tuple when
there was only one group.
1998-01-12 18:57:53 +00:00
Guido van Rossum 46f37144d3 New module added. 1997-12-31 00:11:03 +00:00
Guido van Rossum 51ca6e3e42 When there's no filename, don't make one up.
Added _test() that behaves (a bit) like gzip.
Fix a comment (*sequential* access is okay -- *random* access it out!)
1997-12-30 20:09:08 +00:00
Guido van Rossum f5910e42d1 Add tests for re.L(OCALE). 1997-12-30 17:32:33 +00:00
Guido van Rossum 380bf64424 Since DSA.py never made it to the release, neither should dos-8x3/dsa.py. 1997-12-30 05:03:39 +00:00
Guido van Rossum d01e9aa0df the usual 1997-12-30 04:20:58 +00:00
Guido van Rossum 1cd6a457d9 Two critical fixes to the changes that I made for Greg McFarlane --
patches provided by Greg (am I glad I sent him my latest version!).
1997-12-30 04:07:19 +00:00
Guido van Rossum 5baf4bc978 Moved things around a bit in interact(), so outout is processed before
input.  When an EOF is read, break out of the loop instead of (by
default) writing an empty line (which doesn't do much good).  Don't
close self when falling through the loop.
1997-12-29 20:05:45 +00:00
Guido van Rossum 9fd41e363b Fixed several bugs reported by Greg McFarmane:
*  The invoke methods of the three Tkinter widgets Button,
    Checkbutton and Radiobutton should return the value returned by
    the callback, (like the Menu widget does):

	def invoke(self):
	    return self.tk.call(self._w, 'invoke')

 *  The select_from method of the Canvas widget should use 'from', not
    'set':

	def select_from(self, tagOrId, index):
	    self.tk.call(self._w, 'select', 'from', tagOrId, index)

    Currently, if you use select_from, you get the error message:
 'TclError: bad select option "set": must be adjust, clear, from, item, or to'

 *  The 'entrycget' and 'type' methods of the Tk menu widget are
    missing from Tkinter.

 *  There is a bug in grid_columnconfigure and grid_rowconfigure.  For
    example, this should return the current value of the 'minsize'
    option for column 0:

	f.grid_columnconfigure(0, 'minsize')

    Instead it returns the same as:

	f.grid_columnconfigure(0)

    I suggest that the hint given in the comment in the
    Tkinter.Misc.configure method should be followed - "ought to
    generalize this so tag_config etc.  can use it".  Repeating the
    same configure code several times in Tkinter is inviting errors.
    [I did not follow this advice --G]

 *  The grid_slaves method should handle options.  Currently, to pass
    options to the grid_slaves method, you have to do something like:

	grid_slaves('-row', 1)
1997-12-29 19:59:33 +00:00
Guido van Rossum 23e21e7cf3 Minor editing corrections. 1997-12-29 19:57:36 +00:00
Guido van Rossum 2003204ba7 Added doc string, provided by Charles Waldman (with some reformatting
and a little editing my me).
1997-12-29 19:26:28 +00:00
Guido van Rossum d499004860 Solve two annoying problems with ftp URLs for Jack: when repeated
retrieving files from the same host and directory, you had to close
the previous instance before opening a new one; and retrieving a
non-existent file would return an empty file.  (The latter fix relies
on maybe an undocumented property of NLST -- NLST of a file returns
just that file, while NLST of a non-existent file returns nothing.  A
side effect, unfortunately, seems to be that now ftp-retrieving an
*empty* directory may fail.  Ah well.)
1997-12-28 04:21:20 +00:00
Guido van Rossum adfacf4e2e Do a better job of keeping the dialog visible when the master window
is near or beyond the edge of the screen.  Patch by Skip Montanaro.
1997-12-28 03:42:50 +00:00
Guido van Rossum 4d9d3f18c2 Typo: Widht instead of Width... 1997-12-27 15:14:43 +00:00
Guido van Rossum ccb5ec62e1 Added expect() method which takes a list of regular expressions and an
optional timeout.  Also moved some imports around.
1997-12-24 22:24:19 +00:00
Guido van Rossum 00f9fea288 Use string.replace instead of regsub.[g]sub. 1997-12-24 21:18:41 +00:00