[issue42006] Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId

2020-11-23 Thread hongweipeng
Change by hongweipeng : -- nosy: +hongweipeng nosy_count: 2.0 -> 3.0 pull_requests: +22374 pull_request: https://github.com/python/cpython/pull/23487 ___ Python tracker ___

[issue42006] Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId

2020-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My plan is to deprecate PyDict_GetItem() and functions with same design flaw and finally remove them (in 4.0?). We cannot start to ignore exceptions in PyDict_GetItem(). It would not fix the original flaw when the user code does not check an exception

[issue42006] Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId

2020-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fb5db7ec58624cab0797b4050735be865d380823 by Serhiy Storchaka in branch 'master': bpo-42006: Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId. (GH-22648)

[issue42006] Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId

2020-10-11 Thread STINNER Victor
STINNER Victor added the comment: I don't want to hold fixing the code right now. If we decide to break the backward compatibility of the C API, a transition plan will likely take a few years anyway, whereas this issue should be first as soon as possible. --

[issue42006] Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId

2020-10-11 Thread STINNER Victor
STINNER Victor added the comment: PyDict_GetItem() behavior is an old wart. Would it make sense to plan a migration plan to slowly move towards PyDict_GetItem() behaving as PyDict_GetItemWithError()? CPython is an old code base full of corner cases. But outside CPython, is it common to

[issue42006] Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId

2020-10-11 Thread STINNER Victor
STINNER Victor added the comment: See also old issues about PyDict_GetItemWithError(): * bpo-20615 * bpo-30475 * bpo-35459 -- ___ Python tracker ___

[issue42006] Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId

2020-10-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +21622 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22648 ___ Python tracker

[issue42006] Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId

2020-10-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are design flaws in PyDict_GetItem(), PyDict_GetItemString() and _PyDict_GetItemId(). 1. They suppress all exceptions raised internally. Most common of are MemoryError, KeyboardInterrupt and RecursionError whose raising is out of control of the