| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
(GH-6030)
METH_NOARGS functions need only a single argument but they are cast
into a PyCFunction, which takes two arguments. This triggers an
invalid function cast warning in gcc8 due to the argument mismatch.
Fix this by adding a dummy unused argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-4793)
Third party projects may wish to hide their own internal machinery in
order to present more comprehensible tracebacks to end users
(e.g. Jinja2 and Trio both do this).
Previously such projects have had to rely on ctypes to do so:
https://github.com/pallets/jinja/blob/fe3dadacdf4cf411d0a5b6bbd4d5234697a28af2/jinja2/debug.py#L345
https://github.com/python-trio/trio/blob/1e86b1aee8c0c759f6f239ae53a05d0d3963c629/trio/_core/_multierror.py#L296
This provides a Python level API for creating and modifying real
Traceback objects, allowing tracebacks to be edited at runtime.
Patch by Nathaniel Smith.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(PyTraceBack_Print()). (#4289)
* Setting sys.tracebacklimit to 0 or less now suppresses printing tracebacks.
* Setting sys.tracebacklimit to None now causes using the default limit.
* Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using
the limit LONG_MAX rather than the default limit.
* Fixed integer overflows in the case of more than 2**31 traceback items on
Windows.
* Fixed output errors handling.
|
|
|
|
|
|
|
|
|
| |
See PEP 539 for details.
Highlights of changes:
- Add Thread Specific Storage (TSS) API
- Document the Thread Local Storage (TLS) API as deprecated
- Update code that used TLS API to use TSS API
|
|
|
|
|
|
|
| |
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals
Other globals are excluded (see globals.txt and check-c-globals.py).
|
|
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-6532: Make the thread id an unsigned integer.
From C API side the type of results of PyThread_start_new_thread() and
PyThread_get_thread_ident(), the id parameter of
PyThreadState_SetAsyncExc(), and the thread_id field of PyThreadState
changed from "long" to "unsigned long".
* Restore a check in thread_get_ident().
|
|\
| |
| |
| | |
loss in PyTraceBack_Here().
|
| |
| |
| |
| | |
loss in PyTraceBack_Here().
|
| |
| |
| |
| | |
Directly pass NULL rather than an empty string.
|
| |
| |
| |
| | |
Issue #26823.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Large sections of repeated lines in tracebacks are now abbreviated as
"[Previous line repeated {count} more times]" by both the traceback
module and the builtin traceback rendering.
Patch by Emanuel Barry.
|
| | |
|
| | |
|
| |
| |
| |
| | |
This function will be reused by faulthandler.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #26563:
* Add _PyGILState_GetInterpreterStateUnsafe() function: the single
PyInterpreterState used by this process' GILState implementation.
* Enhance _Py_DumpTracebackThreads() to retrieve the interpreter state from
autoInterpreterState in last resort. The function now accepts NULL for interp
and current_tstate parameters.
* test_faulthandler: fix a ResourceWarning when test is interrupted by CTRL+c
|
| |
| |
| |
| | |
Issue #26564.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #26564:
* Expose _Py_DumpASCII() and _Py_DumpDecimal() in traceback.h
* Change the type of the second _Py_DumpASCII() parameter from int to unsigned
long
* Rewrite _Py_DumpDecimal() and dump_hexadecimal() to write directly characters
in the expected order, avoid the need of reversing the string.
* dump_hexadecimal() limits width to the size of the buffer
* _Py_DumpASCII() does nothing if the object is not a Unicode string
* dump_frame() wrtites "???" as the line number if the line number is negative
|
|\
| |
| |
| | |
Patch by Michael Ensslin.
|
| |
| |
| |
| | |
Patch by Michael Ensslin.
|
| |
| |
| |
| | |
_set_thread_local_invalid_parameter_handler.
|
| |
| |
| |
| |
| | |
and _Py_DumpTracebackThreads(). Document also these functions to explain that
the caller is responsible to call PyErr_CheckSignals().
|
|\ \
| |/ |
|
| |
| |
| |
| | |
close the binary file to fix a resource warning.
|
|\ \
| |/
| |
| | |
PyFile_GetLine() failed. Patch written by Xavier de Gaye.
|
| |
| |
| |
| | |
PyFile_GetLine() failed. Patch written by Xavier de Gaye.
|
|\ \
| |/
| |
| |
| |
| | |
exception tracebacks.
Initial patch by Mark Shannon.
|
| |
| |
| |
| |
| |
| | |
exception tracebacks.
Initial patch by Mark Shannon.
|
| |
| |
| |
| | |
characters (U+0000..U+001f and U+007f).
|
|/
|
|
| |
warnings in the Python/ subdirectory.
|
|
|
|
| |
the exception to not call open() with an exception set.
|
|
|
|
|
|
|
| |
are used.
Move also _Py_IDENTIFIER() defintions to the top in modified files to remove
identifiers duplicated in the same file.
|
|
|
|
|
|
|
| |
instead of creating temporary Unicode string objects
Add also more identifiers in pythonrun.c to avoid temporary Unicode string
objets for the interactive interpreter.
|
|
|
|
| |
upside down.
|
|\ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/
| |
| |
| | |
Also use portable SEEK_SET instead of 0.
CID 1040639
|
| |
| |
| |
| |
| | |
Also use portable SEEK_SET instead of 0.
CID 1040639
|
|\ \
| |/
| |
| |
| |
| | |
for error
CID 486768
|
| |
| |
| |
| |
| |
| | |
for error
CID 486768
|
| |
| |
| |
| |
| | |
Report _Py_FindSourceFile() error, so the error is cleared;
and clear io.open(filename) exception on failure.
|
|/ |
|
|
|
|
| |
instead of 100, to be able to display long file paths
|
|
|
|
|
| |
the source line. Such errors can't be reported anyway. This makes error
reporting work, even if the "io" module can't be loaded.
|
| |
|
| |
|
| |
|
|
|
|
| |
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
|