]> granicus.if.org Git - python/log
python
27 years agoAdded interface to the Balloon Help Manager
Jack Jansen [Tue, 9 Sep 1997 13:52:47 +0000 (13:52 +0000)]
Added interface to the Balloon Help Manager

27 years agoAdded old-exceptions and no-site-python preferences and upped version
Jack Jansen [Tue, 9 Sep 1997 13:51:17 +0000 (13:51 +0000)]
Added old-exceptions and no-site-python preferences and upped version
to 4.

27 years agoAdded old-exceptions and no-site-python options and upped preference
Jack Jansen [Tue, 9 Sep 1997 13:50:40 +0000 (13:50 +0000)]
Added old-exceptions and no-site-python options and upped preference
version to 4.
Added balloon-help item to options dialog.

27 years agoRenamed platform specific subdirectories to plat-*.
Guido van Rossum [Tue, 9 Sep 1997 03:50:59 +0000 (03:50 +0000)]
Renamed platform specific subdirectories to plat-*.

27 years agoRenamed dos_8x3 to dos-8x3.
Guido van Rossum [Tue, 9 Sep 1997 03:42:09 +0000 (03:42 +0000)]
Renamed dos_8x3 to dos-8x3.

27 years agoThese directories renamed: tkinter -> lib-tk, stdwin -> lib-stdwin.
Guido van Rossum [Tue, 9 Sep 1997 03:39:21 +0000 (03:39 +0000)]
These directories renamed: tkinter -> lib-tk, stdwin -> lib-stdwin.

27 years agoPatch submitted by Brad Howes (with one bug fixed by me): allow
Guido van Rossum [Mon, 8 Sep 1997 18:30:11 +0000 (18:30 +0000)]
Patch submitted by Brad Howes (with one bug fixed by me): allow
arbitrary nested parens in a %(...)X style format.
#Also folded two lines and added more detail to the error message for
#unsupported format character.

27 years agoAdded support for __all__, which should be a list of modules to be
Guido van Rossum [Mon, 8 Sep 1997 16:07:11 +0000 (16:07 +0000)]
Added support for __all__, which should be a list of modules to be
imported when the user says "from package import *".

27 years agoAdded test for __all__.
Guido van Rossum [Mon, 8 Sep 1997 16:06:20 +0000 (16:06 +0000)]
Added test for __all__.

27 years agoDunno, rebinhexed?
Jack Jansen [Mon, 8 Sep 1997 13:26:55 +0000 (13:26 +0000)]
Dunno, rebinhexed?

27 years agoPreferences is a general module to get (and set) preferences in
Jack Jansen [Mon, 8 Sep 1997 13:26:36 +0000 (13:26 +0000)]
Preferences is a general module to get (and set) preferences in
resource files with various inheritence rules, parsers, etc.

pythonprefs uses this to create a single uniform interface to all
relevant python preferences.

27 years agoPreference resource now has a version number
Jack Jansen [Mon, 8 Sep 1997 13:24:54 +0000 (13:24 +0000)]
Preference resource now has a version number

27 years agoMoved the include of macbuildno.h to getbuildinfo.c. Putting it here
Jack Jansen [Mon, 8 Sep 1997 13:24:23 +0000 (13:24 +0000)]
Moved the include of macbuildno.h to getbuildinfo.c. Putting it here
resulted in full recompilation every time.

27 years agoAdded SysBeep
Jack Jansen [Mon, 8 Sep 1997 13:23:19 +0000 (13:23 +0000)]
Added SysBeep

27 years agoThe preference resource now has a version number
Jack Jansen [Mon, 8 Sep 1997 13:22:49 +0000 (13:22 +0000)]
The preference resource now has a version number

27 years agosys.prefix and sys.exec_prefix are now set correctly.
Jack Jansen [Mon, 8 Sep 1997 13:22:22 +0000 (13:22 +0000)]
sys.prefix and sys.exec_prefix are now set correctly.

27 years agoThe python preference resource now has a version number, and
Jack Jansen [Mon, 8 Sep 1997 13:21:37 +0000 (13:21 +0000)]
The python preference resource now has a version number, and
"optimize" has replaced "don't print".

