[New-bugs-announce] [issue37994] Fix silencing all errors if an attribute lookup fails

Serhiy Storchaka report at bugs.python.org
Sat Aug 31 04:10:29 EDT 2019


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

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.

----------
components: Extension Modules, Interpreter Core
messages: 350911
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix silencing all errors if an attribute lookup fails
type: behavior
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37994>
_______________________________________


More information about the New-bugs-announce mailing list