Commit Graph

6517 Commits

Author SHA1 Message Date
Guido van Rossum 5ed5c4c364 Add the same _keep_alive patch (by Michael Scharff) that was added to
copy.deepcopy() a while ago.  Can't reproduce this but it doesn't
break anything and it looks like the code could have the same problem.
1997-09-03 00:23:54 +00:00
Guido van Rossum 15a40394b0 Fix the bug Jeremy was experiencing: both the close() and the
dealloc() functions contained code to free/DECREF the buffer
(there were differences between I and O objects but the logic bug was
the same).  Fixed this be setting the buffer pointer to NULL and
testing for that.  (This also makes it safe to call close() more than
once.)

XXX Worry: what if you try to read() or write() once the thing is
closed?
1997-09-03 00:09:26 +00:00
Jack Jansen 2d30840b92 Define BUILDNO in macbuildno.h (incremented by fullbuild) 1997-09-01 15:39:07 +00:00
Jack Jansen 68a0ee0a87 Can't remember... 1997-09-01 15:38:24 +00:00
Jack Jansen 898ac1bb46 Added GetTicks() here, so profiling can use a decent timer 1997-09-01 15:38:12 +00:00
Jack Jansen faad995380 Fullbuild now maintains BUILDNO for mac builds 1997-09-01 15:37:07 +00:00
Jack Jansen 04fb06f320 Names changed 1997-09-01 15:36:42 +00:00
Guido van Rossum 625f40de05 #typo 1997-08-30 20:04:42 +00:00
Guido van Rossum 28cad964ec Document newly revamped site configuration mechanism.
Damn the criticism in c.l.p!
1997-08-30 20:03:28 +00:00
Guido van Rossum 36764b8b0e Added docs for 'user' customization module. Renamed libuser.tex
(which had UserDict/UserList) to libuserdict.tex.
1997-08-30 20:02:25 +00:00
Guido van Rossum d7ed683a7e Inline PyObject_CallObject (Marc-Andre Lemburg). 1997-08-30 15:02:50 +00:00
Guido van Rossum b2afc811c2 Added os.altsep; this is '/' on DOS/Windows, and None on systems with
a sane filename syntax.
1997-08-29 22:37:44 +00:00
Guido van Rossum a28dab5ea2 Write out the dynamic OS choice, to avoid exec statements.
Adding support for a new OS is now a bit more work, but I bet that
'dos' or 'nt' will cover most situations...
1997-08-29 22:36:47 +00:00
Guido van Rossum 7922bd7382 Added -X option to suppress default import of site.py. Also split the
usage message in *three* parts under 510 bytes, for low-end ANSI
compatibility.
1997-08-29 22:34:47 +00:00
Guido van Rossum 3d90af967d Added NoSite flag. 1997-08-29 22:34:00 +00:00
Guido van Rossum dcc0c13f74 Two independent changes (oops):
- Changed semantics for initialized flag (again); forget the ref
counting, forget the fatal errors -- redundant calls to
Py_Initialize() or Py_Finalize() calls are simply ignored.

- Automatically import site.py on initialization, unless a flag is set
not to do this by main().
1997-08-29 22:32:42 +00:00
Guido van Rossum f30bec7bb2 New site.py semantics. Searches in
<*prefix>/lib/python<version>/packages for *.pth files containing
directories that are appended to sys.path.
1997-08-29 22:30:45 +00:00
Barry Warsaw 83b6709d8e Swap the sense of the -X option vis-a-vis Py_UseClassExceptionsFlag so
that class based exceptions are enabled by default.  -X disables them
in favor of the old-style string exceptions.
1997-08-29 22:20:16 +00:00
Barry Warsaw 757af0e7bb Removed obsolete exception PyExc_AccessError.
Added PyErr_MemoryErrorInst to hold the pre-instantiated instance when
using class based exceptions.

Simplified the creation of all built-in exceptions, both class based
and string based.  Actually, for class based exceptions, the string
ones are still created just in case there's a problem creating the
class based ones (so you still get *some* exception handling!).  Now
the init and fini functions run through a list of structure elements,
creating the strings (and optionally classes) for every entry.

initerrors(): the new base class exceptions StandardError,
LookupError, and NumberError are initialized when using string
exceptions, to tuples containing the list of derived string
exceptions.  This GvR trick enables forward compatibility!  One bit of
nastiness is that the C code has to know the inheritance tree embodied
in exceptions.py.

Added the two phase init and fini functions.
1997-08-29 22:13:51 +00:00
Barry Warsaw 035574d755 Added Py_UseClassExceptionsFlag, the variable containing the state of
the -X command line option.

Py_Initialize(): Handle the two phase initialization of the built-in
module.

Py_Finalize(): Handle the two phase finalization of the built-in
module.

parse_syntax_error(): New function which parses syntax errors that
PyErr_Print() will catch.  This correctly parses such errors
regardless of whether PyExc_SyntaxError is an old-style string
exception or new-fangled class exception.

PyErr_Print(): Many changes:

    1. Normalize the exception.

    2. Handle SystemExit exceptions which might be class based.  Digs
       the exit code out of the "code" attribute.  String based
       SystemExit is handled the same as before.

    3. Handle SyntaxError exceptions which might be class based.  Digs
       the various information bits out of the instance's attributes
       (see parse_syntax_error() for details).  String based
       SyntaxError still works too.

    4. Don't write the `:' after the exception if the exception is
       class based and has an empty string str() value.
