bpo-38090: Fix reference leak in ceval.c (GH-15848)
(cherry picked from commit a511c7a496
)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
parent
206e4c3d35
commit
45bc3928e2
|
@ -5238,7 +5238,6 @@ import_from(PyThreadState *tstate, PyObject *v, PyObject *name)
|
|||
else {
|
||||
_Py_IDENTIFIER(__spec__);
|
||||
PyObject *spec = _PyObject_GetAttrId(v, &PyId___spec__);
|
||||
Py_XINCREF(spec);
|
||||
const char *fmt =
|
||||
_PyModuleSpec_IsInitializing(spec) ?
|
||||
"cannot import name %R from partially initialized module %R "
|
||||
|
|
Loading…
Reference in New Issue