Antoine Pitrou added the comment: "hg annotate" shows it dates back to 4f0b7acffc7d by Guido, with the following diff:
diff --git a/Misc/NEWS b/Misc/NEWS --- a/Misc/NEWS +++ b/Misc/NEWS @@ -150,6 +150,10 @@ C API ----- +- PyThreadState_GetDict() was changed not to raise an exception or + issue a fatal error when no current thread state is available. This + makes it possible to print dictionaries when no thread is active. + - LONG_LONG was renamed to PY_LONG_LONG. - Added PyObject_SelfIter() to fill the tp_iter slot for the diff --git a/Objects/object.c b/Objects/object.c --- a/Objects/object.c +++ b/Objects/object.c @@ -2119,7 +2119,7 @@ dict = PyThreadState_GetDict(); if (dict == NULL) - return -1; + return 0; list = PyDict_GetItemString(dict, KEY); if (list == NULL) { list = PyList_New(0); Unless Guido has changed his mind about it, I'd close this issue as rejected ;-) ---------- nosy: +gvanrossum, pitrou _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21073> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com