Guido van Rossum
3b31cd2fe7
Shared libraries didn't quite work under AIX because of the change in
...
status of the GNU readline interface. Here's a patch, by Vladimir
Marangozov.
1997-10-10 17:40:00 +00:00
Guido van Rossum
9a61dc90e2
Moved mac-specific speedup to a different place (Jack)
1997-10-08 15:25:08 +00:00
Guido van Rossum
ac1fc95c3c
Fixed for WITHOUT_COMPLEX compilation (Jack)
1997-10-08 15:23:55 +00:00
Guido van Rossum
2ac650f385
New version of PyErr_NewException() that is compatible with -X option.
1997-10-03 19:50:55 +00:00
Guido van Rossum
999e5e921e
Initialize Py_UseClassExceptionsFlag to 1.
1997-10-03 19:46:02 +00:00
Guido van Rossum
a7f2e813c9
Remove unreachable "return 1" at end of ensure_fromlist().
1997-10-03 15:33:32 +00:00
Guido van Rossum
aa9606f45a
Fix small omission: with all the new code, sys.exit(None) would print
...
"None"; this should be equivalent to sys.exit(0).
1997-10-03 13:53:28 +00:00
Guido van Rossum
b74eca9349
Change PyEval_SaveThread() and PyEval_RestoreThread() to always do the
...
tstate swapping. Only the acquiring and releasing of the lock is
conditional (twice, under ``#ifdef WITH_THREAD'' and inside ``if
(interpreter_lock)'').
1997-09-30 22:03:16 +00:00
Guido van Rossum
b4102bf5f8
Fix a bug in this code that made it do the wrong thing when an option
...
was a single '-'. Thanks to Andrew Kuchling.
1997-09-30 22:00:13 +00:00
Barry Warsaw
3a74993118
PyErr_NormalizeException(): If the exception's type is a class and the
...
instance's class is a subclass of this, then use the instance's class
as the exception type.
1997-09-30 15:00:18 +00:00
Guido van Rossum
6c1e5f2033
Get DLL version from a variable.
1997-09-29 23:34:23 +00:00
Guido van Rossum
ee81af8977
Release interpreter lock around readline call in [raw_]input().
1997-09-26 21:47:43 +00:00
Barry Warsaw
963b871e86
Py_Initialize(): move the call to _PyImport_FixupExtension() to after
...
the phase 2 init of the __builtin__ module, so that multiple
interpreters will get the right exceptions.
1997-09-18 16:42:02 +00:00
Barry Warsaw
b01a7fa5f8
initerrors(): Eliminate circular reference which was causing a small
...
but annoying memory leak. This was introduced when PyExc_Exception
was added; the loop above populating the PyExc_StandardError exception
tuple started at index 1 in bltin_exc, but PyExc_Exception was added
at index 0, so PyExc_StandardError was getting inserted in itself!
How else can a tuple include itself?!
Change the loop to start at index 2.
This was a *fun* one! :-)
1997-09-18 03:44:38 +00:00
Barry Warsaw
412cdc2284
[Py_Exc]NumberError => [Py_Exc]ArithmeticError
1997-09-16 21:51:14 +00:00
Barry Warsaw
2f5f6a2595
PyErr_Print(): When printing a class exception, try to dig out the
...
__module__ string and if found, print <module>.<class>, unless
<module> == "exceptions".
1997-09-16 21:42:03 +00:00
Guido van Rossum
7617e05a9b
New API PyErr_NewException(name, base, dict) to create simple new exceptions.
1997-09-16 18:43:50 +00:00
Guido van Rossum
0474832d9c
Introduce PyExc_Exception as the conceptual root class for all exceptions.
1997-09-16 18:43:15 +00:00
Guido van Rossum
0207e6de38
Added docstrings. Not for the obsolete functions though.
1997-09-09 22:04:42 +00:00
Guido van Rossum
c172f26861
Deleted find_module_in_package and find_module_in_directory -- they
...
aren't needed and it was a mistake to add them.
1997-09-09 20:54:35 +00:00
Guido van Rossum
a86f77d4dd
Crrected a flow control error that caused the wrong error message when
...
load-module() didn't find a built-in or frozen module. Also got rid
of is_frozen(), which duplicated the functionality of
find_frozen()!=NULL.
1997-09-09 18:53:47 +00:00
Guido van Rossum
9905ef9669
Added support for __all__, which should be a list of modules to be
...
imported when the user says "from package import *".
1997-09-08 16:07:11 +00:00
Guido van Rossum
0c81945808
Bugfix: import A.B from inside package was busted by mark_miss optimization.
1997-09-07 06:16:57 +00:00
Guido van Rossum
f5f5fdbdd0
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.)
1997-09-06 20:29:52 +00:00
Guido van Rossum
222ef56bbf
Fix reload() for package submodules.
1997-09-06 19:41:09 +00:00