pytest
pytest copied to clipboard
Deprecate and remove nose plugin
nose has long been in maintenance only mode, and we support it via our nose.py plugin.
The nose.py plugin however is not trivial to maintain, and it dips its toes in a few places through the code:
https://github.com/pytest-dev/pytest/blob/d949b3f7d98fa7641055251765d3d6d0b1ef719c/src/_pytest/python.py#L382-L389
https://github.com/pytest-dev/pytest/blob/d949b3f7d98fa7641055251765d3d6d0b1ef719c/src/_pytest/python.py#L534
https://github.com/pytest-dev/pytest/blob/d949b3f7d98fa7641055251765d3d6d0b1ef719c/src/_pytest/python.py#L869
https://github.com/pytest-dev/pytest/blob/d949b3f7d98fa7641055251765d3d6d0b1ef719c/src/_pytest/unittest.py#L353-L355
Also it can cause confusion such as in https://github.com/pytest-dev/pytest/issues/9549.
Perhaps it is time to deprecate nose, and eventually removing it? If there is a large test suite which still requires this, they can just pin pytest until the last version that still supports it.
It could become a third party plugin. but unless someone volunteers to do it, I don't think it should be pytest's core responsibility to maintain such a plugin.
How to deprecate it?
nose.py actually just handles calling the nose-specific setup and teardown methods:
https://github.com/pytest-dev/pytest/blob/d949b3f7d98fa7641055251765d3d6d0b1ef719c/src/_pytest/nose.py#L9-L27
We could issue a deprecation warning when one of those functions are called, which AFAIK is basically what our nose support entails.
:+1:
@nicoddemus ok if I roll with this one?
Sure thing @symonk, go ahead!