27 years agoMajor overhaul: this is now little more than a user interface, the
Jack Jansen [Mon, 8 Sep 1997 13:19:42 +0000 (13:19 +0000)]
Major overhaul: this is now little more than a user interface, the
preference handling code is in modules pythonprefs and preferences.
This should finally make it easier for someone (Just?) to write a
decent interface to preference setting, and it'll allow setting
initial sys.path and such from ConfigurePython.

27 years agoRun NumPy installer, if present.
Jack Jansen [Mon, 8 Sep 1997 13:16:29 +0000 (13:16 +0000)]
Run NumPy installer, if present.
Added a couple of splash screens to show what we're doing

27 years agoBrought up to date with new options and env vars.
Guido van Rossum [Mon, 8 Sep 1997 04:06:15 +0000 (04:06 +0000)]
Brought up to date with new options and env vars.

27 years ago#Adapt the doc string to reality.
Guido van Rossum [Mon, 8 Sep 1997 02:47:46 +0000 (02:47 +0000)]
#Adapt the doc string to reality.

27 years ago#Oops, missed a plat- prefix (for Lib/generic).
Guido van Rossum [Mon, 8 Sep 1997 02:31:17 +0000 (02:31 +0000)]
#Oops, missed a plat- prefix (for Lib/generic).

27 years agoSome nits, added a whole section on what you could do with
Guido van Rossum [Mon, 8 Sep 1997 02:20:57 +0000 (02:20 +0000)]
Some nits, added a whole section on what you could do with
metaclasses, and acks.

27 years agoSet it to 1.5a4, now we have dotted-name import...
Guido van Rossum [Mon, 8 Sep 1997 02:17:31 +0000 (02:17 +0000)]
Set it to 1.5a4, now we have dotted-name import...

27 years agoInitialize self.__tempfiles to [] in the constructor (else it remains
Guido van Rossum [Mon, 8 Sep 1997 02:16:33 +0000 (02:16 +0000)]
Initialize self.__tempfiles to [] in the constructor (else it remains
a shared class variable -- but each instance will attempt to clean it
up entirely ob cleanup).

27 years agoChange packages -> site-packages
Guido van Rossum [Mon, 8 Sep 1997 02:14:09 +0000 (02:14 +0000)]
Change packages -> site-packages

27 years ago*Semantic change*: when unpickling the instance variables of an
Guido van Rossum [Mon, 8 Sep 1997 02:08:11 +0000 (02:08 +0000)]
*Semantic change*: when unpickling the instance variables of an
instance, use inst.__dict__.update(value) instead of a for loop with
setattr() over the value.keys().  This is more consistent (the
pickling doesn't use getattr() either but pickles inst.__dict__) and
avoids problems with instances that have a __setattr__ hook.

But it *is* a semantic change (because the setattr hook is no longer
used).  So beware!

27 years agoIndent the #error so that a strict K&R cpp doesn't complain.
Guido van Rossum [Mon, 8 Sep 1997 02:04:00 +0000 (02:04 +0000)]
Indent the #error so that a strict K&R cpp doesn't complain.

27 years agoChange packages to site-packages (so it's clearly not a package itself).
Guido van Rossum [Mon, 8 Sep 1997 02:02:37 +0000 (02:02 +0000)]
Change packages to site-packages (so it's clearly not a package itself).

27 years agoPrefix MACHDEP directory with 'plat-'.
Guido van Rossum [Mon, 8 Sep 1997 01:56:35 +0000 (01:56 +0000)]
Prefix MACHDEP directory with 'plat-'.

27 years agoChange the names of the subdirectories tkinter and stdwin to
Guido van Rossum [Mon, 8 Sep 1997 01:54:43 +0000 (01:54 +0000)]
Change the names of the subdirectories tkinter and stdwin to
lib-tk and lib-stdwin.  (BTW this was also done in the previous
checkin of (toplevel)/Makefile.in, though not noted in the checkin
message.)

27 years agoForgot to install the test/output directory!
Guido van Rossum [Mon, 8 Sep 1997 01:51:23 +0000 (01:51 +0000)]
Forgot to install the test/output directory!

27 years agoLook for uuencoded test files in the directory containing this module, too.
Guido van Rossum [Sun, 7 Sep 1997 16:54:34 +0000 (16:54 +0000)]
Look for uuencoded test files in the directory containing this module, too.
(This is necessary because when imported as test.test_rgbimg, the test
directory is not on sys.path.)

27 years agoLook for uuencoded test files in the directory containing this module, too.
Guido van Rossum [Sun, 7 Sep 1997 16:50:45 +0000 (16:50 +0000)]
Look for uuencoded test files in the directory containing this module, too.
(This is necessary because when imported as test.test_rgbimg, the test
directory is not on sys.path.)

27 years agoReverse the order in which Setup and Setup.local are passed to the
Guido van Rossum [Sun, 7 Sep 1997 16:44:37 +0000 (16:44 +0000)]
Reverse the order in which Setup and Setup.local are passed to the
makesetup script.  (Sorry Sjoerd -- I know you proposed this a while
ago and I didn't think it would work then.  I looked again and it
does work.)

27 years agoPass optional arguments (globals(), locals(), []) to __import__() so
Guido van Rossum [Sun, 7 Sep 1997 16:42:34 +0000 (16:42 +0000)]
Pass optional arguments (globals(), locals(), []) to __import__() so
it will run as package test, e.g. this will run the test suite:

    import test.regrtest
    test.regrtest.main()

27 years agoBugfix: import A.B from inside package was busted by mark_miss optimization.
Guido van Rossum [Sun, 7 Sep 1997 06:16:57 +0000 (06:16 +0000)]
Bugfix: import A.B from inside package was busted by mark_miss optimization.

27 years agoFix details in the test:
Guido van Rossum [Sun, 7 Sep 1997 06:12:11 +0000 (06:12 +0000)]
Fix details in the test:
- traceback should go to stdout!
- don't import ni, import t1!
- nicer support for command line options, only if run as __main__

27 years agoAdded warning about ni's obsolescence. Retracted semantic changes
Guido van Rossum [Sun, 7 Sep 1997 03:02:39 +0000 (03:02 +0000)]
Added warning about ni's obsolescence.  Retracted semantic changes
(i.e. when using ni, the old __init__.py semantics prevail!)

27 years agoInitial revision
Guido van Rossum [Sun, 7 Sep 1997 02:56:35 +0000 (02:56 +0000)]
Initial revision

27 years agoSignificant speedup -- when a submodule imports a global module, add a
Guido van Rossum [Sat, 6 Sep 1997 20:29:52 +0000 (20:29 +0000)]
Significant speedup -- when a submodule imports a global module, add a
dummy entry to sys.modules, marking the absence of a submodule by the
same name.

Thus, if module foo.bar executes the statement "import time",
sys.modules['foo.time'] will be set to None, once the absence of a
module foo.time is confirmed (by looking for it in foo's path).

The next time when foo.bar (or any other submodule of foo) executes
"import time", no I/O is necessary to determine that there is no
module foo.time.

(Justification: It may seem strange to pollute sys.modules.  However,
since we're doing the lookup anyway it's definitely the fastest
solution.  This is the same convention that 'ni' uses and I haven't
heard any complaints.)

27 years agoAdded feeble test for reload() of packages and submodules.
Guido van Rossum [Sat, 6 Sep 1997 19:58:53 +0000 (19:58 +0000)]
Added feeble test for reload() of packages and submodules.

27 years agoFix reload() for package submodules.
Guido van Rossum [Sat, 6 Sep 1997 19:41:09 +0000 (19:41 +0000)]
Fix reload() for package submodules.

27 years agoPhase two of package import. "import a.b.c" and all variants now do the
Guido van Rossum [Sat, 6 Sep 1997 18:52:03 +0000 (18:52 +0000)]
Phase two of package import.  "import a.b.c" and all variants now do the
right thing.

Still to do:

- Make reload() of a submodule work.

- Performance tweaks -- currently, a submodule that tries to import a
global module *always* searches the package directory first, even if
the global module was already imported.  Not sure how to solve this
one; probably need to record misses per package.

- Documentation!

27 years ago#Added prototype for PyObject_HasAttr() -- must've been an oversight.
Guido van Rossum [Sat, 6 Sep 1997 18:44:59 +0000 (18:44 +0000)]
#Added prototype for PyObject_HasAttr() -- must've been an oversight.

27 years agoTest set for package import.
Guido van Rossum [Sat, 6 Sep 1997 18:42:57 +0000 (18:42 +0000)]
Test set for package import.

27 years agoFixed some details of printing the str() of an exception. This fixes
Guido van Rossum [Fri, 5 Sep 1997 19:11:53 +0000 (19:11 +0000)]
Fixed some details of printing the str() of an exception.  This fixes
a core dump when __str__() returns a non-string, and plugs a memory
leak as well: the result of PyObject_Str() was never DECREFed.

27 years agoMade the 'info' argument to SyntaxError optional, so phase-2 syntax
Guido van Rossum [Fri, 5 Sep 1997 19:00:56 +0000 (19:00 +0000)]
Made the 'info' argument to SyntaxError optional, so phase-2 syntax
errors are handled (these gave ``TypeError: not enough arguments'').

Also changed its __str__() to correct a typo (missing self.) and
return str(self.msg) to ensure the result is always string.

Also changed the default __str__ to simply return str(self.args).

27 years agoFix in trailing comment: PyDict_SetItemString() does *not* consume a reference
Fred Drake [Fri, 5 Sep 1997 17:53:53 +0000 (17:53 +0000)]
Fix in trailing comment:  PyDict_SetItemString() does *not* consume a reference
count, PyList_SetItem() does.  Very confusing!

27 years agoFirst part of package support.
Guido van Rossum [Fri, 5 Sep 1997 07:33:22 +0000 (07:33 +0000)]
First part of package support.

This doesn't yet support "import a.b.c" or "from a.b.c import x", but
it does recognize directories.  When importing a directory, it
initializes __path__ to a list containing the directory name, and
loads the __init__ module if found.

The (internal) find_module() and load_module() functions are
restructured so that they both also handle built-in and frozen modules
and Mac resources (and directories of course).  The imp module's
find_module() and (new) load_module() also have this functionality.
Moreover, imp unconditionally defines constants for all module types,
and has two more new functions: find_module_in_package() and
find_module_in_directory().

There's also a new API function, PyImport_ImportModuleEx(), which
takes all four __import__ arguments (name, globals, locals, fromlist).
The last three may be NULL.  This is currently the same as
PyImport_ImportModule() but in the future it will be able to do
relative dotted-path imports.

Other changes:

- bltinmodule.c: in __import__, call PyImport_ImportModuleEx().

- ceval.c: always pass the fromlist to __import__, even if it is a C
function, so PyImport_ImportModuleEx() is useful.

- getmtime.c: the function has a second argument, the FILE*, on which
it applies fstat().  According to Sjoerd this is much faster.  The
first (pathname) argument is ignored, but remains for backward
compatibility (so the Mac version still works without changes).

By cleverly combining the new imp functionality, the full support for
dotted names in Python (mini.py, not checked in) is now about 7K,
lavishly commented (vs. 14K for ni plus 11K for ihooks, also lavishly
commented).

Good night!

27 years agoAdded PyImport_ImportModuleEx(name, globals, locals, fromlist); this
Guido van Rossum [Fri, 5 Sep 1997 07:11:32 +0000 (07:11 +0000)]
Added PyImport_ImportModuleEx(name, globals, locals, fromlist); this
is like PyImport_ImporModule(name) but receives the globals and locals
dict and the fromlist arguments as well.  (The name is a char*; the
others are PyObject*s).

27 years agoContribution by Hannu Krosing (with some changes).
Guido van Rossum [Fri, 5 Sep 1997 07:08:39 +0000 (07:08 +0000)]
Contribution by Hannu Krosing (with some changes).

Added 'p' format character for Pascal string (i.e. leading length
byte).  This uses the count prefix line 's' does, except that the
count includes the length byte; i.e. '10p' takes 10 bytes packed but
has space for a length byte and 9 data bytes.

27 years agoDon't use ANSI string literal concatenation (everything is K&R compatible).
Guido van Rossum [Fri, 5 Sep 1997 07:01:19 +0000 (07:01 +0000)]
Don't use ANSI string literal concatenation (everything is K&R compatible).

27 years agoGet rid of most silly #include and #ifdefs near the top; these are all
Guido van Rossum [Fri, 5 Sep 1997 01:48:48 +0000 (01:48 +0000)]
Get rid of most silly #include and #ifdefs near the top; these are all
obsolete now it includes Python.h.

Make all functions K&R compatible (Sue Williams).

27 years agoNow produces some reassuring output.
Jeremy Hylton [Thu, 4 Sep 1997 23:42:01 +0000 (23:42 +0000)]
Now produces some reassuring output.

27 years agoMany more tests, including tests of many optional arguments.
Jeremy Hylton [Thu, 4 Sep 1997 23:41:37 +0000 (23:41 +0000)]
Many more tests, including tests of many optional arguments.

27 years agoSeveral changes:
Jeremy Hylton [Thu, 4 Sep 1997 23:39:23 +0000 (23:39 +0000)]
Several changes:

1. Fix bug in (de)compression objects.  The final string resize used
zst.total_out to determine the length of the string, but the
(de)compression object will output data a little bit at a time, which
means total_out is not the string size.  Fix: save original value of
total_out at the start of the call.

2. Be sure to Py_DECREF the result value if you exit with an
exception.

3. Use PyInt_FromLong instead of Py_BuildValue

4. include more constants from the zlib header file

5. Use PyErr_Format instead of using a local buffer and sprintf.

27 years agoAdded some try-excepts so that it can be imported in restricted mode
Guido van Rossum [Thu, 4 Sep 1997 22:12:34 +0000 (22:12 +0000)]
Added some try-excepts so that it can be imported in restricted mode
(though some type names are undefined in that case, e.g. CodeType
(inaccessible), FileType (not always accessible), and TracebackType
and FrameType (inaccessible).

27 years agoThe re test suite is very slow on slower hosts.
Guido van Rossum [Thu, 4 Sep 1997 14:35:45 +0000 (14:35 +0000)]
The re test suite is very slow on slower hosts.
To save time, only run the first and last 10 tests except in verbose mode.

27 years agoAdded first line to set Emacs makefile mode (pretty colors :-)
Barry Warsaw [Thu, 4 Sep 1997 13:05:14 +0000 (13:05 +0000)]
Added first line to set Emacs makefile mode (pretty colors :-)

27 years ago(py-parse-partial-sexp-works-p): Removed as obsolete. All current
Barry Warsaw [Thu, 4 Sep 1997 04:18:07 +0000 (04:18 +0000)]
(py-parse-partial-sexp-works-p): Removed as obsolete.  All current
Emacs and XEmacs versions should have working parse-partial-sexp's.

(py-emacs-features): Defined as future placeholder.

27 years agoDifferent test for Unix -- rely on os.sep instead of sys.platform.
Guido van Rossum [Wed, 3 Sep 1997 23:12:18 +0000 (23:12 +0000)]
Different test for Unix -- rely on os.sep instead of sys.platform.

27 years agoOne patch from Sjoerd and one from Jack.
Guido van Rossum [Wed, 3 Sep 1997 22:36:15 +0000 (22:36 +0000)]
One patch from Sjoerd and one from Jack.

Sjoerd: add separate administration of temporary files created y
URLopener.retrieve() so cleanup can properly remove them.  The old
code removed everything in tempcache which was a bad idea if the user
had passed a non-temp file into it.  (I added a line to delete the
tempcache in cleanup() -- it still seems to make sense.)

Jack: in basejoin(), interpret relative paths starting in "../".  This
is necessary if the server uses symbolic links.

27 years agoGive in to Mike Meyer -- add *both* lib/python1.5/packages and
Guido van Rossum [Wed, 3 Sep 1997 22:05:54 +0000 (22:05 +0000)]
Give in to Mike Meyer -- add *both* lib/python1.5/packages and
lib/site-python to the path (if they exist).  This is a reasonable
compromise.

27 years agoGive in to Mike Meyer -- add *both* lib/python1.5/packages and
Guido van Rossum [Wed, 3 Sep 1997 21:41:30 +0000 (21:41 +0000)]
Give in to Mike Meyer -- add *both* lib/python1.5/packages and
lib/site-python to the path (if they exist).  This is a reasonable
compromise.

27 years ago#Plug small memory leaks in constructors.
Guido van Rossum [Wed, 3 Sep 1997 18:19:40 +0000 (18:19 +0000)]
#Plug small memory leaks in constructors.

27 years agoPlug small leaks: the [de]compress object itself was never freed.
Guido van Rossum [Wed, 3 Sep 1997 18:14:30 +0000 (18:14 +0000)]
Plug small leaks: the [de]compress object itself was never freed.

27 years agoAdded some symbols (I'm afraid more will come).
Guido van Rossum [Wed, 3 Sep 1997 16:12:00 +0000 (16:12 +0000)]
Added some symbols (I'm afraid more will come).

27 years agoChange instructions to require use of PCbuild directory (instead of
Guido van Rossum [Wed, 3 Sep 1997 16:11:19 +0000 (16:11 +0000)]
Change instructions to require use of PCbuild directory (instead of
just recommending it).  At Mark Hammond's request.

27 years agoAt Mark Hammond's suggestion:
Guido van Rossum [Wed, 3 Sep 1997 16:10:52 +0000 (16:10 +0000)]
At Mark Hammond's suggestion:

- use the DLL versions of the C runtime (!)
- change path settings so intermediate files go to Debug/temp or Release/temp
- add resource file to python15.dll (can't remember what this does)
- add a separate project to build the parser module

27 years agoAdded empty PCbuild directory for use by the NT build process.
Guido van Rossum [Wed, 3 Sep 1997 15:37:50 +0000 (15:37 +0000)]
Added empty PCbuild directory for use by the NT build process.

27 years agoAdded new flags and exceptions; removed AccessError exception.
Guido van Rossum [Wed, 3 Sep 1997 01:09:25 +0000 (01:09 +0000)]
Added new flags and exceptions; removed AccessError exception.

27 years agoChange [_Py_]re_compile_pattern() to return a char*.
Guido van Rossum [Wed, 3 Sep 1997 00:47:36 +0000 (00:47 +0000)]
Change [_Py_]re_compile_pattern() to return a char*.
Since it only returns an error message (or NULL) there's no reason
for it to be unsigned char *, and various compilers like this better.

27 years agoMod suggested by Donn Cave -- invoke makexp_aix relative to $0
Guido van Rossum [Wed, 3 Sep 1997 00:45:30 +0000 (00:45 +0000)]
Mod suggested by Donn Cave -- invoke makexp_aix relative to $0
so it doesn't have to be on $PATH.

27 years agoDisable the portable multimedia modules (audioop, imageop, rgbimg) by
Guido van Rossum [Wed, 3 Sep 1997 00:44:14 +0000 (00:44 +0000)]
Disable the portable multimedia modules (audioop, imageop, rgbimg) by
default since they don't work on 64-bit platforms.

27 years ago#Removed debug print that was accidentally left in.
Guido van Rossum [Wed, 3 Sep 1997 00:35:38 +0000 (00:35 +0000)]
#Removed debug print that was accidentally left in.

27 years agoAdd the same _keep_alive patch (by Michael Scharff) that was added to
Guido van Rossum [Wed, 3 Sep 1997 00:23:54 +0000 (00:23 +0000)]
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.

27 years agoFix the bug Jeremy was experiencing: both the close() and the
Guido van Rossum [Wed, 3 Sep 1997 00:09:26 +0000 (00:09 +0000)]
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?

27 years agoDefine BUILDNO in macbuildno.h (incremented by fullbuild)
Jack Jansen [Mon, 1 Sep 1997 15:39:07 +0000 (15:39 +0000)]
Define BUILDNO in macbuildno.h (incremented by fullbuild)

27 years agoCan't remember...
Jack Jansen [Mon, 1 Sep 1997 15:38:24 +0000 (15:38 +0000)]
Can't remember...

27 years agoAdded GetTicks() here, so profiling can use a decent timer
Jack Jansen [Mon, 1 Sep 1997 15:38:12 +0000 (15:38 +0000)]
Added GetTicks() here, so profiling can use a decent timer

27 years agoFullbuild now maintains BUILDNO for mac builds
Jack Jansen [Mon, 1 Sep 1997 15:37:07 +0000 (15:37 +0000)]
Fullbuild now maintains BUILDNO for mac builds

27 years agoNames changed
Jack Jansen [Mon, 1 Sep 1997 15:36:42 +0000 (15:36 +0000)]
Names changed

27 years ago#typo
Guido van Rossum [Sat, 30 Aug 1997 20:04:42 +0000 (20:04 +0000)]
#typo

27 years agoDocument newly revamped site configuration mechanism.
Guido van Rossum [Sat, 30 Aug 1997 20:03:28 +0000 (20:03 +0000)]
Document newly revamped site configuration mechanism.
Damn the criticism in c.l.p!

27 years agoAdded docs for 'user' customization module. Renamed libuser.tex
Guido van Rossum [Sat, 30 Aug 1997 20:02:25 +0000 (20:02 +0000)]
Added docs for 'user' customization module.  Renamed libuser.tex
(which had UserDict/UserList) to libuserdict.tex.

27 years agoInline PyObject_CallObject (Marc-Andre Lemburg).
Guido van Rossum [Sat, 30 Aug 1997 15:02:50 +0000 (15:02 +0000)]
Inline PyObject_CallObject (Marc-Andre Lemburg).

27 years agoAdded os.altsep; this is '/' on DOS/Windows, and None on systems with
Guido van Rossum [Fri, 29 Aug 1997 22:37:44 +0000 (22:37 +0000)]
Added os.altsep; this is '/' on DOS/Windows, and None on systems with
a sane filename syntax.

27 years agoWrite out the dynamic OS choice, to avoid exec statements.
Guido van Rossum [Fri, 29 Aug 1997 22:36:47 +0000 (22:36 +0000)]
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...

27 years agoAdded -X option to suppress default import of site.py. Also split the
Guido van Rossum [Fri, 29 Aug 1997 22:34:47 +0000 (22:34 +0000)]
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.

27 years agoAdded NoSite flag.
Guido van Rossum [Fri, 29 Aug 1997 22:34:00 +0000 (22:34 +0000)]
Added NoSite flag.

27 years agoTwo independent changes (oops):
Guido van Rossum [Fri, 29 Aug 1997 22:32:42 +0000 (22:32 +0000)]
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().

27 years agoNew site.py semantics. Searches in
Guido van Rossum [Fri, 29 Aug 1997 22:30:45 +0000 (22:30 +0000)]
New site.py semantics.  Searches in
<*prefix>/lib/python<version>/packages for *.pth files containing
directories that are appended to sys.path.

27 years agoSwap the sense of the -X option vis-a-vis Py_UseClassExceptionsFlag so
Barry Warsaw [Fri, 29 Aug 1997 22:20:16 +0000 (22:20 +0000)]
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.

27 years agoRemoved obsolete exception PyExc_AccessError.
Barry Warsaw [Fri, 29 Aug 1997 22:13:51 +0000 (22:13 +0000)]
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.

27 years agoAdded Py_UseClassExceptionsFlag, the variable containing the state of
Barry Warsaw [Fri, 29 Aug 1997 22:07:17 +0000 (22:07 +0000)]
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.

27 years agoAdded extern definition for -X flag variable.
Barry Warsaw [Fri, 29 Aug 1997 22:01:11 +0000 (22:01 +0000)]
Added extern definition for -X flag variable.

27 years agoNew file, which is imported by the built-in module when python is
Barry Warsaw [Fri, 29 Aug 1997 21:59:26 +0000 (21:59 +0000)]
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.

27 years agoExpanded r() function to handle class exceptions.
Barry Warsaw [Fri, 29 Aug 1997 21:58:25 +0000 (21:58 +0000)]
Expanded r() function to handle class exceptions.

27 years agoParse new command line option -X which enables exception classes.
Barry Warsaw [Fri, 29 Aug 1997 21:57:49 +0000 (21:57 +0000)]
Parse new command line option -X which enables exception classes.