@@ -1192,58 +1192,67 @@ PyDoc_STRVAR(module_doc,
1192
1192
static PyMethodDef module_methods [] = {
1193
1193
{"enable" ,
1194
1194
_PyCFunction_CAST (faulthandler_py_enable ), METH_VARARGS |METH_KEYWORDS ,
1195
- PyDoc_STR ("enable(file=sys.stderr, all_threads=True): "
1196
- "enable the fault handler" )},
1195
+ PyDoc_STR ("enable($module, /, file=sys.stderr, all_threads=True)\n--\n\n "
1196
+ "Enable the fault handler. " )},
1197
1197
{"disable" , faulthandler_disable_py , METH_NOARGS ,
1198
- PyDoc_STR ("disable(): disable the fault handler" )},
1198
+ PyDoc_STR ("disable($module, /)\n--\n\n"
1199
+ "Disable the fault handler." )},
1199
1200
{"is_enabled" , faulthandler_is_enabled , METH_NOARGS ,
1200
- PyDoc_STR ("is_enabled()->bool: check if the handler is enabled" )},
1201
+ PyDoc_STR ("is_enabled($module, /)\n--\n\n"
1202
+ "Check if the handler is enabled." )},
1201
1203
{"dump_traceback" ,
1202
1204
_PyCFunction_CAST (faulthandler_dump_traceback_py ), METH_VARARGS |METH_KEYWORDS ,
1203
- PyDoc_STR ("dump_traceback(file=sys.stderr, all_threads=True): "
1204
- "dump the traceback of the current thread, or of all threads "
1205
- "if all_threads is True, into file" )},
1205
+ PyDoc_STR ("dump_traceback($module, /, file=sys.stderr, all_threads=True)\n--\n\n "
1206
+ "Dump the traceback of the current thread, or of all threads "
1207
+ "if all_threads is True, into file. " )},
1206
1208
{"dump_traceback_later" ,
1207
1209
_PyCFunction_CAST (faulthandler_dump_traceback_later ), METH_VARARGS |METH_KEYWORDS ,
1208
- PyDoc_STR ("dump_traceback_later(timeout, repeat=False, file=sys.stderr, exit=False): \n"
1209
- "dump the traceback of all threads in timeout seconds,\n"
1210
+ PyDoc_STR ("dump_traceback_later($module, /, timeout, repeat=False, file=sys.stderr, exit=False)\n--\n \n"
1211
+ "Dump the traceback of all threads in timeout seconds,\n"
1210
1212
"or each timeout seconds if repeat is True. If exit is True, "
1211
1213
"call _exit(1) which is not safe." )},
1212
1214
{"cancel_dump_traceback_later" ,
1213
1215
faulthandler_cancel_dump_traceback_later_py , METH_NOARGS ,
1214
- PyDoc_STR ("cancel_dump_traceback_later():\ncancel the previous call "
1215
- "to dump_traceback_later()." )},
1216
+ PyDoc_STR ("cancel_dump_traceback_later($module, /)\n--\n\n "
1217
+ "Cancel the previous call to dump_traceback_later()." )},
1216
1218
#ifdef FAULTHANDLER_USER
1217
1219
{"register" ,
1218
1220
_PyCFunction_CAST (faulthandler_register_py ), METH_VARARGS |METH_KEYWORDS ,
1219
- PyDoc_STR ("register(signum, file=sys.stderr, all_threads=True, chain=False): "
1220
- "register a handler for the signal 'signum': dump the "
1221
+ PyDoc_STR ("register($module, /, signum, file=sys.stderr, all_threads=True, chain=False)\n--\n\n "
1222
+ "Register a handler for the signal 'signum': dump the "
1221
1223
"traceback of the current thread, or of all threads if "
1222
- "all_threads is True, into file" )},
1224
+ "all_threads is True, into file. " )},
1223
1225
{"unregister" ,
1224
- _PyCFunction_CAST (faulthandler_unregister_py ), METH_VARARGS |METH_KEYWORDS ,
1225
- PyDoc_STR ("unregister(signum): unregister the handler of the signal "
1226
- "'signum' registered by register()" )},
1226
+ _PyCFunction_CAST (faulthandler_unregister_py ), METH_VARARGS ,
1227
+ PyDoc_STR ("unregister($module, signum, /)\n--\n\n"
1228
+ "Unregister the handler of the signal "
1229
+ "'signum' registered by register()." )},
1227
1230
#endif
1228
1231
{"_read_null" , faulthandler_read_null , METH_NOARGS ,
1229
- PyDoc_STR ("_read_null(): read from NULL, raise "
1230
- "a SIGSEGV or SIGBUS signal depending on the platform" )},
1232
+ PyDoc_STR ("_read_null($module, /)\n--\n\n"
1233
+ "Read from NULL, raise "
1234
+ "a SIGSEGV or SIGBUS signal depending on the platform." )},
1231
1235
{"_sigsegv" , faulthandler_sigsegv , METH_VARARGS ,
1232
- PyDoc_STR ("_sigsegv(release_gil=False): raise a SIGSEGV signal" )},
1236
+ PyDoc_STR ("_sigsegv($module, release_gil=False, /)\n--\n\n"
1237
+ "Raise a SIGSEGV signal." )},
1233
1238
{"_fatal_error_c_thread" , faulthandler_fatal_error_c_thread , METH_NOARGS ,
1234
- PyDoc_STR ("fatal_error_c_thread(): "
1235
- "call Py_FatalError() in a new C thread." )},
1239
+ PyDoc_STR ("_fatal_error_c_thread($module, /)\n--\n\n "
1240
+ "Call Py_FatalError() in a new C thread." )},
1236
1241
{"_sigabrt" , faulthandler_sigabrt , METH_NOARGS ,
1237
- PyDoc_STR ("_sigabrt(): raise a SIGABRT signal" )},
1242
+ PyDoc_STR ("_sigabrt($module, /)\n--\n\n"
1243
+ "Raise a SIGABRT signal." )},
1238
1244
{"_sigfpe" , (PyCFunction )faulthandler_sigfpe , METH_NOARGS ,
1239
- PyDoc_STR ("_sigfpe(): raise a SIGFPE signal" )},
1245
+ PyDoc_STR ("_sigfpe($module, /)\n--\n\n"
1246
+ "Raise a SIGFPE signal." )},
1240
1247
#ifdef FAULTHANDLER_STACK_OVERFLOW
1241
1248
{"_stack_overflow" , faulthandler_stack_overflow , METH_NOARGS ,
1242
- PyDoc_STR ("_stack_overflow(): recursive call to raise a stack overflow" )},
1249
+ PyDoc_STR ("_stack_overflow($module, /)\n--\n\n"
1250
+ "Recursive call to raise a stack overflow." )},
1243
1251
#endif
1244
1252
#ifdef MS_WINDOWS
1245
1253
{"_raise_exception" , faulthandler_raise_exception , METH_VARARGS ,
1246
- PyDoc_STR ("raise_exception(code, flags=0): Call RaiseException(code, flags)." )},
1254
+ PyDoc_STR ("_raise_exception($module, code, flags=0, /)\n--\n\n"
1255
+ "Call RaiseException(code, flags)." )},
1247
1256
#endif
1248
1257
{NULL , NULL } /* sentinel */
1249
1258
};
0 commit comments