This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients The Compiler, bluetech, gvanrossum, loewis, nascheme, pitrou, serhiy.storchaka, sparkingdark
Date 2020-10-04.07:42:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1601797364.87.0.952495778828.issue41909@roundup.psfhosted.org>
In-reply-to
Content
Antoine give me a hint. The problem seems related to using PyDict_GetItem() when look up an attribute in the instance dict. It silences all exceptions (including RecursionError) and this results in silent "no such key in a dict".

But since 3.8 it was replaced with PyDict_GetItemWithError() which preserves RecursionError (see issue35459). I think we can remove Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION now.

As for other case in interning string, Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION was used to guard PyDict_GetItem(). But the current code uses PyDict_SetDefault() (added in 3.4) which does not silence errors. So Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION can be removed in that place too.
History
Date User Action Args
2020-10-04 07:42:44serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, loewis, nascheme, pitrou, The Compiler, bluetech, sparkingdark
2020-10-04 07:42:44serhiy.storchakasetmessageid: <1601797364.87.0.952495778828.issue41909@roundup.psfhosted.org>
2020-10-04 07:42:44serhiy.storchakalinkissue41909 messages
2020-10-04 07:42:44serhiy.storchakacreate