Fred Drake [Mon, 16 Dec 1996 21:56:27 +0000 (21:56 +0000)]
(sgmllib.py): Partial acceptance of patch from David Leonard
<leonard@dstc.edu.au>; allows hyphen and period in the middle
of attribute names. Still not allowed as first character;
as first character these are illegal in the Reference Concrete
Syntax, and we've not identified any use of these characters as
the first char in an attribute name in deployment on the web.
Barry Warsaw [Mon, 16 Dec 1996 20:24:22 +0000 (20:24 +0000)]
initsignal(): Added SIGXCPU and SIGXFSZ. Left in the definitions for
SIGCPU and SIGFSZ but we're (Jeremy and I) are actually unsure whether
these were typos or if there are systems that use these alternate
names. We've checked Solaris, SunOS, and IRIX; they contain only the
SIGX* names.
Fred Drake [Fri, 13 Dec 1996 22:09:52 +0000 (22:09 +0000)]
(libtime.tex): Merged in changes from Tamito Kajiyama.
(For those watching Python CVS messages: I checked in all of
Tamito's other changes, but the mail delivery failed since the
subject line was too long. The patch Tamito sent for the
documentation has been completely merged in.)
Fred Drake [Fri, 13 Dec 1996 21:56:03 +0000 (21:56 +0000)]
(tut.tex): Normalized all uses of "UNIX" and "{\UNIX}" to use "\UNIX{}",
per usage needed for GNU info processing. Based on comments from
Tamito Kajiyama.
Roger E. Masse [Fri, 13 Dec 1996 20:32:26 +0000 (20:32 +0000)]
Test for the dl module. This only works for SunOS and Solaris.
I've attempted to make a test that silently exits if either
module dl is not present, we're not on a Sun OS, or a standard
shared library ('/usr/lib/libresolv.so') is not found... Otherwise,
It does a simple test of dlmodule on that library. I *think*
this would be ok to add to testall.py but I'll wait till I hear
some feedback on the liberalness of this approach.
Barry Warsaw [Fri, 13 Dec 1996 18:12:34 +0000 (18:12 +0000)]
nonstandard_expectations is only added when in verbose mode, so we
don't need the if test for verbosity when checking for results of an
unsupported option.
Guido van Rossum [Fri, 13 Dec 1996 14:48:47 +0000 (14:48 +0000)]
Added quote_plus() and unquote_plus(), to do space/plus substitutions
for form field values.
Also corrected substitution example (the original changed the spelling
of "conolly" to "connolly" :).
Barry Warsaw [Fri, 13 Dec 1996 00:11:04 +0000 (00:11 +0000)]
Renamed, however there is no test case. I did test some of the module
out manually, and it does compile, but I'm not sure how to write a
useful portable test case. Maybe later...
Guido van Rossum [Thu, 12 Dec 1996 17:59:37 +0000 (17:59 +0000)]
Added remark about time() and sleep()'s subsecond precision.
Added hint about using clock() for benchmarks etc.
Removed non-portable strftime directives and field width, and added a
warning about non-standard features.
Guido van Rossum [Thu, 12 Dec 1996 16:43:05 +0000 (16:43 +0000)]
Added a bunch of new winfo options; we should now be up to date with
Tk 4.2. The new winfo options supported are: mananger, pointerx,
pointerxy, pointery, server, viewable, visualid, visualsavailable.
Also fixed bugs in winfo_colormapfull() and winfo_containing().
Barry Warsaw [Thu, 12 Dec 1996 00:04:35 +0000 (00:04 +0000)]
Several changes... Guido *please* take a look!
1. Renamed
2. Several coding styles were being used here, owing to the multiple
contributors. I tried to convert everything to standard "python"
coding style for indentation, paren and brace placement, etc.
3. There were several potential error conditions that were never being
checked, and where I saw them, I added checks of return values,
etc. I'm pretty sure I got them all.
4. There were some old-style (pre PyArg_ParseTuple) argument
extraction and these were converted to use PyArg_ParseTuple.
All changes compile and run with the new test_select.py module, at
least on my Solaris/Sparc box.
Barry Warsaw [Wed, 11 Dec 1996 00:15:58 +0000 (00:15 +0000)]
Renamed, and bug fixed:
Two interesting problems in nis_maplist(). First, it is possible that
clnt_create() will return NULL. This was being caught, but no Python
error was being set. I use clnt_spcreateerror() to generate the value
of the exception.
But why would clnt_create() fail? It's because no server was being
found. And why was this? It was because nis_maplist() tried only to
get the NIS master for the first map in the aliases list, which is
passwd.byname, and guess what? That's the one NIS map CNRI does *not*
export! So the yp_master() call was failing to return a valid
server. I now cycle through all the map aliases until I find a valid
master. If not, a different exception is set.
I'm not sure this is the completely correct way to do all this, but
short of rewriting the entire nismodule.c (to expose the proper API to
Python), it should do the trick.
Guido van Rossum [Tue, 10 Dec 1996 23:55:39 +0000 (23:55 +0000)]
Added new quicksort implementation, tailored to sorting arrays of
object pointers. Should be a bit faster than the C library's qsort(),
and doesn't have the prohibition on recursion that Solaris qsort() has
in the threaded version of their C library.
Barry Warsaw [Tue, 10 Dec 1996 19:51:10 +0000 (19:51 +0000)]
New regression testing harness.
(testall.out): obsolete. see individual test output files in the
Output directory.
(testall.py): now contains only the list of all tests
(autotest.py): The new testing harness. Supports -g option to
generate output files instead of verifying; -w option to warn about
non-tested optional modules; additional command line arguments to
generate or test individual tests (useful for generating output file
of new tests).
Guido van Rossum [Tue, 10 Dec 1996 18:07:35 +0000 (18:07 +0000)]
Moved the raise logic out of the main interpreter loop to a separate function.
The raise logic has one additional feature: if you raise <class>,
<value> where <value> is not an instance, it will construct an
instance using <value> as argument. If <value> is None, <class> is
instantiated without arguments. If <value> is a tuple, it is used as
the argument list.
This feature is intended to make it easier to upgrade code from using
string exceptions to using class exceptions; without this feature,
you'd have to change every raise statement from ``raise X'' to ``raise
X()'' and from ``raise X, y'' to ``raise X(y)''. The latter is still
the recommended form (because it has no ambiguities about the number
of arguments), but this change makes the transition less painful.
Barry Warsaw [Tue, 10 Dec 1996 16:28:53 +0000 (16:28 +0000)]
A test of the `new' module. The new.code() test is fairly bogus since
I'm really not sure what the proper inputs are. I do flex the
function call though by passing in arguments of the proper type. I
don't try to exec the code object that gets returned!