Commit Graph

4677 Commits

Author SHA1 Message Date
Barry Warsaw 1abda0fb12 cat and puste errors 1996-12-11 01:00:46 +00:00
Barry Warsaw 3696c524a4 nis_maplist(): Use check of yp_get_default_domain() return value
that's used in other parts of this module.

nis_maps(): use PyArg_NoArgs().
1996-12-11 00:29:14 +00:00
Barry Warsaw adbf4e66df 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.
1996-12-11 00:15:58 +00:00
Guido van Rossum 3f236dee3a 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.

Thanks to discussions with Tim Peters.
1996-12-10 23:55:39 +00:00
Barry Warsaw 53699e9ec1 Renamed.
Note that there is no test suite for this module, and I don't plan to
write one just now.
1996-12-10 23:23:01 +00:00
Barry Warsaw dde5c70c8a Test output files in their new location 1996-12-10 23:20:09 +00:00
Barry Warsaw e4a252ef88 Directory for test output files: Output => output 1996-12-10 23:19:14 +00:00
Barry Warsaw 2e644a0f86 When run as a script, runs each test and sends results to stdout
(i.e. this restores the old functionality).

Note that if a test couldn't be imported, it is just ignored (and no
warning is printed).
1996-12-10 23:10:39 +00:00
Barry Warsaw 272c00b634 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).
1996-12-10 19:51:10 +00:00
Guido van Rossum 0aa9ee65ab 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.
1996-12-10 18:07:35 +00:00
Guido van Rossum 6c31a14de7 The usual 1996-12-10 17:19:28 +00:00
Guido van Rossum ce458517b0 Added -lld to AIX LINKFORSHARED. Monty Stein. 1996-12-10 17:18:38 +00:00
Barry Warsaw 1d75734608 Added a provide so the corresponding require will succeed. 1996-12-10 16:29:21 +00:00
Barry Warsaw 924e5d55b7 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!
1996-12-10 16:28:53 +00:00
Barry Warsaw 0f150e41be Added test_new. 1996-12-10 16:27:16 +00:00
Barry Warsaw a6b7c7146c Renamed. 1996-12-10 16:25:56 +00:00
Guido van Rossum 5de1f8dac8 The usual; added several test modules, too. 1996-12-10 16:02:14 +00:00
Guido van Rossum bd01374da8 Add optional data argument to urlopen() and open_http(), to trigger POST. 1996-12-10 16:00:28 +00:00
Guido van Rossum 8b82baa398 In the HTTP reply header, be more accepting in the HTTP version. 1996-12-10 15:58:22 +00:00
Guido van Rossum caf783793d Added remaining declarations needed/used in glmodule.c; keeps gcc -Wall happy. 1996-12-10 15:41:19 +00:00
Guido van Rossum c1547d930f Better way to handle 64-bit ints, keeping gcc -Wall happy.
Tested with AMK's help.
1996-12-10 15:39:04 +00:00
Guido van Rossum 1a2c5cbcc4 Add unistd.h to make gcc -Wall happy. 1996-12-10 15:37:36 +00:00
Guido van Rossum 067998f35e Add const to error and newstring functions 1996-12-10 15:33:34 +00:00
Guido van Rossum 36dd0d27c4 Fix operator priority bug found thanks to gcc -Wall. 1996-12-10 15:23:00 +00:00
Guido van Rossum e29ed8fa7c Make gcc -Wall happy; remove dummy variable (can't see where it's needed). 1996-12-10 15:21:30 +00:00
Guido van Rossum fb4130d1f1 Added extern decl for gethostname() to keep gcc -Wall happy. 1996-12-10 15:17:08 +00:00
Guido van Rossum 55db515a51 Great renaming.
Also got rid of the dummy variable, which was last needed in IRIX 4.x.
1996-12-10 00:32:31 +00:00
Guido van Rossum 09f99dfdba Removed redundant inclusion of <errno.h> (sorry, Roj!). 1996-12-10 00:12:14 +00:00
Roger E. Masse b0dfe969d9 renamed in a grand fashion. 1996-12-10 00:07:00 +00:00
Roger E. Masse 16f9fd2bcf Added a test script for dbmmodule.c and added it to testall.py and
updated testall.out
1996-12-10 00:06:24 +00:00
Barry Warsaw 3ac30af867 Added test_new 1996-12-10 00:02:57 +00:00
Barry Warsaw abb7efeb7c Renamed a few symbols that were found in comments. 1996-12-09 23:22:35 +00:00
Barry Warsaw 3bdf746c5c Renamed, ungrandly. We don't have the GNU MP library here so we can't
really test this module, or even compile it without a lot of work.

I'll make a note of it that this has not been tested!
1996-12-09 23:16:31 +00:00
Roger E. Masse 56c345b235 renamed grandly. 1996-12-09 23:14:26 +00:00
Roger E. Masse 75362381b5 new test script for cryptmodule.py 1996-12-09 23:13:45 +00:00
Roger E. Masse b6b85ddc95 Test script/output for cryptmodule.c added to testall.py and testall.out 1996-12-09 23:13:07 +00:00
Barry Warsaw 5632ce033f (python-cc-style): Although open braces for substatements typically
hang on the right side, if they are on a separate line, indent them
under the keyword.
1996-12-09 23:01:30 +00:00
Roger E. Masse 24070ca391 Renamed Grandly 1996-12-09 22:59:53 +00:00
Roger E. Masse 3daddda165 New test module for complex math module 1996-12-09 22:59:15 +00:00
Roger E. Masse b71035782e Added test_cmath.py to test complex math module 1996-12-09 22:58:42 +00:00
Barry Warsaw 3ab26b9d75 (testall.py): Slightly improved test harness to make it easier to add
simple tests.

(testall.py, testall.out): Added MD5 testsuite
1996-12-09 22:34:15 +00:00
Barry Warsaw 8b43b19ec9 Renamed 1996-12-09 22:32:36 +00:00
Roger E. Masse 5817f8f717 Removed some unneeded header files and reedited with a fixed-width font
from emacs as per recomendation from GvR
1996-12-09 22:24:19 +00:00
Barry Warsaw 8c0710fdd3 (python-cc-style): Oops, we decided to use TABs for 8 spaces where
possible.
1996-12-09 22:07:22 +00:00
Barry Warsaw 0b32459004 C coding standard for Python C files.
Currently fairly minimal, but I'll be adding to this as needed.  I
think it's pretty darn close.

To use this, just load the file and in a C buffer type:

M-x c-set-style RET python RET

[there are ways to automate much of this!]
1996-12-09 21:57:25 +00:00
Barry Warsaw 49852831fc Added test_strop 1996-12-09 21:49:55 +00:00
Barry Warsaw ad522facf7 Added tests of all strop module functions, and touching of module
variables
1996-12-09 21:49:10 +00:00
Guido van Rossum 6c832ebfe9 Added test_array output line. 1996-12-09 21:37:33 +00:00
Roger E. Masse 2919eaaf08 Renamed Grandly (I think). 1996-12-09 20:10:36 +00:00
Roger E. Masse 8db1b0764b module to test the arraymodule created and added to testall.py 1996-12-09 20:09:16 +00:00