Guido van Rossum [Mon, 18 May 1998 14:39:42 +0000 (14:39 +0000)]
Subject: bug fixes for imaplib.py
From: Piers Lauder <piers@staff.cs.usyd.edu.au>
To: Python List <python-list@cwi.nl>
Date: Mon, 18 May 1998 09:51:53 +1000
Following is a context diff for imaplib.py in the Python1.5.1 distribution.
It fixes 2 bugs. One to do with argument quoting, and the other to do with
caching of un-tagged responses. Apologies for its size.
Guido van Rossum [Sat, 16 May 1998 02:11:10 +0000 (02:11 +0000)]
Fix another oldie (item (b) only):
Date: Fri, 20 Dec 1996 14:47:50 +0100
From: Lele Gaifax <lele@nautilus.eclipse.it>
To: Python List <python-list@cwi.nl>
Subject: Typos in ref manual
Hi all,
browsing the reference manual I noticed what seem two small errors:
a) in the list of keywords (section 2.3.1) 'exec' is missing
b) in the Operator Precedence table (5.12) the comparison operators
include '=', but probably '==' was intended.
Hope this help,
lele.
Guido van Rossum [Fri, 15 May 1998 22:04:07 +0000 (22:04 +0000)]
Another veeeeeery old patch...
Date: Thu, 14 Sep 1995 12:18:20 -0400
From: Alan Morse <alan@dvcorp.com>
To: python-list@cwi.nl
Subject: getargs bug in 1.2 and 1.3 BETA
We have found a bug in the part of the getargs code that we added
and submitted, and which was incorporated into 1.1.
The parsing of "O?" format specifiers is not handled correctly;
there is no "else" for the "if" and therefore it can never fail.
What's worse, the advancing of the varargs pointer is not
handled properly, so from then on it is out of sync, wreaking
all sorts of havoc. (If it had failed properly, then the out-of-sync
varargs would not have been an issue.)
Below is the context diff for the change.
Note that I have made a few stylistic changes beyond adding the
else case, namely:
1) Making the "O" case follow the convention established by the other
format specifiers of getting all their vararg arguments before
performing the test, rather than getting some before and some after
the test passes.
2) Making the logic of the tests parallel, so the "if" part indicates
that the format is accepted and the "else" part indicates that the
format has failed. They were inconsistent with each other and with the
the other format specifiers.
Guido van Rossum [Fri, 15 May 1998 20:26:31 +0000 (20:26 +0000)]
Change the output names. Do away with the Release and Debug
subdirectories.
All final products go into the current directory (i.e., PCbuild).
Object files go into temp-release and temp-debug.
Debug versions of DLLs have _d appended to their basename, e.g. the
debug version of python15.dll is python15_d.dll, the debug version of
python.exe is python_d.exe, and the debug version of parser.pyd is
parser_d.pyd. (See corresponding patch to importdl.c.) Uniformly
changed all extension modules to use .pyd, not .dll.
Fred Drake [Fri, 15 May 1998 13:45:54 +0000 (13:45 +0000)]
Extend handling for \let a bit, to also allow \let\something=<character>. We
still don't support things like \let^^M=\something, where ^^M could actually be
any active character. Print a decent warning if we find one we can't handle.
Fred Drake [Thu, 14 May 1998 20:03:14 +0000 (20:03 +0000)]
Don't run tools/toc2bkm.py unless we're building PDF.
Change the way TEXINPUTS gets defined to ensure that the directory containing
the main document file comes before any other dir, to allow documents to have
files that "override" like-named files elsewhere on the search path. Guido
discovered we needed this.
Guido van Rossum [Thu, 14 May 1998 02:32:54 +0000 (02:32 +0000)]
New APIs for embedding applications that want to add their own entries
to the table of built-in modules. This should normally be called
*before* Py_Initialize(). When the malloc() or realloc() call fails,
-1 is returned and the existing table is unchanged.
After a similar function by Just van Rossum.
int PyImport_ExtendInittab(struct _inittab *newtab);
int PyImport_AppendInittab(char *name, void (*initfunc)());
Guido van Rossum [Thu, 14 May 1998 01:00:51 +0000 (01:00 +0000)]
Make sure that PyDict_GetItem[String]() *never* raises an exception.
If the argument is not a dictionary, simply return NULL. If the
hash() on the key fails, clear the error.
Guido van Rossum [Wed, 13 May 1998 20:13:24 +0000 (20:13 +0000)]
From: conrad@cgl.ucsf.edu (Conrad Huang %CGL)
To: python-list@cwi.nl
Date: 13 May 98 18:33:11 GMT
I think I found a bug in CGIHTTPServer.py. (Does anyone care? :-)
I was trying to use it as the web server for uploading files.
Python CGI scripts (using the CGI module) that worked for other
servers (e.g., Netscape Enterprise server) hang when run from
CGIHTTPServer. The problem is that the content type parameters,
in particular the boundary parameter, were not passed through to
the CGI scripts, thus making the MIME parsing code choke.
The first function writes to sys.stdout; the second to sys.stderr. When
there is a problem, they write to the real (C level) stdout or stderr;
no exceptions are raised (but a pending exception may be cleared when a
new exception is caught).
Both take a printf-style format string as their first argument followed
by a variable length argument list determined by the format string.
*** WARNING ***
The format should limit the total size of the formatted output string to
1000 bytes. In particular, this means that no unrestricted "%s" formats
should occur; these should be limited using "%.<N>s where <N> is a
decimal number calculated so that <N> plus the maximum size of other
formatted text does not exceed 1000 bytes. Also watch out for "%f",
which can print hundreds of digits for very large numbers.
Fred Drake [Mon, 11 May 1998 18:23:35 +0000 (18:23 +0000)]
In package Override, use the getcwd() function from the Cwd module instead of
the one from Override.pm (part of latex2html).
Absolutize the TEXINPUTS environment variable, since we can't count on
latex2html doing it for us (even though I sent in a patch, and it really
should).
Implement round() slightly different, so that for negative ndigits no
additional errors happen in the last step. The trick is to avoid
division by 0.1**n -- multiply by 10.0**n instead.
Fix by Sean Reifschneider:
- When facility not specified to syslog() method, use default from openlog()
(This is how it was claimed to work in the documentation)
- Potential resource leak of o_ident, now cleaned up in closelog()
- Minor comment accuracy fix.
Make Tim O'Malley's requested change: in FieldStorage.__init__(), when
method='GET', always get the query string from environ['QUERY_STRING']
or sys.argv[1] -- ignore an explicitly passed in fp.
Fred Drake [Fri, 8 May 1998 04:02:42 +0000 (04:02 +0000)]
l2h target: Do the "right thing" regarding the paper-*/ subdirs as the other
"big" targets. Fix is to set the TEXINPUTS on the command line of the
sub-make.
Fred Drake [Fri, 8 May 1998 04:00:56 +0000 (04:00 +0000)]
Some versions of latex2html don't automatically append the .tex extension to
the name of the main .tex source file if it's not in the current directory.
Fred Drake [Fri, 8 May 1998 03:46:38 +0000 (03:46 +0000)]
$(KPSEWHICH): Use the older style of calling kpsewhich with the arg
specifying *which* type of path to search. This works for both
teTeX 0.4 and 0.9. This is what we call portability these days! ;-)
Fred Drake [Thu, 7 May 1998 19:30:16 +0000 (19:30 +0000)]
Cleaned out some more cruft.
Added some new cruft.
For some of the "big" targets, force things to happen in the "right"
subdirectory, i.e., "make" will build the DVI and PostScript files in the
paper-letter/ directory, and "make PAPER=a4" will build DVI and PostScript
files in the paper-a4/ directory.