You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document C API functions which swallow exceptions #79642
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2018-12-19.09:24:15.051>created_at=<Date2018-12-11.13:27:28.106>labels= ['3.8', 'type-feature', '3.7', 'docs']
title='Document C API functions which swallow exceptions'updated_at=<Date2018-12-20.21:28:32.946>user='https://github.com/serhiy-storchaka'
C API functions like PyDict_GetItem() and PyObject_HasAttr() suppresses all errors that may occur, including MemoryError and KeyboardInterrupt. They can return incorrect result when the memory is exhausted or the user presses Ctrl-C. The proposed PR documents such functions and suggests the C API which do not swallow unrelated exceptions.
Previous attempt to document this (for PyDict_GetItem() only) was in bpo-20615.
New changeset ff740db by Ned Deily (Miss Islington (bot)) in branch '3.6': bpo-35461: Document C API functions which suppress exceptions. (GH-11119) (GH-11210) ff740db
Activity
serhiy-storchaka commentedon Dec 11, 2018
C API functions like PyDict_GetItem() and PyObject_HasAttr() suppresses all errors that may occur, including MemoryError and KeyboardInterrupt. They can return incorrect result when the memory is exhausted or the user presses Ctrl-C. The proposed PR documents such functions and suggests the C API which do not swallow unrelated exceptions.
Previous attempt to document this (for PyDict_GetItem() only) was in bpo-20615.
serhiy-storchaka commentedon Dec 18, 2018
New changeset 3fcc1e0 by Serhiy Storchaka in branch 'master':
bpo-35461: Document C API functions which suppress exceptions. (GH-11119)
3fcc1e0
miss-islington commentedon Dec 18, 2018
New changeset f265afe by Miss Islington (bot) in branch '3.7':
bpo-35461: Document C API functions which suppress exceptions. (GH-11119)
f265afe
serhiy-storchaka commentedon Dec 19, 2018
There are too much differences in the C API and the documentation between 3.x and 2.7, so backporting to 2.7 is not practical.
ned-deily commentedon Dec 20, 2018
New changeset ff740db by Ned Deily (Miss Islington (bot)) in branch '3.6':
bpo-35461: Document C API functions which suppress exceptions. (GH-11119) (GH-11210)
ff740db