cpython/Include
Victor Stinner ef9d9b6312
bpo-36829: Add sys.unraisablehook() (GH-13187)
Add new sys.unraisablehook() function which can be overridden to
control how "unraisable exceptions" are handled. It is called when an
exception has occurred but there is no way for Python to handle it.
For example, when a destructor raises an exception or during garbage
collection (gc.collect()).

Changes:

* Add an internal UnraisableHookArgs type used to pass arguments to
  sys.unraisablehook.
* Add _PyErr_WriteUnraisableDefaultHook().
* The default hook now ignores exception on writing the traceback.
* test_sys now uses unittest.main() to automatically discover tests:
  remove test_main().
* Add _PyErr_Init().
* Fix PyErr_WriteUnraisable(): hold a strong reference to sys.stderr
  while using it
2019-05-22 11:28:22 +02:00
..
cpython bpo-36763: Fix _PyRuntime.preconfig.coerce_c_locale (GH-13444) 2019-05-20 17:16:38 +02:00
internal bpo-36829: Add sys.unraisablehook() (GH-13187) 2019-05-22 11:28:22 +02:00
Python-ast.h bpo-36817: Add f-string debugging using '='. (GH-13123) 2019-05-08 16:28:48 -04:00
Python.h bpo-36142: Exclude coreconfig.h from Py_LIMITED_API (GH-12111) 2019-03-01 03:44:13 +01:00
abstract.h bpo-35134: Create Include/cpython/abstract.h (GH-10728) 2018-11-26 22:42:04 +01:00
asdl.h bpo-18407: ast.c uses Py_ssize_t for asdl_seq_LEN() iterator (GH-10655) 2018-11-22 14:45:16 +01:00
ast.h bpo-35177: Add dependencies between header files (GH-10361) 2018-11-12 00:56:19 +01:00
bitset.h bpo-36623: Clean parser headers and include files (GH-12253) 2019-04-13 17:05:14 +01:00
bltinmodule.h
boolobject.h
bytearrayobject.h
bytes_methods.h
bytesobject.h
cellobject.h
ceval.h bpo-36728: Remove PyEval_ReInitThreads() from C API (GH-13241) 2019-05-13 12:35:37 +02:00
classobject.h
code.h bpo-36540: PEP 570 -- Implementation (GH-12701) 2019-04-29 13:36:57 +01:00
codecs.h
compile.h bpo-34616: Add PyCF_ALLOW_TOP_LEVEL_AWAIT to allow top-level await (GH-13148) 2019-05-21 16:12:02 -04:00
complexobject.h
context.h bpo-34762: Fix contextvars C API to use PyObject* pointer types. (GH-9473) 2018-09-21 15:33:56 -04:00
datetime.h bpo-35081: Remove Py_BUILD_CORE from datetime.h (GH-10416) 2018-11-13 09:02:25 +01:00
descrobject.h
dictobject.h bpo-35134: Create Include/cpython/dictobject.h (GH-10732) 2018-11-27 00:12:26 +01:00
dtoa.h
dynamic_annotations.h
enumobject.h
errcode.h
eval.h
fileobject.h
fileutils.h bpo-36352: Clarify fileutils.h documentation (GH-12406) 2019-03-18 17:47:26 +01:00
floatobject.h
frameobject.h bpo-35134: Split traceback.h header (GH-13430) 2019-05-20 00:14:57 +02:00
funcobject.h
genobject.h bpo-35134: Split traceback.h header (GH-13430) 2019-05-20 00:14:57 +02:00
graminit.h bpo-35766: Merge typed_ast back into CPython (GH-11645) 2019-01-31 12:40:27 +01:00
grammar.h fix warnings by adding more const (GH-12924) 2019-04-23 20:39:37 +09:00
import.h bpo-36900: import.c uses PyInterpreterState.core_config (GH-13278) 2019-05-13 17:12:45 +02:00
interpreteridobject.h bpo-36097: Use only public C-API in the_xxsubinterpreters module (adding as necessary). (gh-12359) 2019-03-15 16:35:46 -06:00
intrcheck.h Add missed details of the C API introduced in 3.7. (GH-7047) 2018-05-22 20:59:42 +03:00
iterobject.h
listobject.h
longintrepr.h
longobject.h bpo-36957: Add _PyLong_Rshift() and _PyLong_Lshift(). (GH-13416) 2019-05-19 14:14:38 +03:00
marshal.h
memoryobject.h
methodobject.h
modsupport.h bpo-36127: Argument Clinic: inline parsing code for keyword parameters. (GH-12058) 2019-03-14 10:32:22 +02:00
moduleobject.h bpo-33237: Improve AttributeError message for partially initialized module. (GH-6398) 2018-10-30 13:19:51 +02:00
namespaceobject.h
node.h bpo-33416: Add end positions to Python AST (GH-11605) 2019-01-22 11:18:22 +00:00
object.h bpo-35983: skip trashcan for subclasses (GH-11841) 2019-05-10 19:21:10 +02:00
objimpl.h bpo-35810: Incref heap-allocated types in PyObject_Init (GH-11661) 2019-03-27 12:52:18 +01:00
odictobject.h bpo-35059: Add _PyObject_CAST() macro (GH-10645) 2018-11-22 02:57:29 +01:00
opcode.h Update opcode.h header comment to mention the source data file (GH-9935) 2018-10-18 14:53:18 -05:00
osdefs.h bpo-31904: Add cross-build support for VxWorks RTOS (GH-11968) 2019-02-27 12:09:28 +01:00
osmodule.h
parsetok.h bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086) 2019-03-07 12:38:08 -08:00
patchlevel.h Post v3.8.0a4 2019-05-07 16:56:31 +02:00
py_curses.h
pyarena.h
pycapsule.h
pyctype.h
pydebug.h
pydtrace.d
pydtrace.h bpo-9566: Fix compiler warnings in gcmodule.c (GH-11010) 2019-03-06 17:54:12 +01:00
pyerrors.h bpo-36475: Make PyThread_exit_thread with _Py_NO_RETURN (GH-13068) 2019-05-04 11:48:05 -04:00
pyexpat.h bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146) 2018-09-18 05:38:58 -07:00
pyfpe.h
pyhash.h
pylifecycle.h bpo-35259: Limit `Py_FinalizeEx()` to `Py_LIMITED_API >= 0x03060000`. (GH-10620) 2018-12-20 23:11:03 +02:00
pymacconfig.h
pymacro.h bpo-36641: Add "const" to PyDoc_VAR macro (GH-12854) 2019-04-17 08:39:46 +09:00
pymath.h
pymem.h bpo-35134: Add Include/cpython/pymem.h (GH-12840) 2019-04-15 17:00:19 +02:00
pyport.h bpo-36475: Make PyThread_exit_thread with _Py_NO_RETURN (GH-13068) 2019-05-04 11:48:05 -04:00
pystate.h bpo-36124: Add PyInterpreterState.dict. (gh-12132) 2019-03-15 17:47:43 -06:00
pystrcmp.h
pystrhex.h
pystrtod.h
pythonrun.h bpo-36071 Add support for Windows ARM32 in ctypes/libffi (GH-12059) 2019-04-17 18:09:16 -07:00
pythread.h Revert "bpo-36084: Add native thread ID to threading.Thread objects (GH-11993)" (GH-13458) 2019-05-21 12:44:57 +02:00
pytime.h
rangeobject.h
setobject.h
sliceobject.h
structmember.h
structseq.h
symtable.h bpo-35224: PEP 572 Implementation (#10497) 2019-01-24 16:49:56 -07:00
sysmodule.h bpo-32030: Make _PySys_AddXOptionWithError() private (GH-10236) 2018-10-30 14:31:42 +01:00
token.h bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086) 2019-03-07 12:38:08 -08:00
traceback.h bpo-35134: Split traceback.h header (GH-13430) 2019-05-20 00:14:57 +02:00
tracemalloc.h bpo-35053: Define _PyTraceMalloc_NewReference in object.h (GH-10107) 2018-10-26 00:01:56 +02:00
tupleobject.h bpo-35134: Create Include/cpython/tupleobject.h (GH-10764) 2018-11-28 13:01:32 +01:00
typeslots.h
ucnhash.h
unicodeobject.h bpo-35134: Create Include/cpython/unicodeobject.h (GH-10680) 2018-11-26 17:29:38 +01:00
warnings.h
weakrefobject.h