pytest
pytest copied to clipboard
Change deprecation warnings into errors for 8.0
Ref: https://github.com/pytest-dev/pytest/issues/5584, https://github.com/pytest-dev/pytest/pull/7362
Note: originally this was meant to be integrated in 7.0 in #8837, but we decided to postpone it as per https://github.com/pytest-dev/pytest/pull/8837#issuecomment-872138897.
@nicoddemus I want to work on this. Can you guide me a bit how to resolve this?
I checked refs, so should I just replace 6.0 with 7.0 (as this is already implemented and just needs to be uncommented I think).
Thanks.
@avats-dev thanks for the offer!
However this is only done near the actual release (and actually this is incorrect, we do this in 7.1, I've updated the milestone), and we're nowhere near that. 😁
Ok :+1:
It's a bit confusing that the original 7.0 milestone was apparently renamed to 8.0. In any case, this issue should either be renamed or remilestoned.
@nicoddemus Is this something you're going to look into? If not, I think this needs some more context about what should be done.
Sure, thanks for the ping, I will work on it.
The idea is that we configure PytestDeprecationWarnings to errors (the core of it is in #7362, in src/_pytest/warnings.py).
Currently RemovedIn8Warning is declared final, but really it should be sealed, because it means pytest can't create subclasses of RemovedIn8Warning, eg ReturnNotNoneWarning
This was done in a4a189ad9