Closed Sheila-nk closed 1 year ago
There are two separate things at play here.
One is individual functions which are deprecated but not marked as such. scipy.linalg.tri
seem to be of that kind. What needs investigating here is if they are not marked as deprecated in __all__
listings or if is_deprecated
utility of scpdt/utils.py
does not pick them.
The other, more annoying, issue is whole modules which are deprecated. E.g. try codata.epsilon0
: the whole codata
submodule is deprecated via the module-level __geattr__
. The warnings this emits are not caught anywhere because AFAIU we just do getattr(module, name)
. These warnings need to be filtered out at the getattr call sites.
A reproducer for these kinds of things is (or an equivalent stanza of https://github.com/ev-br/scpdt/issues/92#issuecomment-1719533203 )
$ python dev.py shell
$ pytest --pyargs scipy.constants
None of these two issues seem to be related to the plugin, both need to be addressed at the documentation or scpdt level.
On executing doctests on some Scipy submodules, all public objects are collected and the deprecated objects collected and doctested raise
DeprecationWarnings
which can be noisy.To reproduce on the scipy shell:
When running doctests through
dev.py
:There is need to filter out these deprecated objects at the point of collection so that these items are exempted from doctesting.