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
BUG: __getattr__ must raise AttributeError if name not found
PR matplotlib#20733 added module-level `__getattr__` functions to several
modules. All of the functions with the exception of the one in
`matplotlib.style.core` had a terminal `raise AttributeError` to
handle unmatched attributes.
The omission in `matplotlib.style.core` was probably
unintentional; it results in confusing and buggy behavior
such as:
```pycon
>>> import matplotlib.style.core
>>> if hasattr(matplotlib.style.core, '__warningregistry__'):
... del matplotlib.style.core.__warningregistry__
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
AttributeError: __warningregistry__
```
This causes problems in the unit tests for astropy affiliated
packages. See astropy/astropy#12038.
0 commit comments