mirror of
https://github.com/python/cpython.git
synced 2026-06-05 09:21:43 +00:00
gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338)
This commit is contained in:
parent
0563890872
commit
287c98f4cb
91 changed files with 768 additions and 702 deletions
|
|
@ -1863,6 +1863,7 @@ sys_mdebug_impl(PyObject *module, int flag)
|
|||
|
||||
|
||||
/*[clinic input]
|
||||
@permit_long_summary
|
||||
sys.get_int_max_str_digits
|
||||
|
||||
Return the maximum string digits limit for non-binary int<->str conversions.
|
||||
|
|
@ -1870,7 +1871,7 @@ Return the maximum string digits limit for non-binary int<->str conversions.
|
|||
|
||||
static PyObject *
|
||||
sys_get_int_max_str_digits_impl(PyObject *module)
|
||||
/*[clinic end generated code: output=0042f5e8ae0e8631 input=61bf9f99bc8b112d]*/
|
||||
/*[clinic end generated code: output=0042f5e8ae0e8631 input=77fb74e987ba7ecb]*/
|
||||
{
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
return PyLong_FromLong(interp->long_state.max_str_digits);
|
||||
|
|
@ -1878,6 +1879,7 @@ sys_get_int_max_str_digits_impl(PyObject *module)
|
|||
|
||||
|
||||
/*[clinic input]
|
||||
@permit_long_summary
|
||||
sys.set_int_max_str_digits
|
||||
|
||||
maxdigits: int
|
||||
|
|
@ -1887,7 +1889,7 @@ Set the maximum string digits limit for non-binary int<->str conversions.
|
|||
|
||||
static PyObject *
|
||||
sys_set_int_max_str_digits_impl(PyObject *module, int maxdigits)
|
||||
/*[clinic end generated code: output=734d4c2511f2a56d input=d7e3f325db6910c5]*/
|
||||
/*[clinic end generated code: output=734d4c2511f2a56d input=d4c0bf50c466d57a]*/
|
||||
{
|
||||
if (_PySys_SetIntMaxStrDigits(maxdigits) < 0) {
|
||||
return NULL;
|
||||
|
|
@ -2099,6 +2101,7 @@ sys__getframe_impl(PyObject *module, int depth)
|
|||
}
|
||||
|
||||
/*[clinic input]
|
||||
@permit_long_summary
|
||||
sys._current_frames
|
||||
|
||||
Return a dict mapping each thread's thread id to its current stack frame.
|
||||
|
|
@ -2108,7 +2111,7 @@ This function should be used for specialized purposes only.
|
|||
|
||||
static PyObject *
|
||||
sys__current_frames_impl(PyObject *module)
|
||||
/*[clinic end generated code: output=d2a41ac0a0a3809a input=2a9049c5f5033691]*/
|
||||
/*[clinic end generated code: output=d2a41ac0a0a3809a input=e1ce34f43501e0d6]*/
|
||||
{
|
||||
return _PyThread_CurrentFrames();
|
||||
}
|
||||
|
|
@ -2287,17 +2290,17 @@ sys__stats_clear_impl(PyObject *module)
|
|||
}
|
||||
|
||||
/*[clinic input]
|
||||
@permit_long_docstring_body
|
||||
sys._stats_dump -> bool
|
||||
|
||||
Dump stats to file, and clears the stats.
|
||||
|
||||
Return False if no statistics were not dumped because stats gathering was off.
|
||||
Return False if no statistics were not dumped because stats gathering
|
||||
was off.
|
||||
[clinic start generated code]*/
|
||||
|
||||
static int
|
||||
sys__stats_dump_impl(PyObject *module)
|
||||
/*[clinic end generated code: output=6e346b4ba0de4489 input=5a3ab40d2fb5af47]*/
|
||||
/*[clinic end generated code: output=6e346b4ba0de4489 input=7f3b7758cb59d2ff]*/
|
||||
{
|
||||
int res = _Py_PrintSpecializationStats(1);
|
||||
_Py_StatsClear();
|
||||
|
|
@ -2441,16 +2444,16 @@ sys.remote_exec
|
|||
Executes a file containing Python code in a given remote Python process.
|
||||
|
||||
This function returns immediately, and the code will be executed by the
|
||||
target process's main thread at the next available opportunity, similarly
|
||||
to how signals are handled. There is no interface to determine when the
|
||||
code has been executed. The caller is responsible for making sure that
|
||||
the file still exists whenever the remote process tries to read it and that
|
||||
it hasn't been overwritten.
|
||||
target process's main thread at the next available opportunity,
|
||||
similarly to how signals are handled. There is no interface to
|
||||
determine when the code has been executed. The caller is responsible
|
||||
for making sure that the file still exists whenever the remote process
|
||||
tries to read it and that it hasn't been overwritten.
|
||||
|
||||
The remote process must be running a CPython interpreter of the same major
|
||||
and minor version as the local process. If either the local or remote
|
||||
interpreter is pre-release (alpha, beta, or release candidate) then the
|
||||
local and remote interpreters must be the same exact version.
|
||||
The remote process must be running a CPython interpreter of the same
|
||||
major and minor version as the local process. If either the local or
|
||||
remote interpreter is pre-release (alpha, beta, or release candidate)
|
||||
then the local and remote interpreters must be the same exact version.
|
||||
|
||||
Args:
|
||||
pid (int): The process ID of the target Python process.
|
||||
|
|
@ -2460,7 +2463,7 @@ local and remote interpreters must be the same exact version.
|
|||
|
||||
static PyObject *
|
||||
sys_remote_exec_impl(PyObject *module, int pid, PyObject *script)
|
||||
/*[clinic end generated code: output=7d94c56afe4a52c0 input=39908ca2c5fe1eb0]*/
|
||||
/*[clinic end generated code: output=7d94c56afe4a52c0 input=7bd58f8da20cb74c]*/
|
||||
{
|
||||
PyObject *path;
|
||||
const char *debugger_script_path;
|
||||
|
|
@ -2812,7 +2815,8 @@ Sets the global lazy imports mode.
|
|||
|
||||
The mode parameter must be one of the following strings:
|
||||
- "all": All top-level imports become potentially lazy
|
||||
- "normal": Only explicitly marked imports (with 'lazy' keyword) are lazy
|
||||
- "normal": Only explicitly marked imports (with 'lazy' keyword) are
|
||||
lazy
|
||||
|
||||
In addition to the mode, lazy imports can be controlled via the filter
|
||||
provided to sys.set_lazy_imports_filter
|
||||
|
|
@ -2821,7 +2825,7 @@ provided to sys.set_lazy_imports_filter
|
|||
|
||||
static PyObject *
|
||||
sys_set_lazy_imports_impl(PyObject *module, PyObject *mode)
|
||||
/*[clinic end generated code: output=1ff34ba6c4feaf73 input=036c75a65f42cbc2]*/
|
||||
/*[clinic end generated code: output=1ff34ba6c4feaf73 input=db3242f0ff6e5dcc]*/
|
||||
{
|
||||
PyImport_LazyImportsMode lazy_mode;
|
||||
if (!PyUnicode_Check(mode)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue