| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ 1181301 ] make float packing copy bytes when they can
which hasn't been reviewed, despite numerous threats to check it in
anyway if noone reviews it. Please read the diff on the checkin list,
at least!
The basic idea is to examine the bytes of some 'probe values' to see if
the current platform is a IEEE 754-ish platform, and if so
_PyFloat_{Pack,Unpack}{4,8} just copy bytes around.
The rest is hair for testing, and tests.
|
|
|
|
| |
fixes the crash seen in bug #1165761
|
| |
|
|
|
|
| |
a few remaining calls to signal() were converted to PyOS_setsig().
|
|
|
|
|
| |
Coghlan, for determining whether PyEval_InitThreads() has been called.
Also purged the undocumented+unused _PyThread_Started int.
|
| |
|
| |
|
|
|
|
| |
Backported to 2.3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ 960406 ] unblock signals in threads
although the changes do not correspond exactly to any patch attached to
that report.
Non-main threads no longer have all signals masked.
A different interface to readline is used.
The handling of signals inside calls to PyOS_Readline is now rather
different.
These changes are all a bit scary! Review and cross-platform testing
much appreciated.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
comments about why both calls to cyclic gc here can cause problems.
I'll backport to 2.3 maint. Since the calls were introduced in 2.3,
that will be the end of it.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* Py_BuildValue("(OOO)",a,b,c) --> PyTuple_Pack(3,a,b,c)
* Py_BuildValue("()",a) --> PyTuple_New(0)
* Py_BuildValue("O", a) --> Py_INCREF(a)
|
|
|
|
| |
This should go onto release23-maint, too.
|
|
|
|
|
| |
Verify that the encoding actually exists. Fixes #775985.
Will backport to 2.3.
|
|
|
|
| |
sys.__modules__.
|
|
|
|
|
|
| |
If the initial import of warnings fails, clear the error. When the module
is actually needed, if the original import failed, see if it has managed
to find its way to sys.modules yet and if so, remember it.
|
|
|
|
| |
use the API.
|
|
|
|
|
|
|
| |
particular leaving the traceback object (and everything reachable
from it) alive throughout shutdown. The patch is mostly from Guido.
Bugfix candidate.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
new line.
New pvt API function _Py_PrintReferenceAddresses(): Prints only the
addresses and refcnts of the live objects. This is always safe to call,
because it has no dependence on Python's C API.
Py_Finalize(): If envar PYTHONDUMPREFS is set, call (the new)
_Py_PrintReferenceAddresses() right before dumping final pymalloc stats.
We can't print the reprs of the objects here because too much of the
interpreter has been shut down. You need to correlate the addresses
displayed here with the object reprs printed by the earlier
PYTHONDUMPREFS call to _Py_PrintReferences().
|
|
|
|
|
| |
- Call this in Py_Finalize().
- Expand the Misc/NEWS text on PY_LONG_LONG.
|
|
|
|
| |
wrapper around err_input().
|
| |
|
|
|
|
|
|
|
|
| |
PYTHONDUMPREFS output after most teardown. Attempts to use
PYTHONDUMPREFS with the Zope3 test suite died with Py_FatalError(),
since _Py_PrintReferences() can end up executing arbitrary Python code
(for objects that override __repr__), and that requires an intact
interpreter.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
even farther down, to just before the call to
_PyObject_DebugMallocStats(). This required the following changes:
- pystate.c, PyThreadState_GetDict(): changed not to raise an
exception or issue a fatal error when no current thread state is
available, but simply return NULL without raising an exception
(ever).
- object.c, Py_ReprEnter(): when PyThreadState_GetDict() returns NULL,
don't raise an exception but return 0. This means that when
printing a container that's recursive, printing will go on and on
and on. But that shouldn't happen in the case we care about (see
first bullet).
- Updated Misc/NEWS and Doc/api/init.tex to reflect changes to
PyThreadState_GetDict() definition.
|
|
|
|
|
| |
prevents it from showing stuff (like codec state) that is cleared when
the interpreter state is cleared.
|
| |
|
|
|
|
|
|
|
|
|
| |
variables to store internal data. As a result, any atempts to use the
unicode system with multiple active interpreters, or successive
interpreter executions, would fail.
Now that information is stored into members of the PyInterpreterState
structure.
|
| |
|
|
|
|
|
| |
and not as a side effect of setlocale. Expose it as sys.getfilesystemencoding.
Adjust test case.
|
|
|
|
|
|
| |
import warnings.py _after_ site.py has run. This ensures that site.py
is again the first .py to be imported, giving it back full control over
sys.path.
|
| |
|
|
|
|
|
|
|
|
|
| |
with an indented code block but no newline would raise SyntaxError.
This would have been a four-line change in parsetok.c... Except
codeop.py depends on this behavior, so a compilation flag had to be
invented that causes the tokenizer to revert to the old behavior;
this required extra changes to 2 .h files, 2 .c files, and 2 .py
files. (Fixes SF bug #501622.)
|
|
|
|
| |
no reason to stall in an endless loop, just call abort() on a fatal error.
|
| |
|
| |
|
|
|
|
|
|
| |
Initialize the small integers and __builtins__ in startup.
This removes some if conditions.
Change XDECREF to DECREF for values which shouldn't be NULL.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- new import hooks in import.c, exposed in the sys module
- new module called 'zipimport'
- various changes to allow bootstrapping from zip files
I hope I didn't break the Windows build (or anything else for that
matter), but then again, it's been sitting on sf long enough...
Regarding the latest discussions on python-dev: zipimport sets
pkg.__path__ as specified in PEP 273, and likewise, sys.path item such as
/path/to/Archive.zip/subdir/ are supported again.
|
| |
|
| |
|
|
|
|
|
|
| |
Py_Init crash". refchain cannot be cleared because objects can live across
Py_Finalize() and Py_Initialize() if they are kept alive by circular
references.
|
|
|
|
|
| |
set it.
Closes SF issue #624729.
|
|
|
|
| |
__STDC__ is defined (or something like that ...).
|
|
|
|
|
| |
single-quoted strings or end-of-file in triple-quoted strings.
closes patch 586561.
|
| |
|