[issue41991] Remove _PyObject_HasAttrId

2020-10-11 Thread STINNER Victor
STINNER Victor added the comment: Remark: the issue that you give in this issue is helpful. Next time, you may include such rationale directly in the commit message. IMO the Linux kernel is a great example on how commit message should be written: long commit message with tons of information,

[issue41991] Remove _PyObject_HasAttrId

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.8, Python 3.9 ___ Python tracker ___ _

[issue41991] Remove _PyObject_HasAttrId

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 98c4433a81a4cd88c7438adbee1f2aa486188ca3 by Serhiy Storchaka in branch 'master': bpo-41991: Remove _PyObject_HasAttrId (GH-22629) https://github.com/python/cpython/commit/98c4433a81a4cd88c7438adbee1f2aa486188ca3 -- _

[issue41991] Remove _PyObject_HasAttrId

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This function was kept after previous clean because all its usages was in the code which silences all exceptions in any case, so using _PyObject_HasAttrId did not do additional harm. But now it is used also in the new code in Objects/unionobject.c. It is s

[issue41991] Remove _PyObject_HasAttrId

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

[issue41991] Remove _PyObject_HasAttrId

2020-10-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : _PyObject_HasAttrId() can return -1, 0 or 1. It returns -1 when cannot create a string (most likely due to MemoryError or UnicodeDecodeError), but returns 0 and silences all exceptions raised when look up the attribute (including MemoryError, KeybordInte