Message377922
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. |
|
Date |
User |
Action |
Args |
2020-10-04 07:42:44 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, loewis, nascheme, pitrou, The Compiler, bluetech, sparkingdark |
2020-10-04 07:42:44 | serhiy.storchaka | set | messageid: <1601797364.87.0.952495778828.issue41909@roundup.psfhosted.org> |
2020-10-04 07:42:44 | serhiy.storchaka | link | issue41909 messages |
2020-10-04 07:42:44 | serhiy.storchaka | create | |
|