| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
the error was about a bad format string :-).
|
| |
|
|
|
|
|
| |
1.3, dlopen() etc. are fully implemented, including dlerror().
From Jaromir Dolecek and Ty Sarna.
|
|
|
|
| |
to do, it should not call sys.exitfunc either...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
now implement the following finalization strategy.
1. Whenever this code deletes a module, its directory is cleared
carefully, as follows:
- set all names to None that begin with exactly one underscore
- set all names to None that don't begin with two underscores
- clear the directory
2. Modules are deleted in the following order:
- modules with a reference count of 1, except __builtin__ or __sys__
- repeat until no more are found with a reference count of 1
- __main__ if it's still there
- all remaining modules except __builtin__ or sys
- sys
_ __builtin__
|
| |
|
|
|
|
|
| |
before printing and set it to the printed variable *after* printing
(and only when printing is successful).
|
| |
|
| |
|
|
|
|
| |
This prevents 4294967296 from being an acceptable way to spell zero!
|
| |
|
|
|
|
|
| |
format. This will complain about illegal formats like "O#" instead of
ignoring the '#'.
|
|
|
|
|
| |
by Marc Lemburg. There's a path through the code where *val is NULL,
but value isn't, and value should be DECREF'ed.
|
|
|
|
|
| |
printing (when Py_DEBUG is defined) happens while there's still a
current thread...
|
| |
|
|
|
|
|
|
|
| |
This exports symbols defined by the loaded extension to other
extensions (loaded later).
(I'm not quite sure about this but suppose it can't hurt...)
|
| |
|
|
|
|
|
| |
E.g. isinstance('',types.StringType) will return true now instead of
raising a TypeError exception. This is for JPython compatibility.
|
|
|
|
|
| |
you can assign an object whose str() evaluates to the current
directory (or whatever).
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This is a bit of a hack: when the shared library is loaded, the module
name is "package.module", but the module calls Py_InitModule*() with just
"module" for the name. The shared library loader squirrels away the true
name of the module in _Py_PackageContext, and Py_InitModule*() will
substitute this (if the name actually matches).
|
|
|
|
|
|
|
|
|
|
| |
1) The __builtins__ variable in the __main__ module is set to the
__builtin__ module instead of its __dict__.
2) Get rid of the SIGHUP and SIGTERM handlers. They can't be made to
work reliably when threads may be in use, they are Unix specific, and
Python programmers can now program this functionality is a safer way
using the signal module.
|
| |
|
|
|
|
|
|
| |
by PyEval_EvalCode() on success was never DECREF'ed.
Fix by Bernhard Herzog.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Setting interp->builtins to the __builtin__ module instead of to its
dictionary had the unfortunate side effect of always running in
restricted execution mode :-(
I will check in a different way of setting __main__.__builtins__ to
the __builtin__ module later.
Also, there was a typo -- a comment was unfinished, and as a result
some finalizations were not being executed.
In Bart Simpson style,
I Will Not Check In Untested Changes.
I Will Not Check In Untested Changes.
I Will Not Check In Untested Changes.
I Will Not Check In Untested Changes.
I Will Not Check In Untested Changes.
I Will Not Check In Untested Changes.
I Will Not Check In Untested Changes.
I Will Not Check In Untested Changes.
I Will Not Check In Untested Changes.
I Will Not Check In Untested Changes.
|
|
|
|
|
| |
that should be PyImport_Inittab (a new pointer initialized to point to
the array).
|
|
|
|
| |
verbose mode.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The interp->builtins variable (and hence, __main__.__builtins__) is
once again initialized to the built-in *module* instead of its
dictionary.
- The finalization order is once again changed. Signals are finalized
relatively early, because (1) it DECREF's the signal handlers, and if
a signal handler happens to be a bound method, deleting it could cause
problems when there's no current thread around, and (2) we don't want
to risk executing signal handlers during finalization.
|
|
|
|
|
|
| |
__init__.py (or __init__.pyc/.pyo, whichever applies) is considered a
package. All other subdirectories are left alone. Should make Konrad
Hinsen happy!
|
|
|
|
| |
pointer *PyImport_Inittab which is initialized to _PyImport_Inittab.
|
|
|
|
| |
into 1.5a4.
|
| |
|
|
|
|
|
| |
status of the GNU readline interface. Here's a patch, by Vladimir
Marangozov.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
"None"; this should be equivalent to sys.exit(0).
|
|
|
|
|
|
| |
tstate swapping. Only the acquiring and releasing of the lock is
conditional (twice, under ``#ifdef WITH_THREAD'' and inside ``if
(interpreter_lock)'').
|
|
|
|
| |
was a single '-'. Thanks to Andrew Kuchling.
|
|
|
|
|
| |
instance's class is a subclass of this, then use the instance's class
as the exception type.
|
| |
|
| |
|
|
|
|
|
| |
the phase 2 init of the __builtin__ module, so that multiple
interpreters will get the right exceptions.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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! :-)
|
| |
|
|
|
|
|
| |
__module__ string and if found, print <module>.<class>, unless
<module> == "exceptions".
|