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