Investigate and remove SciPy workaround.
Closed this issue · 1 comments
There is an old workaround for scipy, we should investigate why it was there and remove if necessary, otherwise find a more permanent solution.
# gen.py
# TODO: scipy 1.8 workaround, remove.
if not hasattr(mod, k):
print_(f"scipy 1.8 workaround : ({mod.__name__!r},{k!r}),")
continue
These are the warnings
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.interpolate.interpolate','RectBivariateSpline'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.interpolate.interpolate','RegularGridInterpolator'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.interpolate.interpolate','interpn'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.interpolate.interpolate','itertools'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.io.mmio','isspmatrix'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.linalg.basic','get_flinalg_funcs'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.linalg.decomp_lu','get_flinalg_funcs'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.linalg.matfuncs','single'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.optimize.minpack','dot'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.optimize.minpack','eye'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.optimize.minpack','inv'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.optimize.minpack','take'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.optimize.optimize','asfarray'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.optimize.optimize','is_array_scalar'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.optimize.optimize','main'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.optimize.slsqp','exp'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.optimize.slsqp','inf'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.base','isintlike'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.bsr','get_index_dtype'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.bsr','isspmatrix'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.compressed','get_index_dtype'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.compressed','isspmatrix'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.compressed','spmatrix'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.coo','get_index_dtype'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.coo','isspmatrix'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.csc','get_index_dtype'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.csr','get_index_dtype'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.data','matrix'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.data','spmatrix'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.dia','get_index_dtype'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.dia','isspmatrix'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.dok','get_index_dtype'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.dok','isspmatrix'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.lil','get_index_dtype'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.lil','isspmatrix'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.spatial.qhull','os'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.spatial.qhull','sys'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.spatial.qhull','tempfile'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.spatial.qhull','threading'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.special.add_newdocs','Dict'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.kde','logsumexp'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.mstats_basic','KendalltauResult'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.mstats_basic','SpearmanrResult'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','AlexanderGovernConstantInputWarning'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','F_onewayBadInputSizesWarning'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','F_onewayConstantInputWarning'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','Jarque_beraResult'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','KendalltauResult'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','PearsonRConstantInputWarning'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','PearsonRNearConstantInputWarning'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','PointbiserialrResult'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','SpearmanRConstantInputWarning'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','SpearmanrResult'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','Ttest_1sampResult'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','Ttest_relResult'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','WeightedTauResult'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','float_factorial'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','itemfreq'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.stats.stats','median_absolute_deviation'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.io.matlab.mio5_utils','miob'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.linalg.interface','isspmatrix'),
~/Documents/papyri/papyri/gen.py:700 in | scipy 1.8 workaround : ('scipy.sparse.linalg.matfuncs','isspmatrix'),
These scipy modules define a __dir__
(that code in gen.py is using dir(module)
). I guess the problem is that this __dir__
is wrong for these functions, because they don't actually exist on the corresponding module.
All of these sub-submodules are actually deprecated in SciPy (you should just use e.g. scipy.interpolate
instead of scipy.interpolate.interpolate
). I don't know if there's some way papyri should be detecting that.
Probably the best fix here is to just modify this code a bit to give a warning that the object couldn't be found in the module. And for scipy, these modules should be skipped in the config, since they are deprecated.