mirror of
https://github.com/python/cpython.git
synced 2026-06-27 21:33:21 -04:00
[3.15] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350)
(cherry picked from commit 287c98f4cb)
This commit is contained in:
+22
-18
@@ -1893,6 +1893,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.
|
||||
@@ -1900,7 +1901,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);
|
||||
@@ -1908,6 +1909,7 @@ sys_get_int_max_str_digits_impl(PyObject *module)
|
||||
|
||||
|
||||
/*[clinic input]
|
||||
@permit_long_summary
|
||||
sys.set_int_max_str_digits
|
||||
|
||||
maxdigits: int
|
||||
@@ -1917,7 +1919,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;
|
||||
@@ -2129,6 +2131,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.
|
||||
@@ -2138,7 +2141,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();
|
||||
}
|
||||
@@ -2317,17 +2320,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();
|
||||
@@ -2471,16 +2474,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.
|
||||
@@ -2490,7 +2493,7 @@ Args:
|
||||
|
||||
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;
|
||||
@@ -2843,7 +2846,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
|
||||
- "none": All lazy imports are suppressed (even explicitly marked ones)
|
||||
- "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
|
||||
@@ -2852,7 +2856,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=f04e70d8bf9fe4f6]*/
|
||||
/*[clinic end generated code: output=1ff34ba6c4feaf73 input=cb6df28a51844a31]*/
|
||||
{
|
||||
PyImport_LazyImportsMode lazy_mode;
|
||||
if (!PyUnicode_Check(mode)) {
|
||||
|
||||
Reference in New Issue
Block a user