mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Regen stuff
This commit is contained in:
parent
db151a5192
commit
ea120fc6e9
17 changed files with 26 additions and 33 deletions
|
|
@ -297,7 +297,7 @@ __lazy_import__ as builtin___lazy_import__
|
|||
fromlist: object(c_default="NULL") = ()
|
||||
level: int = 0
|
||||
|
||||
Lazily imports a module.
|
||||
Lazily imports a module.
|
||||
|
||||
Returns either the module to be imported or a imp.lazy_module object which
|
||||
indicates the module to be lazily imported.
|
||||
|
|
|
|||
|
|
@ -3512,7 +3512,7 @@ check_lazy_import_comatibility(PyThreadState *tstate, PyObject *globals,
|
|||
|
||||
PyObject *
|
||||
_PyEval_LazyImportName(PyThreadState *tstate, PyObject *builtins, PyObject *globals,
|
||||
PyObject *locals, PyObject *name, PyObject *fromlist, PyObject *level,
|
||||
PyObject *locals, PyObject *name, PyObject *fromlist, PyObject *level,
|
||||
int lazy)
|
||||
{
|
||||
PyObject *res = NULL;
|
||||
|
|
|
|||
2
Python/clinic/bltinmodule.c.h
generated
2
Python/clinic/bltinmodule.c.h
generated
|
|
@ -1380,4 +1380,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=65b2a6dfb50b64bc input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=1c3327da8885bb8e input=a9049054013a1b77]*/
|
||||
|
|
|
|||
9
Python/clinic/sysmodule.c.h
generated
9
Python/clinic/sysmodule.c.h
generated
|
|
@ -2000,9 +2000,10 @@ PyDoc_STRVAR(sys_get_lazy_modules__doc__,
|
|||
"\n"
|
||||
"Gets the set of module names that have been lazily imported.\n"
|
||||
"\n"
|
||||
"Returns a set of fully-qualified module names that have been lazily imported\n"
|
||||
"at some point (primarily for diagnostics and introspection). Note that modules\n"
|
||||
"are removed from this set when they are reified (actually loaded).");
|
||||
"Returns a set of fully-qualified module names that have been lazily\n"
|
||||
"imported at some point (primarily for diagnostics and introspection).\n"
|
||||
"Note that modules are removed from this set when they are reified\n"
|
||||
"(actually loaded).");
|
||||
|
||||
#define SYS_GET_LAZY_MODULES_METHODDEF \
|
||||
{"get_lazy_modules", (PyCFunction)sys_get_lazy_modules, METH_NOARGS, sys_get_lazy_modules__doc__},
|
||||
|
|
@ -2143,4 +2144,4 @@ exit:
|
|||
#ifndef SYS_GETANDROIDAPILEVEL_METHODDEF
|
||||
#define SYS_GETANDROIDAPILEVEL_METHODDEF
|
||||
#endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */
|
||||
/*[clinic end generated code: output=cec3ca2ba0ad32cc input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=a64004ec17cceb34 input=a9049054013a1b77]*/
|
||||
|
|
|
|||
|
|
@ -2960,7 +2960,7 @@ codegen_from_import(compiler *c, stmt_ty s)
|
|||
ADDOP_NAME_CUSTOM(c, LOC(s), IMPORT_NAME, from, names, 2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (Py_ssize_t i = 0; i < n; i++) {
|
||||
alias_ty alias = (alias_ty)asdl_seq_GET(s->v.ImportFrom.names, i);
|
||||
identifier store_name;
|
||||
|
|
|
|||
|
|
@ -816,7 +816,7 @@ _PyCompile_InExceptionHandler(compiler *c)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3793,7 +3793,7 @@ resolve_name(PyThreadState *tstate, PyObject *name, PyObject *globals, int level
|
|||
PyObject *
|
||||
_PyImport_ResolveName(PyThreadState *tstate, PyObject *name, PyObject *globals, int level)
|
||||
{
|
||||
return resolve_name(tstate, name, globals, level);
|
||||
return resolve_name(tstate, name, globals, level);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
|
|
@ -4767,7 +4767,7 @@ PyImport_SetLazyImportsFilter(PyObject *filter)
|
|||
|
||||
/* Gets the lazy imports filter. Returns a new reference. */
|
||||
PyObject *
|
||||
PyImport_GetLazyImportsFilter()
|
||||
PyImport_GetLazyImportsFilter(void)
|
||||
{
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
return Py_XNewRef(FT_ATOMIC_LOAD_PTR_RELAXED(LAZY_IMPORTS_FILTER(interp)));
|
||||
|
|
@ -4784,7 +4784,7 @@ PyImport_SetLazyImportsMode(PyImport_LazyImportsMode mode)
|
|||
/* Checks if lazy imports is globally enabled or disabled. Return 1 when globally
|
||||
* forced on, 0 when globally forced off, or -1 when */
|
||||
PyImport_LazyImportsMode
|
||||
PyImport_GetLazyImportsMode()
|
||||
PyImport_GetLazyImportsMode(void)
|
||||
{
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
return FT_ATOMIC_LOAD_INT_RELAXED(LAZY_IMPORTS_MODE(interp));
|
||||
|
|
|
|||
|
|
@ -2896,15 +2896,16 @@ sys.get_lazy_modules
|
|||
|
||||
Gets the set of module names that have been lazily imported.
|
||||
|
||||
Returns a set of fully-qualified module names that have been lazily imported
|
||||
at some point (primarily for diagnostics and introspection). Note that modules
|
||||
are removed from this set when they are reified (actually loaded).
|
||||
Returns a set of fully-qualified module names that have been lazily
|
||||
imported at some point (primarily for diagnostics and introspection).
|
||||
Note that modules are removed from this set when they are reified
|
||||
(actually loaded).
|
||||
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
sys_get_lazy_modules_impl(PyObject *module)
|
||||
/*[clinic end generated code: output=4c641f8881ba87c0 input=06c7a1d05bcfa36a]*/
|
||||
/*[clinic end generated code: output=4c641f8881ba87c0 input=511b3a9682c09282]*/
|
||||
{
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
PyObject *lazy_modules_set = interp->imports.lazy_modules_set;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue