Closed
Description
The following should either raise the DeprecationWarning
properly, or life in the future and raise a TypeError
, but it doesn't raise anything:
In [4]: warnings.simplefilter("error")
In [5]: np.dtype("a")
---------------------------------------------------------------------------
DeprecationWarning Traceback (most recent call last)
DeprecationWarning: Data type alias `a` was removed in NumPy 2.0. Use `S` alias instead.
The above exception was the direct cause of the following exception:
SystemError Traceback (most recent call last)
Cell In[5], line 1
----> 1 np.dtype("a")
SystemError: <class 'numpy.dtype'> returned a result with an exception set
Probably there is no test for it in test_deprecations.py
(since those tests automatically try to cover the failure path).
Metadata
Metadata
Assignees
Labels
No labels