1997-08-29 22:07:17 +00:00
Barry Warsaw d5a0ff972d Added extern definition for -X flag variable. 1997-08-29 22:01:11 +00:00
Barry Warsaw 3e613ce79b New file, which is imported by the built-in module when python is
started with the -X option.  This file contains the definitions for
the built-in exception classes.
1997-08-29 21:59:26 +00:00
Barry Warsaw 6ed41a0a87 Expanded r() function to handle class exceptions. 1997-08-29 21:58:25 +00:00
Barry Warsaw f488af3360 Parse new command line option -X which enables exception classes. 1997-08-29 21:57:49 +00:00
Barry Warsaw 0596c2ac28 Declarations for two phase initialization and finalization functions
for the built-in module.
1997-08-29 21:57:07 +00:00
Barry Warsaw 392d8272bf Added externs for three new exceptions PyExc_StandardError,
PyExc_NumberError, and PyExc_LookupError.  Also added extern for
pre-instantiated exception instance PyExc_MemoryErrorInst.

Removed extern of obsolete exception PyExc_AccessError.
1997-08-29 21:56:07 +00:00
Barry Warsaw 2d8adff10a PyErr_NoMemory(): If the pre-instantiated memory exception is non-null
(PyExc_MemoryErrorInst) raise this instead of PyExc_MemoryError.  This
only happens when exception classes are enabled (e.g. when Python is
started with -X).
1997-08-29 21:54:35 +00:00
Barry Warsaw dd82bb9c14 Added a new variable TESTPYTHON which contains the path (and args) for
the executable to use during regression testing.
1997-08-29 21:52:14 +00:00
Guido van Rossum 45140f97a6 Subtle changes to the AIX shared library things to make them work
when building outside the source directory.  Courtesy Donn Cave.
1997-08-29 18:44:06 +00:00
Guido van Rossum cf0be04b2c Should remove getbuildno.o/buildno files in clobber/distclean targets. 1997-08-29 18:42:35 +00:00
Guido van Rossum beef8aa719 Cprrect stuoid tyops -- was comparing variabes with themselves because
of co/cp mixup.
1997-08-29 17:12:43 +00:00
Barry Warsaw eaedc7ce32 eval_code2(), set_exc_info(): Call PyErr_NormalizeException() the
former rather than the latter, since PyErr_NormalizeException takes
PyObject** and I didn't want to change the interface for set_exc_info
(but I did want the changes propagated to eval_code2!).
1997-08-28 22:36:40 +00:00
Guido van Rossum c1f088201f Added (binaryfunc) casts to function pointers in method lists. 1997-08-28 21:21:22 +00:00
Guido van Rossum 24a49941b3 Some long variables should have been int to match the 'i' format specifier. 1997-08-28 18:11:05 +00:00
Guido van Rossum 02840fdf84 user.py -- when imported, execfile(~/.pythonrc.py). 1997-08-28 14:32:14 +00:00
Guido van Rossum 522578e90f Complete log of changes since 1.5a3 at the end. 1997-08-28 03:43:21 +00:00
Guido van Rossum a11b041537 Added faqwiz and webchecker. 1997-08-28 02:41:33 +00:00
Guido van Rossum 8c5fa91253 Added section about multiple FAQs. 1997-08-28 02:38:54 +00:00
Guido van Rossum f1ead1a63c New installation instructions show how to maintain multiple FAQs.
Removed bootstrap script from end of faqwiz.py module.
Added instructions to bootstrap script, too.
Version bumped to 0.8.
Added <html>...</html> feature suggested by Skip Montanaro.
Added leading text for Roulette, default to 'Hit Reload ...'.
Fix typo in default SRCDIR.
1997-08-28 02:38:01 +00:00
Guido van Rossum 8a2d216047 Removed faqmain.py -- it was an earlier implementation and no
longer relevant.
1997-08-27 22:31:18 +00:00
Guido van Rossum 282290f821 Referred to POSIX docs as well as to Unix docs. 1997-08-27 14:54:25 +00:00
Jack Jansen 09dcff793f Put all prints inside "if verbose:" 1997-08-27 14:11:15 +00:00
Jack Jansen ebacc2edff Removed debug print 1997-08-27 14:10:49 +00:00
Jack Jansen 82bfde9382 Modified for CW Pro projects and new filenames 1997-08-27 14:10:29 +00:00
Jack Jansen 8505ef8c6c Added #include <WETabs.h>, which had somehow gone missing 1997-08-27 14:09:25 +00:00
Jack Jansen 3412c5d0fb Modified for installer and new names of various applets. Also cleaned
up anything else I saw.
1997-08-27 14:08:22 +00:00
Jack Jansen 9ffa432972 Modified for new scripting support 1997-08-27 14:07:37 +00:00
Jack Jansen 21b5d605d8 Moved suites to their own folder 1997-08-27 13:49:18 +00:00
Guido van Rossum e2ed9df645 Fixed bugs regarding lines starting with '.' (both receiving and sending).
Added a minimal test function.
1997-08-26 23:26:18 +00:00
Guido van Rossum e20aef574a Ignore whitespace between formats (not internal to a count+format). 1997-08-26 20:39:54 +00:00