pytest icon indicating copy to clipboard operation
pytest copied to clipboard

Change deprecation warnings into errors for 8.0

Open nicoddemus opened this issue 5 years ago • 7 comments

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 avatar Jun 13 '20 12:06 nicoddemus

@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 avatar Oct 03 '20 18:10 avats-dev

@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. 😁

nicoddemus avatar Oct 04 '20 11:10 nicoddemus

Ok :+1:

avats-dev avatar Oct 04 '20 13:10 avats-dev

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.

h-vetinari avatar Jun 29 '21 12:06 h-vetinari

@nicoddemus Is this something you're going to look into? If not, I think this needs some more context about what should be done.

The-Compiler avatar Jun 30 '21 13:06 The-Compiler

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).

nicoddemus avatar Jun 30 '21 14:06 nicoddemus

Currently RemovedIn8Warning is declared final, but really it should be sealed, because it means pytest can't create subclasses of RemovedIn8Warning, eg ReturnNotNoneWarning

graingert avatar Jul 29 '22 09:07 graingert

This was done in a4a189ad9

bluetech avatar Jan 04 '24 16:01 bluetech