675cda0 | Jack Jansen | 09 September 1997, 13:57:15 UTC | Added a button to increment buildno, so it doesn't happen automatically all the time. | 09 September 1997, 13:57:15 UTC |
37b4b49 | Jack Jansen | 09 September 1997, 13:56:34 UTC | Added balloon help for options dialog. Added Help module. Checked in PythonCore.prj.hqx (which had somehow slipped through until now) | 09 September 1997, 13:56:34 UTC |
01cfe36 | Jack Jansen | 09 September 1997, 13:54:25 UTC | Added no-site-python and old-exceptions preferences. Implemented balloon help for options dialog. | 09 September 1997, 13:54:25 UTC |
36b983c | Jack Jansen | 09 September 1997, 13:53:21 UTC | Added old-exception and no-site-python options and balloon help | 09 September 1997, 13:53:21 UTC |
bf2f602 | Jack Jansen | 09 September 1997, 13:52:47 UTC | Added interface to the Balloon Help Manager | 09 September 1997, 13:52:47 UTC |
6954e34 | Jack Jansen | 09 September 1997, 13:51:17 UTC | Added old-exceptions and no-site-python preferences and upped version to 4. | 09 September 1997, 13:51:17 UTC |
c6bb281 | Jack Jansen | 09 September 1997, 13:50:40 UTC | Added old-exceptions and no-site-python options and upped preference version to 4. Added balloon-help item to options dialog. | 09 September 1997, 13:50:40 UTC |
1c0d851 | Guido van Rossum | 09 September 1997, 03:50:59 UTC | Renamed platform specific subdirectories to plat-*. | 09 September 1997, 03:50:59 UTC |
5c1f5bd | Guido van Rossum | 09 September 1997, 03:42:09 UTC | Renamed dos_8x3 to dos-8x3. | 09 September 1997, 03:42:09 UTC |
d7500fc | Guido van Rossum | 09 September 1997, 03:39:21 UTC | These directories renamed: tkinter -> lib-tk, stdwin -> lib-stdwin. | 09 September 1997, 03:39:21 UTC |
045e688 | Guido van Rossum | 08 September 1997, 18:30:11 UTC | 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. | 08 September 1997, 18:30:11 UTC |
9905ef9 | Guido van Rossum | 08 September 1997, 16:07:11 UTC | Added support for __all__, which should be a list of modules to be imported when the user says "from package import *". | 08 September 1997, 16:07:11 UTC |
c8bf884 | Guido van Rossum | 08 September 1997, 16:06:20 UTC | Added test for __all__. | 08 September 1997, 16:06:20 UTC |
e632380 | Jack Jansen | 08 September 1997, 13:26:55 UTC | Dunno, rebinhexed? | 08 September 1997, 13:26:55 UTC |
8a99a8a | Jack Jansen | 08 September 1997, 13:26:36 UTC | 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. | 08 September 1997, 13:26:36 UTC |
447e01b | Jack Jansen | 08 September 1997, 13:24:54 UTC | Preference resource now has a version number | 08 September 1997, 13:24:54 UTC |
222c34e | Jack Jansen | 08 September 1997, 13:24:23 UTC | Moved the include of macbuildno.h to getbuildinfo.c. Putting it here resulted in full recompilation every time. | 08 September 1997, 13:24:23 UTC |
2e871e4 | Jack Jansen | 08 September 1997, 13:23:19 UTC | Added SysBeep | 08 September 1997, 13:23:19 UTC |
5b3c971 | Jack Jansen | 08 September 1997, 13:22:49 UTC | The preference resource now has a version number | 08 September 1997, 13:22:49 UTC |
ac62569 | Jack Jansen | 08 September 1997, 13:22:22 UTC | sys.prefix and sys.exec_prefix are now set correctly. | 08 September 1997, 13:22:22 UTC |
80cf5a8 | Jack Jansen | 08 September 1997, 13:21:37 UTC | The python preference resource now has a version number, and "optimize" has replaced "don't print". | 08 September 1997, 13:21:37 UTC |
3b3a287 | Jack Jansen | 08 September 1997, 13:19:42 UTC | 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. | 08 September 1997, 13:19:42 UTC |
d024083 | Jack Jansen | 08 September 1997, 13:16:29 UTC | Run NumPy installer, if present. Added a couple of splash screens to show what we're doing | 08 September 1997, 13:16:29 UTC |
4cf4de5 | Guido van Rossum | 08 September 1997, 04:06:15 UTC | Brought up to date with new options and env vars. | 08 September 1997, 04:06:15 UTC |
e8fd143 | Guido van Rossum | 08 September 1997, 02:47:46 UTC | #Adapt the doc string to reality. | 08 September 1997, 02:47:46 UTC |
6d91101 | Guido van Rossum | 08 September 1997, 02:31:17 UTC | #Oops, missed a plat- prefix (for Lib/generic). | 08 September 1997, 02:31:17 UTC |
7b877a9 | Guido van Rossum | 08 September 1997, 02:20:57 UTC | Some nits, added a whole section on what you could do with metaclasses, and acks. | 08 September 1997, 02:20:57 UTC |
7ca65ab | Guido van Rossum | 08 September 1997, 02:17:31 UTC | Set it to 1.5a4, now we have dotted-name import... | 08 September 1997, 02:17:31 UTC |
1049932 | Guido van Rossum | 08 September 1997, 02:16:33 UTC | 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). | 08 September 1997, 02:16:33 UTC |
62b297b | Guido van Rossum | 08 September 1997, 02:14:09 UTC | Change packages -> site-packages | 08 September 1997, 02:14:09 UTC |
d6ead32 | Guido van Rossum | 08 September 1997, 02:08:11 UTC | *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! | 08 September 1997, 02:08:11 UTC |
75626a3 | Guido van Rossum | 08 September 1997, 02:04:00 UTC | Indent the #error so that a strict K&R cpp doesn't complain. | 08 September 1997, 02:04:00 UTC |
9cf4e2b | Guido van Rossum | 08 September 1997, 02:02:37 UTC | Change packages to site-packages (so it's clearly not a package itself). | 08 September 1997, 02:02:37 UTC |
bbd6152 | Guido van Rossum | 08 September 1997, 01:56:35 UTC | Prefix MACHDEP directory with 'plat-'. | 08 September 1997, 01:56:35 UTC |
ab61c6b | Guido van Rossum | 08 September 1997, 01:54:43 UTC | 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.) | 08 September 1997, 01:54:43 UTC |
38bbbc7 | Guido van Rossum | 08 September 1997, 01:51:23 UTC | Forgot to install the test/output directory! | 08 September 1997, 01:51:23 UTC |
eeadc04 | Guido van Rossum | 07 September 1997, 16:54:34 UTC | 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.) | 07 September 1997, 16:54:34 UTC |
bc8b2bd | Guido van Rossum | 07 September 1997, 16:50:45 UTC | 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.) | 07 September 1997, 16:50:45 UTC |
970f5d3 | Guido van Rossum | 07 September 1997, 16:44:37 UTC | 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.) | 07 September 1997, 16:44:37 UTC |
f9fa20b | Guido van Rossum | 07 September 1997, 16:42:34 UTC | 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() | 07 September 1997, 16:42:34 UTC |
0c81945 | Guido van Rossum | 07 September 1997, 06:16:57 UTC | Bugfix: import A.B from inside package was busted by mark_miss optimization. | 07 September 1997, 06:16:57 UTC |
10887a3 | Guido van Rossum | 07 September 1997, 06:12:11 UTC | 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__ | 07 September 1997, 06:12:11 UTC |
1622112 | Guido van Rossum | 07 September 1997, 03:02:39 UTC | Added warning about ni's obsolescence. Retracted semantic changes (i.e. when using ni, the old __init__.py semantics prevail!) | 07 September 1997, 03:02:39 UTC |
5938011 | Guido van Rossum | 07 September 1997, 02:56:35 UTC | Initial revision | 07 September 1997, 02:56:35 UTC |
f5f5fdb | Guido van Rossum | 06 September 1997, 20:29:52 UTC | 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.) | 06 September 1997, 20:29:52 UTC |
81da02e | Guido van Rossum | 06 September 1997, 19:58:53 UTC | Added feeble test for reload() of packages and submodules. | 06 September 1997, 19:58:53 UTC |
222ef56 | Guido van Rossum | 06 September 1997, 19:41:09 UTC | Fix reload() for package submodules. | 06 September 1997, 19:41:09 UTC |
17fc85f | Guido van Rossum | 06 September 1997, 18:52:03 UTC | 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! | 06 September 1997, 18:52:03 UTC |
114c1ea | Guido van Rossum | 06 September 1997, 18:44:59 UTC | #Added prototype for PyObject_HasAttr() -- must've been an oversight. | 06 September 1997, 18:44:59 UTC |
6c61242 | Guido van Rossum | 06 September 1997, 18:42:57 UTC | Test set for package import. | 06 September 1997, 18:42:57 UTC |
d6bf45b | Guido van Rossum | 05 September 1997, 19:11:53 UTC | 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. | 05 September 1997, 19:11:53 UTC |
f394f56 | Guido van Rossum | 05 September 1997, 19:00:56 UTC | 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). | 05 September 1997, 19:00:56 UTC |
49bb0e3 | Fred Drake | 05 September 1997, 17:53:53 UTC | Fix in trailing comment: PyDict_SetItemString() does *not* consume a reference count, PyList_SetItem() does. Very confusing! | 05 September 1997, 17:53:53 UTC |
aee0bad | Guido van Rossum | 05 September 1997, 07:33:22 UTC | 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! | 05 September 1997, 07:33:22 UTC |
026de19 | Guido van Rossum | 05 September 1997, 07:11:32 UTC | 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). | 05 September 1997, 07:11:32 UTC |
9eb671f | Guido van Rossum | 05 September 1997, 07:08:39 UTC | 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. | 05 September 1997, 07:08:39 UTC |
bd4435a | Guido van Rossum | 05 September 1997, 07:01:19 UTC | Don't use ANSI string literal concatenation (everything is K&R compatible). | 05 September 1997, 07:01:19 UTC |
8102c00 | Guido van Rossum | 05 September 1997, 01:48:48 UTC | 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). | 05 September 1997, 01:48:48 UTC |
6459627 | Jeremy Hylton | 04 September 1997, 23:42:01 UTC | Now produces some reassuring output. | 04 September 1997, 23:42:01 UTC |
9dc2b8e | Jeremy Hylton | 04 September 1997, 23:41:37 UTC | Many more tests, including tests of many optional arguments. | 04 September 1997, 23:41:37 UTC |
cb91404 | Jeremy Hylton | 04 September 1997, 23:39:23 UTC | 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. | 04 September 1997, 23:39:23 UTC |
898c915 | Guido van Rossum | 04 September 1997, 22:12:34 UTC | 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). | 04 September 1997, 22:12:34 UTC |
d807b75 | Guido van Rossum | 04 September 1997, 14:35:45 UTC | 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. | 04 September 1997, 14:35:45 UTC |
c7736b9 | Barry Warsaw | 04 September 1997, 13:05:14 UTC | Added first line to set Emacs makefile mode (pretty colors :-) | 04 September 1997, 13:05:14 UTC |
c12c62e | Barry Warsaw | 04 September 1997, 04:18:07 UTC | (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. | 04 September 1997, 04:18:07 UTC |
dc5d07d | Guido van Rossum | 03 September 1997, 23:12:18 UTC | Different test for Unix -- rely on os.sep instead of sys.platform. | 03 September 1997, 23:12:18 UTC |
2b3fd76 | Guido van Rossum | 03 September 1997, 22:36:15 UTC | 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. | 03 September 1997, 22:36:15 UTC |
f01dff7 | Guido van Rossum | 03 September 1997, 22:05:54 UTC | 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. | 03 September 1997, 22:05:54 UTC |
ad87d3e | Guido van Rossum | 03 September 1997, 21:41:30 UTC | 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. | 03 September 1997, 21:41:30 UTC |
9efe8ef | Guido van Rossum | 03 September 1997, 18:19:40 UTC | #Plug small memory leaks in constructors. | 03 September 1997, 18:19:40 UTC |
c3beda2 | Guido van Rossum | 03 September 1997, 18:14:30 UTC | Plug small leaks: the [de]compress object itself was never freed. | 03 September 1997, 18:14:30 UTC |
d5f0ce9 | Guido van Rossum | 03 September 1997, 16:12:00 UTC | Added some symbols (I'm afraid more will come). | 03 September 1997, 16:12:00 UTC |
fd91056 | Guido van Rossum | 03 September 1997, 16:11:19 UTC | Change instructions to require use of PCbuild directory (instead of just recommending it). At Mark Hammond's request. | 03 September 1997, 16:11:19 UTC |
9ca064f | Guido van Rossum | 03 September 1997, 16:10:52 UTC | 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 | 03 September 1997, 16:10:52 UTC |
4a78a3c | Guido van Rossum | 03 September 1997, 15:37:50 UTC | Added empty PCbuild directory for use by the NT build process. | 03 September 1997, 15:37:50 UTC |
64790de | Guido van Rossum | 03 September 1997, 01:09:25 UTC | Added new flags and exceptions; removed AccessError exception. | 03 September 1997, 01:09:25 UTC |
d19c04a | Guido van Rossum | 03 September 1997, 00:47:36 UTC | 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. | 03 September 1997, 00:47:36 UTC |
5ade084 | Guido van Rossum | 03 September 1997, 00:45:30 UTC | Mod suggested by Donn Cave -- invoke makexp_aix relative to $0 so it doesn't have to be on $PATH. | 03 September 1997, 00:45:30 UTC |
3f0bff6 | Guido van Rossum | 03 September 1997, 00:44:14 UTC | Disable the portable multimedia modules (audioop, imageop, rgbimg) by default since they don't work on 64-bit platforms. | 03 September 1997, 00:44:14 UTC |
fc6efff | Guido van Rossum | 03 September 1997, 00:35:38 UTC | #Removed debug print that was accidentally left in. | 03 September 1997, 00:35:38 UTC |
5ed5c4c | Guido van Rossum | 03 September 1997, 00:23:54 UTC | 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. | 03 September 1997, 00:23:54 UTC |
15a4039 | Guido van Rossum | 03 September 1997, 00:09:26 UTC | 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? | 03 September 1997, 00:09:26 UTC |
2d30840 | Jack Jansen | 01 September 1997, 15:39:07 UTC | Define BUILDNO in macbuildno.h (incremented by fullbuild) | 01 September 1997, 15:39:07 UTC |
68a0ee0 | Jack Jansen | 01 September 1997, 15:38:24 UTC | Can't remember... | 01 September 1997, 15:38:24 UTC |
898ac1b | Jack Jansen | 01 September 1997, 15:38:12 UTC | Added GetTicks() here, so profiling can use a decent timer | 01 September 1997, 15:38:12 UTC |
faad995 | Jack Jansen | 01 September 1997, 15:37:07 UTC | Fullbuild now maintains BUILDNO for mac builds | 01 September 1997, 15:37:07 UTC |
04fb06f | Jack Jansen | 01 September 1997, 15:36:42 UTC | Names changed | 01 September 1997, 15:36:42 UTC |
625f40d | Guido van Rossum | 30 August 1997, 20:04:42 UTC | #typo | 30 August 1997, 20:04:42 UTC |
28cad96 | Guido van Rossum | 30 August 1997, 20:03:28 UTC | Document newly revamped site configuration mechanism. Damn the criticism in c.l.p! | 30 August 1997, 20:03:28 UTC |
36764b8 | Guido van Rossum | 30 August 1997, 20:02:25 UTC | Added docs for 'user' customization module. Renamed libuser.tex (which had UserDict/UserList) to libuserdict.tex. | 30 August 1997, 20:02:25 UTC |
d7ed683 | Guido van Rossum | 30 August 1997, 15:02:50 UTC | Inline PyObject_CallObject (Marc-Andre Lemburg). | 30 August 1997, 15:02:50 UTC |
b2afc81 | Guido van Rossum | 29 August 1997, 22:37:44 UTC | Added os.altsep; this is '/' on DOS/Windows, and None on systems with a sane filename syntax. | 29 August 1997, 22:37:44 UTC |
a28dab5 | Guido van Rossum | 29 August 1997, 22:36:47 UTC | 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... | 29 August 1997, 22:36:47 UTC |
7922bd7 | Guido van Rossum | 29 August 1997, 22:34:47 UTC | 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. | 29 August 1997, 22:34:47 UTC |
3d90af9 | Guido van Rossum | 29 August 1997, 22:34:00 UTC | Added NoSite flag. | 29 August 1997, 22:34:00 UTC |
dcc0c13 | Guido van Rossum | 29 August 1997, 22:32:42 UTC | 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(). | 29 August 1997, 22:32:42 UTC |
f30bec7 | Guido van Rossum | 29 August 1997, 22:30:45 UTC | New site.py semantics. Searches in <*prefix>/lib/python<version>/packages for *.pth files containing directories that are appended to sys.path. | 29 August 1997, 22:30:45 UTC |
83b6709 | Barry Warsaw | 29 August 1997, 22:20:16 UTC | 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. | 29 August 1997, 22:20:16 UTC |
757af0e | Barry Warsaw | 29 August 1997, 22:13:51 UTC | 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. | 29 August 1997, 22:13:51 UTC |
035574d | Barry Warsaw | 29 August 1997, 22:07:17 UTC | 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. | 29 August 1997, 22:07:17 UTC |