Coverage for src/pymyinstall/fix/releases.py: 29%
7 statements
« prev ^ index » next coverage.py v7.1.0, created at 2023-07-19 01:47 +0200
« prev ^ index » next coverage.py v7.1.0, created at 2023-07-19 01:47 +0200
1"""
2@file
3@brief Some fixes for deprecated functions and not updated packages.
4"""
7def fix_scipy10_for_statsmodels08():
8 """
9 :epkg:`scipy` deprecated some functions
10 still used by :epkg:`statsmodels` 0.8.
11 See `deprecated features <https://scipy.github.io/devdocs/release.1.0.0.html#deprecated-features>`_
12 and pull request `3942 <https://github.com/statsmodels/statsmodels/pull/3942/files>`_
13 in :epkg:`statsmodels`.
14 """
15 import scipy.stats
16 if not hasattr(scipy.stats, "chisqprob"):
17 import scipy.stats.distributions
18 setattr(scipy.stats, "chisqprob", scipy.stats.distributions.chi2.sf)
21if __name__ == "__main__":
22 fix_scipy10_for_statsmodels08()