diff options
author | Guido van Rossum <guido@python.org> | 2023-12-29 21:06:32 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-29 21:06:32 -0800 |
commit | 8938495120612122e3519f002104a8322bd864ff (patch) | |
tree | e7b11b14b95dc0db19833a38a3b5dd7d3b7b2d2a /Modules | |
parent | [3.11] gh-113543: Make sure that `MacOSXOSAScript` sends `webbrowser.open` au... (diff) | |
download | cpython-8938495120612122e3519f002104a8322bd864ff.tar.gz cpython-8938495120612122e3519f002104a8322bd864ff.tar.bz2 cpython-8938495120612122e3519f002104a8322bd864ff.zip |
[3.11] gh-113566: Fix asyncio segfault during interpreter finalization (#113578)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_asynciomodule.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index b2fef017050..a92feebcdbc 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -1377,6 +1377,9 @@ static PyObject * FutureObj_repr(FutureObj *fut) { ENSURE_FUTURE_ALIVE(fut) + if (asyncio_future_repr_func == NULL) { + return PyUnicode_FromFormat("<Future at %p>", fut); + } return PyObject_CallOneArg(asyncio_future_repr_func, (PyObject *)fut); } |