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.

classification
Title: Fix silencing all errors if an attribute lookup fails
Type: behavior Stage: resolved
Components: Extension Modules, Interpreter Core Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka
Priority: normal Keywords: patch

Created on 2019-08-31 08:10 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 15630 merged serhiy.storchaka, 2019-08-31 08:16
PR 15635 merged serhiy.storchaka, 2019-09-01 09:10
Messages (4)
msg350911 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-08-31 08:10
There are still sites in the CPython code where all errors of failed attribute lookup are silenced or overridden by other exception. This can hide such exceptions like MemoryError, RecursionError or KeyboardInterrupt and lead to incorrect result (as the attribute was just absent instead of looking it up was interrapted by side causes). Only AttributeError is expected to signal an absence of an attribute, and only it can be silenced.

The proposed PR fixes most of such cases.

There are still few sites where *all* errors are ignored (for example when report an error to the stderr or like), they should be considered separately.
msg350912 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-08-31 08:19
Previous round of fixing such issues is issue32571.
msg350939 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-09-01 09:03
New changeset 41c57b335330ff48af098d47e379e0f9ba09d233 by Serhiy Storchaka in branch 'master':
bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630)
https://github.com/python/cpython/commit/41c57b335330ff48af098d47e379e0f9ba09d233
msg350945 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-09-01 11:01
New changeset 353053d9ad08fea0e205e6c008b8a4350c0188e6 by Serhiy Storchaka in branch '3.8':
[3.8] bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630) (GH-15635)
https://github.com/python/cpython/commit/353053d9ad08fea0e205e6c008b8a4350c0188e6
History
Date User Action Args
2022-04-11 14:59:19adminsetgithub: 82175
2019-09-01 11:01:29serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-09-01 11:01:08serhiy.storchakasetmessages: + msg350945
2019-09-01 09:10:08serhiy.storchakasetpull_requests: + pull_request15303
2019-09-01 09:03:42serhiy.storchakasetmessages: + msg350939
2019-08-31 08:19:18serhiy.storchakasetmessages: + msg350912
2019-08-31 08:16:27serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request15298
2019-08-31 08:10:28serhiy.storchakacreate