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
Currently any raised DeprecationWarning makes the test suite fail due to the pytest settings in setup.cfg.
Opening this issue to see whether we want to keep this setup in the future. In my opinion it is too strict, and prone to failures due to reasons we can't control.
For instance, consider the following use case from #12041 . After installing numpy 1.8.2 and scipy 0.13.3 (minimal versions supported by scikit-learn), the importing scipy.sparse raises a deprecation warning,
Because scipy.sparse is indirectly imported in sklearn.__init__, this means that, technically, the test suite will always fails for these numpy & scipy versions. The only reason why it passed so far was due to a pytest limitation/bug (pytest-dev/pytest#3251). The workaround that we can use, now that that issue is fixed in pytest, is fairly awkward #12042.
This is just an example, but it illustrates that once 0.20 is released, with the current setting, running the test suite in some undetermined Python environment is likely to produce failures that are not representative.
Removing the setup.cfg altogether as it's done in Appveyor is also not ideal, as then e.g. the --doctest-modules option is also removed.
Possibly keeping this configuration for the CI and then removing it from the final .tar.gz before the release could work?
Another solution could be to fail only on DeprecationWarnings raised within scikit-learn code (if that's technically possible).
Another use case where the current setup is problematic is e.g. running tests on PyPy. Currently there are test failures in #12039 because of DeprecationWarnings coming from PyPy that we don't really care about due to "fail on DeprecationWarning" setting hardcoded in setup.cfg.
Currently any raised DeprecationWarning makes the test suite fail due to the
pytest
settings insetup.cfg
.Opening this issue to see whether we want to keep this setup in the future. In my opinion it is too strict, and prone to failures due to reasons we can't control.
For instance, consider the following use case from #12041 . After installing numpy 1.8.2 and scipy 0.13.3 (minimal versions supported by scikit-learn), the importing
scipy.sparse
raises a deprecation warning,Because
scipy.sparse
is indirectly imported insklearn.__init__
, this means that, technically, the test suite will always fails for these numpy & scipy versions. The only reason why it passed so far was due to a pytest limitation/bug (pytest-dev/pytest#3251). The workaround that we can use, now that that issue is fixed in pytest, is fairly awkward #12042.This is just an example, but it illustrates that once 0.20 is released, with the current setting, running the test suite in some undetermined Python environment is likely to produce failures that are not representative.
Removing the
setup.cfg
altogether as it's done in Appveyor is also not ideal, as then e.g. the--doctest-modules
option is also removed.Possibly keeping this configuration for the CI and then removing it from the final .tar.gz before the release could work?
Another solution could be to fail only on
DeprecationWarnings
raised within scikit-learn code (if that's technically possible).cc @jnothman @amueller
The text was updated successfully, but these errors were encountered: